react-native-wagmi-charts 2.9.0 → 2.10.0
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/README.md +143 -66
- package/lib/commonjs/charts/candle/Candle.js +92 -177
- package/lib/commonjs/charts/candle/Candles.js +39 -66
- package/lib/commonjs/charts/candle/Chart.js +26 -37
- package/lib/commonjs/charts/candle/Context.js +49 -69
- package/lib/commonjs/charts/candle/Crosshair.js +82 -183
- package/lib/commonjs/charts/candle/Crosshair.js.map +1 -1
- package/lib/commonjs/charts/candle/CrosshairTooltip.js +61 -140
- package/lib/commonjs/charts/candle/DatetimeText.js +14 -19
- package/lib/commonjs/charts/candle/Line.js +27 -73
- package/lib/commonjs/charts/candle/PriceText.js +14 -19
- package/lib/commonjs/charts/candle/index.js +64 -67
- package/lib/commonjs/charts/candle/types.js +4 -4
- package/lib/commonjs/charts/candle/useCandleData.js +12 -9
- package/lib/commonjs/charts/candle/useCandlestickChart.js +7 -9
- package/lib/commonjs/charts/candle/useDatetime.js +18 -16
- package/lib/commonjs/charts/candle/usePrice.js +22 -21
- package/lib/commonjs/charts/candle/utils/getDomain.js +9 -5
- package/lib/commonjs/charts/candle/utils/getDomain.js.map +1 -1
- package/lib/commonjs/charts/candle/utils/getHeight.js +11 -12
- package/lib/commonjs/charts/candle/utils/getHeight.js.map +1 -1
- package/lib/commonjs/charts/candle/utils/getPrice.js +11 -12
- package/lib/commonjs/charts/candle/utils/getPrice.js.map +1 -1
- package/lib/commonjs/charts/candle/utils/getY.js +11 -12
- package/lib/commonjs/charts/candle/utils/getY.js.map +1 -1
- package/lib/commonjs/charts/candle/utils/index.js +16 -16
- package/lib/commonjs/charts/line/Axis.js +148 -268
- package/lib/commonjs/charts/line/Chart.js +62 -129
- package/lib/commonjs/charts/line/Chart.js.map +1 -1
- package/lib/commonjs/charts/line/ChartPath.js +105 -285
- package/lib/commonjs/charts/line/Context.js +37 -95
- package/lib/commonjs/charts/line/Cursor.js +74 -125
- package/lib/commonjs/charts/line/Cursor.js.map +1 -1
- package/lib/commonjs/charts/line/CursorCrosshair.js +56 -134
- package/lib/commonjs/charts/line/CursorCrosshair.js.map +1 -1
- package/lib/commonjs/charts/line/CursorLine.js +67 -152
- package/lib/commonjs/charts/line/CursorLine.js.map +1 -1
- package/lib/commonjs/charts/line/Data.js +34 -73
- package/lib/commonjs/charts/line/DatetimeText.js +15 -20
- package/lib/commonjs/charts/line/Dot.js +56 -149
- package/lib/commonjs/charts/line/Gradient.js +53 -124
- package/lib/commonjs/charts/line/Group.js +23 -54
- package/lib/commonjs/charts/line/Group.js.map +1 -1
- package/lib/commonjs/charts/line/Highlight.js +47 -115
- package/lib/commonjs/charts/line/HorizontalLine.js +39 -92
- package/lib/commonjs/charts/line/HoverTrap/index.js +7 -10
- package/lib/commonjs/charts/line/HoverTrap/index.web.js +43 -48
- package/lib/commonjs/charts/line/LineChartPathContext.js +11 -14
- package/lib/commonjs/charts/line/Path.js +32 -78
- package/lib/commonjs/charts/line/PriceText.js +36 -78
- package/lib/commonjs/charts/line/Tooltip.js +102 -188
- package/lib/commonjs/charts/line/Tooltip.js.map +1 -1
- package/lib/commonjs/charts/line/index.js +65 -65
- package/lib/commonjs/charts/line/types.js +4 -4
- package/lib/commonjs/charts/line/useAnimatedPath.js +22 -27
- package/lib/commonjs/charts/line/useCurrentY.js +17 -17
- package/lib/commonjs/charts/line/useDatetime.js +28 -32
- package/lib/commonjs/charts/line/useLineChart.js +15 -20
- package/lib/commonjs/charts/line/usePrice.js +26 -28
- package/lib/commonjs/charts/line/utils/getArea.js +14 -47
- package/lib/commonjs/charts/line/utils/getDomain.js +8 -5
- package/lib/commonjs/charts/line/utils/getDomain.js.map +1 -1
- package/lib/commonjs/charts/line/utils/getPath.js +14 -53
- package/lib/commonjs/charts/line/utils/getXPositionForCurve.js +5 -8
- package/lib/commonjs/charts/line/utils/index.js +19 -19
- package/lib/commonjs/charts/line/utils/interpolatePath.js +60 -100
- package/lib/commonjs/charts/line/utils/lineChartDataPropToArray.js +5 -5
- package/lib/commonjs/components/AnimatedText.js +29 -67
- package/lib/commonjs/index.js +19 -19
- package/lib/commonjs/types.js +2 -2
- package/lib/commonjs/utils/formatDatetime.js +9 -5
- package/lib/commonjs/utils/formatPrice.js +6 -10
- package/lib/commonjs/utils/index.js +13 -13
- package/lib/commonjs/utils/usePrevious.js +6 -8
- package/lib/module/charts/candle/Candle.js +76 -126
- package/lib/module/charts/candle/Candles.js +30 -52
- package/lib/module/charts/candle/Chart.js +19 -22
- package/lib/module/charts/candle/Context.js +29 -47
- package/lib/module/charts/candle/Crosshair.js +69 -142
- package/lib/module/charts/candle/Crosshair.js.map +1 -1
- package/lib/module/charts/candle/CrosshairTooltip.js +51 -101
- package/lib/module/charts/candle/DatetimeText.js +5 -5
- package/lib/module/charts/candle/Line.js +19 -37
- package/lib/module/charts/candle/PriceText.js +5 -5
- package/lib/module/charts/candle/index.js +2 -2
- package/lib/module/charts/candle/types.js +1 -1
- package/lib/module/charts/candle/useCandleData.js +7 -3
- package/lib/module/charts/candle/useCandlestickChart.js +1 -1
- package/lib/module/charts/candle/useDatetime.js +12 -10
- package/lib/module/charts/candle/usePrice.js +14 -12
- package/lib/module/charts/candle/utils/getDomain.js +6 -2
- package/lib/module/charts/candle/utils/getDomain.js.map +1 -1
- package/lib/module/charts/candle/utils/getHeight.js +8 -9
- package/lib/module/charts/candle/utils/getHeight.js.map +1 -1
- package/lib/module/charts/candle/utils/getPrice.js +8 -4
- package/lib/module/charts/candle/utils/getPrice.js.map +1 -1
- package/lib/module/charts/candle/utils/getY.js +8 -4
- package/lib/module/charts/candle/utils/getY.js.map +1 -1
- package/lib/module/charts/candle/utils/index.js +1 -1
- package/lib/module/charts/line/Axis.js +113 -189
- package/lib/module/charts/line/Chart.js +40 -73
- package/lib/module/charts/line/Chart.js.map +1 -1
- package/lib/module/charts/line/ChartPath.js +90 -238
- package/lib/module/charts/line/Context.js +29 -61
- package/lib/module/charts/line/Cursor.js +61 -82
- package/lib/module/charts/line/Cursor.js.map +1 -1
- package/lib/module/charts/line/CursorCrosshair.js +47 -99
- package/lib/module/charts/line/CursorCrosshair.js.map +1 -1
- package/lib/module/charts/line/CursorLine.js +52 -107
- package/lib/module/charts/line/CursorLine.js.map +1 -1
- package/lib/module/charts/line/Data.js +28 -41
- package/lib/module/charts/line/DatetimeText.js +5 -5
- package/lib/module/charts/line/Dot.js +39 -93
- package/lib/module/charts/line/Gradient.js +41 -79
- package/lib/module/charts/line/Group.js +14 -15
- package/lib/module/charts/line/Group.js.map +1 -1
- package/lib/module/charts/line/Highlight.js +32 -61
- package/lib/module/charts/line/HorizontalLine.js +27 -49
- package/lib/module/charts/line/HoverTrap/index.js +2 -3
- package/lib/module/charts/line/HoverTrap/index.web.js +34 -34
- package/lib/module/charts/line/LineChartPathContext.js +3 -3
- package/lib/module/charts/line/Path.js +20 -33
- package/lib/module/charts/line/PriceText.js +25 -42
- package/lib/module/charts/line/Tooltip.js +89 -151
- package/lib/module/charts/line/Tooltip.js.map +1 -1
- package/lib/module/charts/line/index.js +2 -2
- package/lib/module/charts/line/types.js +1 -1
- package/lib/module/charts/line/useAnimatedPath.js +16 -22
- package/lib/module/charts/line/useCurrentY.js +9 -4
- package/lib/module/charts/line/useDatetime.js +22 -26
- package/lib/module/charts/line/useLineChart.js +7 -10
- package/lib/module/charts/line/usePrice.js +20 -22
- package/lib/module/charts/line/utils/getArea.js +8 -15
- package/lib/module/charts/line/utils/getDomain.js +5 -2
- package/lib/module/charts/line/utils/getDomain.js.map +1 -1
- package/lib/module/charts/line/utils/getPath.js +8 -21
- package/lib/module/charts/line/utils/getXPositionForCurve.js +2 -5
- package/lib/module/charts/line/utils/index.js +1 -1
- package/lib/module/charts/line/utils/interpolatePath.js +57 -97
- package/lib/module/charts/line/utils/lineChartDataPropToArray.js +2 -2
- package/lib/module/components/AnimatedText.js +21 -25
- package/lib/module/index.js +1 -1
- package/lib/module/types.js +2 -1
- package/lib/module/utils/formatDatetime.js +6 -2
- package/lib/module/utils/formatPrice.js +3 -7
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/usePrevious.js +1 -1
- package/lib/typescript/src/charts/candle/Candle.d.ts +31 -45
- package/lib/typescript/src/charts/candle/Candles.d.ts +13 -24
- package/lib/typescript/src/charts/candle/Chart.d.ts +7 -12
- package/lib/typescript/src/charts/candle/Context.d.ts +7 -12
- package/lib/typescript/src/charts/candle/Crosshair.d.ts +9 -17
- package/lib/typescript/src/charts/candle/CrosshairTooltip.d.ts +8 -15
- package/lib/typescript/src/charts/candle/DatetimeText.d.ts +9 -15
- package/lib/typescript/src/charts/candle/Line.d.ts +5 -10
- package/lib/typescript/src/charts/candle/PriceText.d.ts +7 -13
- package/lib/typescript/src/charts/candle/index.d.ts +13 -32
- package/lib/typescript/src/charts/candle/types.d.ts +16 -16
- package/lib/typescript/src/charts/candle/useCandleData.d.ts +1 -1
- package/lib/typescript/src/charts/candle/useCandlestickChart.d.ts +1 -1
- package/lib/typescript/src/charts/candle/useDatetime.d.ts +9 -13
- package/lib/typescript/src/charts/candle/usePrice.d.ts +7 -11
- package/lib/typescript/src/charts/candle/utils/getDomain.d.ts +1 -1
- package/lib/typescript/src/charts/candle/utils/getDomain.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/utils/getHeight.d.ts +5 -9
- package/lib/typescript/src/charts/candle/utils/getPrice.d.ts +5 -9
- package/lib/typescript/src/charts/candle/utils/getY.d.ts +5 -9
- package/lib/typescript/src/charts/candle/utils/index.d.ts +1 -1
- package/lib/typescript/src/charts/line/Axis.d.ts +14 -27
- package/lib/typescript/src/charts/line/Chart.d.ts +23 -33
- package/lib/typescript/src/charts/line/Chart.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/ChartPath.d.ts +15 -28
- package/lib/typescript/src/charts/line/Context.d.ts +9 -16
- package/lib/typescript/src/charts/line/Cursor.d.ts +14 -22
- package/lib/typescript/src/charts/line/Cursor.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/CursorCrosshair.d.ts +11 -23
- package/lib/typescript/src/charts/line/CursorCrosshair.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/CursorLine.d.ts +9 -15
- package/lib/typescript/src/charts/line/CursorLine.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Data.d.ts +13 -17
- package/lib/typescript/src/charts/line/DatetimeText.d.ts +8 -14
- package/lib/typescript/src/charts/line/Dot.d.ts +25 -38
- package/lib/typescript/src/charts/line/Gradient.d.ts +5 -9
- package/lib/typescript/src/charts/line/Group.d.ts +3 -6
- package/lib/typescript/src/charts/line/Group.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Highlight.d.ts +9 -17
- package/lib/typescript/src/charts/line/HorizontalLine.d.ts +22 -30
- package/lib/typescript/src/charts/line/HoverTrap/index.d.ts +1 -1
- package/lib/typescript/src/charts/line/HoverTrap/index.web.d.ts +1 -1
- package/lib/typescript/src/charts/line/LineChartPathContext.d.ts +4 -4
- package/lib/typescript/src/charts/line/Path.d.ts +23 -28
- package/lib/typescript/src/charts/line/PriceText.d.ts +20 -28
- package/lib/typescript/src/charts/line/Tooltip.d.ts +20 -32
- package/lib/typescript/src/charts/line/index.d.ts +20 -33
- package/lib/typescript/src/charts/line/types.d.ts +17 -19
- package/lib/typescript/src/charts/line/useAnimatedPath.d.ts +7 -10
- package/lib/typescript/src/charts/line/useCurrentY.d.ts +2 -2
- package/lib/typescript/src/charts/line/useDatetime.d.ts +7 -11
- package/lib/typescript/src/charts/line/useLineChart.d.ts +10 -10
- package/lib/typescript/src/charts/line/usePrice.d.ts +7 -11
- package/lib/typescript/src/charts/line/utils/getArea.d.ts +9 -17
- package/lib/typescript/src/charts/line/utils/getDomain.d.ts +1 -1
- package/lib/typescript/src/charts/line/utils/getDomain.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/utils/getPath.d.ts +11 -21
- package/lib/typescript/src/charts/line/utils/getXPositionForCurve.d.ts +1 -1
- package/lib/typescript/src/charts/line/utils/index.d.ts +1 -1
- package/lib/typescript/src/charts/line/utils/interpolatePath.d.ts +5 -17
- package/lib/typescript/src/charts/line/utils/lineChartDataPropToArray.d.ts +2 -4
- package/lib/typescript/src/components/AnimatedText.d.ts +4 -7
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/types.d.ts +4 -7
- package/lib/typescript/src/utils/formatDatetime.d.ts +5 -9
- package/lib/typescript/src/utils/formatPrice.d.ts +5 -9
- package/lib/typescript/src/utils/index.d.ts +1 -1
- package/lib/typescript/src/utils/usePrevious.d.ts +1 -1
- package/package.json +1 -1
- package/src/charts/line/CursorLine.tsx +6 -2
- package/src/charts/line/HorizontalLine.tsx +5 -1
|
@@ -1,232 +1,232 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
value: true
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
-
LineChart: true
|
|
7
|
+
LineChart: true
|
|
8
8
|
};
|
|
9
9
|
exports.LineChart = void 0;
|
|
10
|
-
var _Axis = require(
|
|
10
|
+
var _Axis = require("./Axis");
|
|
11
11
|
Object.keys(_Axis).forEach(function (key) {
|
|
12
|
-
if (key ===
|
|
12
|
+
if (key === "default" || key === "__esModule") return;
|
|
13
13
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
14
14
|
if (key in exports && exports[key] === _Axis[key]) return;
|
|
15
15
|
Object.defineProperty(exports, key, {
|
|
16
16
|
enumerable: true,
|
|
17
17
|
get: function () {
|
|
18
18
|
return _Axis[key];
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
|
-
var _Chart = require(
|
|
22
|
+
var _Chart = require("./Chart");
|
|
23
23
|
Object.keys(_Chart).forEach(function (key) {
|
|
24
|
-
if (key ===
|
|
24
|
+
if (key === "default" || key === "__esModule") return;
|
|
25
25
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
26
26
|
if (key in exports && exports[key] === _Chart[key]) return;
|
|
27
27
|
Object.defineProperty(exports, key, {
|
|
28
28
|
enumerable: true,
|
|
29
29
|
get: function () {
|
|
30
30
|
return _Chart[key];
|
|
31
|
-
}
|
|
31
|
+
}
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
|
-
var _ChartPath = require(
|
|
34
|
+
var _ChartPath = require("./ChartPath");
|
|
35
35
|
Object.keys(_ChartPath).forEach(function (key) {
|
|
36
|
-
if (key ===
|
|
36
|
+
if (key === "default" || key === "__esModule") return;
|
|
37
37
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
38
38
|
if (key in exports && exports[key] === _ChartPath[key]) return;
|
|
39
39
|
Object.defineProperty(exports, key, {
|
|
40
40
|
enumerable: true,
|
|
41
41
|
get: function () {
|
|
42
42
|
return _ChartPath[key];
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
|
-
var _Highlight = require(
|
|
46
|
+
var _Highlight = require("./Highlight");
|
|
47
47
|
Object.keys(_Highlight).forEach(function (key) {
|
|
48
|
-
if (key ===
|
|
48
|
+
if (key === "default" || key === "__esModule") return;
|
|
49
49
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
50
50
|
if (key in exports && exports[key] === _Highlight[key]) return;
|
|
51
51
|
Object.defineProperty(exports, key, {
|
|
52
52
|
enumerable: true,
|
|
53
53
|
get: function () {
|
|
54
54
|
return _Highlight[key];
|
|
55
|
-
}
|
|
55
|
+
}
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
|
-
var _Context = require(
|
|
58
|
+
var _Context = require("./Context");
|
|
59
59
|
Object.keys(_Context).forEach(function (key) {
|
|
60
|
-
if (key ===
|
|
60
|
+
if (key === "default" || key === "__esModule") return;
|
|
61
61
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
62
62
|
if (key in exports && exports[key] === _Context[key]) return;
|
|
63
63
|
Object.defineProperty(exports, key, {
|
|
64
64
|
enumerable: true,
|
|
65
65
|
get: function () {
|
|
66
66
|
return _Context[key];
|
|
67
|
-
}
|
|
67
|
+
}
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
|
-
var _Cursor = require(
|
|
70
|
+
var _Cursor = require("./Cursor");
|
|
71
71
|
Object.keys(_Cursor).forEach(function (key) {
|
|
72
|
-
if (key ===
|
|
72
|
+
if (key === "default" || key === "__esModule") return;
|
|
73
73
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
74
74
|
if (key in exports && exports[key] === _Cursor[key]) return;
|
|
75
75
|
Object.defineProperty(exports, key, {
|
|
76
76
|
enumerable: true,
|
|
77
77
|
get: function () {
|
|
78
78
|
return _Cursor[key];
|
|
79
|
-
}
|
|
79
|
+
}
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
|
-
var _CursorCrosshair = require(
|
|
82
|
+
var _CursorCrosshair = require("./CursorCrosshair");
|
|
83
83
|
Object.keys(_CursorCrosshair).forEach(function (key) {
|
|
84
|
-
if (key ===
|
|
84
|
+
if (key === "default" || key === "__esModule") return;
|
|
85
85
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
86
86
|
if (key in exports && exports[key] === _CursorCrosshair[key]) return;
|
|
87
87
|
Object.defineProperty(exports, key, {
|
|
88
88
|
enumerable: true,
|
|
89
89
|
get: function () {
|
|
90
90
|
return _CursorCrosshair[key];
|
|
91
|
-
}
|
|
91
|
+
}
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
|
-
var _CursorLine = require(
|
|
94
|
+
var _CursorLine = require("./CursorLine");
|
|
95
95
|
Object.keys(_CursorLine).forEach(function (key) {
|
|
96
|
-
if (key ===
|
|
96
|
+
if (key === "default" || key === "__esModule") return;
|
|
97
97
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
98
98
|
if (key in exports && exports[key] === _CursorLine[key]) return;
|
|
99
99
|
Object.defineProperty(exports, key, {
|
|
100
100
|
enumerable: true,
|
|
101
101
|
get: function () {
|
|
102
102
|
return _CursorLine[key];
|
|
103
|
-
}
|
|
103
|
+
}
|
|
104
104
|
});
|
|
105
105
|
});
|
|
106
|
-
var _Dot = require(
|
|
106
|
+
var _Dot = require("./Dot");
|
|
107
107
|
Object.keys(_Dot).forEach(function (key) {
|
|
108
|
-
if (key ===
|
|
108
|
+
if (key === "default" || key === "__esModule") return;
|
|
109
109
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
110
110
|
if (key in exports && exports[key] === _Dot[key]) return;
|
|
111
111
|
Object.defineProperty(exports, key, {
|
|
112
112
|
enumerable: true,
|
|
113
113
|
get: function () {
|
|
114
114
|
return _Dot[key];
|
|
115
|
-
}
|
|
115
|
+
}
|
|
116
116
|
});
|
|
117
117
|
});
|
|
118
|
-
var _Gradient = require(
|
|
118
|
+
var _Gradient = require("./Gradient");
|
|
119
119
|
Object.keys(_Gradient).forEach(function (key) {
|
|
120
|
-
if (key ===
|
|
120
|
+
if (key === "default" || key === "__esModule") return;
|
|
121
121
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
122
122
|
if (key in exports && exports[key] === _Gradient[key]) return;
|
|
123
123
|
Object.defineProperty(exports, key, {
|
|
124
124
|
enumerable: true,
|
|
125
125
|
get: function () {
|
|
126
126
|
return _Gradient[key];
|
|
127
|
-
}
|
|
127
|
+
}
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
|
-
var _Group = require(
|
|
131
|
-
var _HorizontalLine = require(
|
|
132
|
-
var _Tooltip = require(
|
|
130
|
+
var _Group = require("./Group");
|
|
131
|
+
var _HorizontalLine = require("./HorizontalLine");
|
|
132
|
+
var _Tooltip = require("./Tooltip");
|
|
133
133
|
Object.keys(_Tooltip).forEach(function (key) {
|
|
134
|
-
if (key ===
|
|
134
|
+
if (key === "default" || key === "__esModule") return;
|
|
135
135
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
136
136
|
if (key in exports && exports[key] === _Tooltip[key]) return;
|
|
137
137
|
Object.defineProperty(exports, key, {
|
|
138
138
|
enumerable: true,
|
|
139
139
|
get: function () {
|
|
140
140
|
return _Tooltip[key];
|
|
141
|
-
}
|
|
141
|
+
}
|
|
142
142
|
});
|
|
143
143
|
});
|
|
144
|
-
var _PriceText = require(
|
|
144
|
+
var _PriceText = require("./PriceText");
|
|
145
145
|
Object.keys(_PriceText).forEach(function (key) {
|
|
146
|
-
if (key ===
|
|
146
|
+
if (key === "default" || key === "__esModule") return;
|
|
147
147
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
148
148
|
if (key in exports && exports[key] === _PriceText[key]) return;
|
|
149
149
|
Object.defineProperty(exports, key, {
|
|
150
150
|
enumerable: true,
|
|
151
151
|
get: function () {
|
|
152
152
|
return _PriceText[key];
|
|
153
|
-
}
|
|
153
|
+
}
|
|
154
154
|
});
|
|
155
155
|
});
|
|
156
|
-
var _DatetimeText = require(
|
|
156
|
+
var _DatetimeText = require("./DatetimeText");
|
|
157
157
|
Object.keys(_DatetimeText).forEach(function (key) {
|
|
158
|
-
if (key ===
|
|
158
|
+
if (key === "default" || key === "__esModule") return;
|
|
159
159
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
160
160
|
if (key in exports && exports[key] === _DatetimeText[key]) return;
|
|
161
161
|
Object.defineProperty(exports, key, {
|
|
162
162
|
enumerable: true,
|
|
163
163
|
get: function () {
|
|
164
164
|
return _DatetimeText[key];
|
|
165
|
-
}
|
|
165
|
+
}
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
|
-
var _useDatetime = require(
|
|
168
|
+
var _useDatetime = require("./useDatetime");
|
|
169
169
|
Object.keys(_useDatetime).forEach(function (key) {
|
|
170
|
-
if (key ===
|
|
170
|
+
if (key === "default" || key === "__esModule") return;
|
|
171
171
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
172
172
|
if (key in exports && exports[key] === _useDatetime[key]) return;
|
|
173
173
|
Object.defineProperty(exports, key, {
|
|
174
174
|
enumerable: true,
|
|
175
175
|
get: function () {
|
|
176
176
|
return _useDatetime[key];
|
|
177
|
-
}
|
|
177
|
+
}
|
|
178
178
|
});
|
|
179
179
|
});
|
|
180
|
-
var _usePrice = require(
|
|
180
|
+
var _usePrice = require("./usePrice");
|
|
181
181
|
Object.keys(_usePrice).forEach(function (key) {
|
|
182
|
-
if (key ===
|
|
182
|
+
if (key === "default" || key === "__esModule") return;
|
|
183
183
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
184
184
|
if (key in exports && exports[key] === _usePrice[key]) return;
|
|
185
185
|
Object.defineProperty(exports, key, {
|
|
186
186
|
enumerable: true,
|
|
187
187
|
get: function () {
|
|
188
188
|
return _usePrice[key];
|
|
189
|
-
}
|
|
189
|
+
}
|
|
190
190
|
});
|
|
191
191
|
});
|
|
192
|
-
var _useLineChart = require(
|
|
192
|
+
var _useLineChart = require("./useLineChart");
|
|
193
193
|
Object.keys(_useLineChart).forEach(function (key) {
|
|
194
|
-
if (key ===
|
|
194
|
+
if (key === "default" || key === "__esModule") return;
|
|
195
195
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
196
196
|
if (key in exports && exports[key] === _useLineChart[key]) return;
|
|
197
197
|
Object.defineProperty(exports, key, {
|
|
198
198
|
enumerable: true,
|
|
199
199
|
get: function () {
|
|
200
200
|
return _useLineChart[key];
|
|
201
|
-
}
|
|
201
|
+
}
|
|
202
202
|
});
|
|
203
203
|
});
|
|
204
|
-
var _HoverTrap = require(
|
|
205
|
-
var _Path = require(
|
|
204
|
+
var _HoverTrap = require("./HoverTrap");
|
|
205
|
+
var _Path = require("./Path");
|
|
206
206
|
Object.keys(_Path).forEach(function (key) {
|
|
207
|
-
if (key ===
|
|
207
|
+
if (key === "default" || key === "__esModule") return;
|
|
208
208
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
209
209
|
if (key in exports && exports[key] === _Path[key]) return;
|
|
210
210
|
Object.defineProperty(exports, key, {
|
|
211
211
|
enumerable: true,
|
|
212
212
|
get: function () {
|
|
213
213
|
return _Path[key];
|
|
214
|
-
}
|
|
214
|
+
}
|
|
215
215
|
});
|
|
216
216
|
});
|
|
217
|
-
var _types = require(
|
|
217
|
+
var _types = require("./types");
|
|
218
218
|
Object.keys(_types).forEach(function (key) {
|
|
219
|
-
if (key ===
|
|
219
|
+
if (key === "default" || key === "__esModule") return;
|
|
220
220
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
221
221
|
if (key in exports && exports[key] === _types[key]) return;
|
|
222
222
|
Object.defineProperty(exports, key, {
|
|
223
223
|
enumerable: true,
|
|
224
224
|
get: function () {
|
|
225
225
|
return _types[key];
|
|
226
|
-
}
|
|
226
|
+
}
|
|
227
227
|
});
|
|
228
228
|
});
|
|
229
|
-
const LineChart =
|
|
229
|
+
const LineChart = exports.LineChart = Object.assign(_Chart.LineChart, {
|
|
230
230
|
Axis: _Axis.LineChartAxis,
|
|
231
231
|
Chart: _Chart.LineChart,
|
|
232
232
|
Dot: _Dot.LineChartDot,
|
|
@@ -245,6 +245,6 @@ const LineChart = (exports.LineChart = Object.assign(_Chart.LineChart, {
|
|
|
245
245
|
useDatetime: _useDatetime.useLineChartDatetime,
|
|
246
246
|
usePrice: _usePrice.useLineChartPrice,
|
|
247
247
|
useChart: _useLineChart.useLineChart,
|
|
248
|
-
HoverTrap: _HoverTrap.LineChartHoverTrap
|
|
249
|
-
})
|
|
250
|
-
//# sourceMappingURL=index.js.map
|
|
248
|
+
HoverTrap: _HoverTrap.LineChartHoverTrap
|
|
249
|
+
});
|
|
250
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,43 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
value: true
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useAnimatedPath = useAnimatedPath;
|
|
7
|
-
var _reactNativeReanimated = require(
|
|
8
|
-
var _utils = require(
|
|
9
|
-
var _utils2 = require(
|
|
10
|
-
function useAnimatedPath({
|
|
7
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _utils = require("./utils");
|
|
9
|
+
var _utils2 = require("../../utils");
|
|
10
|
+
function useAnimatedPath({
|
|
11
|
+
enabled = true,
|
|
12
|
+
path
|
|
13
|
+
}) {
|
|
11
14
|
const transition = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
12
15
|
const previousPath = (0, _utils2.usePrevious)(path);
|
|
13
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
[path]
|
|
24
|
-
);
|
|
16
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
17
|
+
return path;
|
|
18
|
+
}, (result, previous) => {
|
|
19
|
+
if (result !== previous) {
|
|
20
|
+
transition.value = 0;
|
|
21
|
+
transition.value = (0, _reactNativeReanimated.withTiming)(1);
|
|
22
|
+
}
|
|
23
|
+
}, [path]);
|
|
25
24
|
const animatedProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
26
25
|
let d = path || '';
|
|
27
26
|
if (previousPath && enabled) {
|
|
28
|
-
const pathInterpolator = (0, _utils.interpolatePath)(
|
|
29
|
-
previousPath,
|
|
30
|
-
path,
|
|
31
|
-
null
|
|
32
|
-
);
|
|
27
|
+
const pathInterpolator = (0, _utils.interpolatePath)(previousPath, path, null);
|
|
33
28
|
d = pathInterpolator(transition.value);
|
|
34
29
|
}
|
|
35
30
|
return {
|
|
36
|
-
d
|
|
31
|
+
d
|
|
37
32
|
};
|
|
38
33
|
});
|
|
39
34
|
return {
|
|
40
|
-
animatedProps
|
|
35
|
+
animatedProps
|
|
41
36
|
};
|
|
42
37
|
}
|
|
43
|
-
//# sourceMappingURL=useAnimatedPath.js.map
|
|
38
|
+
//# sourceMappingURL=useAnimatedPath.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
value: true
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useCurrentY = useCurrentY;
|
|
7
|
-
var _react = require(
|
|
8
|
-
var _reactNativeReanimated = require(
|
|
9
|
-
var _reactNativeRedash = require(
|
|
10
|
-
var _Context = require(
|
|
11
|
-
var _Chart = require(
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
+
var _reactNativeRedash = require("react-native-redash");
|
|
10
|
+
var _Context = require("./Context");
|
|
11
|
+
var _Chart = require("./Chart");
|
|
12
12
|
function useCurrentY() {
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
13
|
+
const {
|
|
14
|
+
path,
|
|
15
|
+
width
|
|
16
|
+
} = (0, _react.useContext)(_Chart.LineChartDimensionsContext);
|
|
17
|
+
const {
|
|
18
|
+
currentX
|
|
19
|
+
} = (0, _react.useContext)(_Context.LineChartContext);
|
|
20
|
+
const parsedPath = (0, _react.useMemo)(() => path ? (0, _reactNativeRedash.parse)(path) : undefined, [path]);
|
|
21
21
|
const currentY = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
22
22
|
if (!parsedPath) {
|
|
23
23
|
return -1;
|
|
@@ -27,4 +27,4 @@ function useCurrentY() {
|
|
|
27
27
|
}, [parsedPath, width, currentX]);
|
|
28
28
|
return currentY;
|
|
29
29
|
}
|
|
30
|
-
//# sourceMappingURL=useCurrentY.js.map
|
|
30
|
+
//# sourceMappingURL=useCurrentY.js.map
|
|
@@ -1,46 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
value: true
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useLineChartDatetime = useLineChartDatetime;
|
|
7
|
-
var _reactNativeReanimated = require(
|
|
8
|
-
var _utils = require(
|
|
9
|
-
var _useLineChart = require(
|
|
10
|
-
function useLineChartDatetime({
|
|
11
|
-
|
|
7
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _utils = require("../../utils");
|
|
9
|
+
var _useLineChart = require("./useLineChart");
|
|
10
|
+
function useLineChartDatetime({
|
|
11
|
+
format,
|
|
12
|
+
locale,
|
|
13
|
+
options
|
|
14
|
+
} = {}) {
|
|
15
|
+
const {
|
|
16
|
+
currentIndex,
|
|
17
|
+
data
|
|
18
|
+
} = (0, _useLineChart.useLineChart)();
|
|
12
19
|
const timestamp = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
13
|
-
if (
|
|
14
|
-
!data ||
|
|
15
|
-
typeof currentIndex.value === 'undefined' ||
|
|
16
|
-
currentIndex.value === -1
|
|
17
|
-
) {
|
|
20
|
+
if (!data || typeof currentIndex.value === 'undefined' || currentIndex.value === -1) {
|
|
18
21
|
return '';
|
|
19
22
|
}
|
|
20
23
|
return data[currentIndex.value]?.timestamp ?? '';
|
|
21
24
|
}, [currentIndex, data]);
|
|
22
|
-
const value = (0, _reactNativeReanimated.useDerivedValue)(
|
|
23
|
-
() => new Date(timestamp.value).getTime(),
|
|
24
|
-
[timestamp]
|
|
25
|
-
);
|
|
25
|
+
const value = (0, _reactNativeReanimated.useDerivedValue)(() => new Date(timestamp.value).getTime(), [timestamp]);
|
|
26
26
|
const formatted = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
27
|
-
const formattedDatetime = value.value
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
value: value.value || -1,
|
|
37
|
-
formatted: formattedDatetime,
|
|
38
|
-
})
|
|
39
|
-
: formattedDatetime;
|
|
27
|
+
const formattedDatetime = value.value ? (0, _utils.formatDatetime)({
|
|
28
|
+
value: value.value,
|
|
29
|
+
locale,
|
|
30
|
+
options
|
|
31
|
+
}) : '';
|
|
32
|
+
return format ? format({
|
|
33
|
+
value: value.value || -1,
|
|
34
|
+
formatted: formattedDatetime
|
|
35
|
+
}) : formattedDatetime;
|
|
40
36
|
}, [format, locale, options, value]);
|
|
41
37
|
return {
|
|
42
38
|
value,
|
|
43
|
-
formatted
|
|
39
|
+
formatted
|
|
44
40
|
};
|
|
45
41
|
}
|
|
46
|
-
//# sourceMappingURL=useDatetime.js.map
|
|
42
|
+
//# sourceMappingURL=useDatetime.js.map
|
|
@@ -1,30 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
value: true
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useLineChart = useLineChart;
|
|
7
|
-
var _react = _interopRequireDefault(require(
|
|
8
|
-
var _Context = require(
|
|
9
|
-
var _Data = require(
|
|
10
|
-
var _useCurrentY = require(
|
|
11
|
-
function _interopRequireDefault(e) {
|
|
12
|
-
return e && e.__esModule ? e : { default: e };
|
|
13
|
-
}
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Context = require("./Context");
|
|
9
|
+
var _Data = require("./Data");
|
|
10
|
+
var _useCurrentY = require("./useCurrentY");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
12
|
function useLineChart() {
|
|
15
13
|
const lineChartContext = _react.default.useContext(_Context.LineChartContext);
|
|
16
14
|
const maybeId = (0, _Data.useLineChartId)();
|
|
17
15
|
const dataContext = (0, _Data.useLineChartData)({
|
|
18
|
-
id: maybeId
|
|
16
|
+
id: maybeId
|
|
19
17
|
});
|
|
20
18
|
const currentY = (0, _useCurrentY.useCurrentY)();
|
|
21
|
-
return _react.default.useMemo(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
[lineChartContext, dataContext, currentY]
|
|
28
|
-
);
|
|
19
|
+
return _react.default.useMemo(() => ({
|
|
20
|
+
...lineChartContext,
|
|
21
|
+
...dataContext,
|
|
22
|
+
currentY
|
|
23
|
+
}), [lineChartContext, dataContext, currentY]);
|
|
29
24
|
}
|
|
30
|
-
//# sourceMappingURL=useLineChart.js.map
|
|
25
|
+
//# sourceMappingURL=useLineChart.js.map
|
|
@@ -1,47 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
value: true
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useLineChartPrice = useLineChartPrice;
|
|
7
|
-
var _reactNativeReanimated = require(
|
|
8
|
-
var _utils = require(
|
|
9
|
-
var _useLineChart = require(
|
|
10
|
-
function useLineChartPrice({
|
|
11
|
-
|
|
7
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _utils = require("../../utils");
|
|
9
|
+
var _useLineChart = require("./useLineChart");
|
|
10
|
+
function useLineChartPrice({
|
|
11
|
+
format,
|
|
12
|
+
precision = 2,
|
|
13
|
+
index
|
|
14
|
+
} = {}) {
|
|
15
|
+
const {
|
|
16
|
+
currentIndex,
|
|
17
|
+
data
|
|
18
|
+
} = (0, _useLineChart.useLineChart)();
|
|
12
19
|
const float = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
13
20
|
if (!data) {
|
|
14
21
|
return '';
|
|
15
22
|
}
|
|
16
|
-
if (
|
|
17
|
-
(typeof currentIndex.value === 'undefined' ||
|
|
18
|
-
currentIndex.value === -1) &&
|
|
19
|
-
index == null
|
|
20
|
-
) {
|
|
23
|
+
if ((typeof currentIndex.value === 'undefined' || currentIndex.value === -1) && index == null) {
|
|
21
24
|
return '';
|
|
22
25
|
}
|
|
23
|
-
const dataPoint =
|
|
24
|
-
data[Math.min(index ?? currentIndex.value, data.length - 1)];
|
|
26
|
+
const dataPoint = data[Math.min(index ?? currentIndex.value, data.length - 1)];
|
|
25
27
|
const price = dataPoint?.value ?? 0;
|
|
26
28
|
return price.toFixed(precision).toString();
|
|
27
29
|
}, [currentIndex, data, precision]);
|
|
28
30
|
const formatted = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
29
31
|
const value = float.value || '';
|
|
30
|
-
const formattedPrice = value
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
value,
|
|
38
|
-
formatted: formattedPrice,
|
|
39
|
-
})
|
|
40
|
-
: formattedPrice;
|
|
32
|
+
const formattedPrice = value ? (0, _utils.formatPrice)({
|
|
33
|
+
value
|
|
34
|
+
}) : '';
|
|
35
|
+
return format ? format({
|
|
36
|
+
value,
|
|
37
|
+
formatted: formattedPrice
|
|
38
|
+
}) : formattedPrice;
|
|
41
39
|
}, [float, format]);
|
|
42
40
|
return {
|
|
43
41
|
value: float,
|
|
44
|
-
formatted
|
|
42
|
+
formatted
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
|
-
//# sourceMappingURL=usePrice.js.map
|
|
45
|
+
//# sourceMappingURL=usePrice.js.map
|