@ledgerhq/lumen-ui-react-visualization 0.1.18 → 0.1.20
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/dist/lib/Components/Axis/Axis.types.d.ts +6 -0
- package/dist/lib/Components/Axis/Axis.types.d.ts.map +1 -1
- package/dist/lib/Components/Axis/XAxis/XAxis.d.ts +1 -1
- package/dist/lib/Components/Axis/XAxis/XAxis.d.ts.map +1 -1
- package/dist/lib/Components/Axis/XAxis/XAxis.js +24 -23
- package/dist/lib/Components/Axis/YAxis/YAxis.d.ts +1 -1
- package/dist/lib/Components/Axis/YAxis/YAxis.d.ts.map +1 -1
- package/dist/lib/Components/Axis/YAxis/YAxis.js +36 -35
- package/dist/lib/Components/CartesianChart/CartesianChart.d.ts +1 -1
- package/dist/lib/Components/CartesianChart/CartesianChart.d.ts.map +1 -1
- package/dist/lib/Components/CartesianChart/CartesianChart.js +89 -82
- package/dist/lib/Components/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.d.ts +11 -0
- package/dist/lib/Components/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.d.ts.map +1 -0
- package/dist/lib/Components/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.js +21 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts +3 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts.map +1 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.js +41 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/context.d.ts +15 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/context.d.ts.map +1 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/context.js +10 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/index.d.ts +3 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/index.d.ts.map +1 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/types.d.ts +57 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/types.d.ts.map +1 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/utils.d.ts +31 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/utils.d.ts.map +1 -0
- package/dist/lib/Components/CartesianChart/RevealAnimation/utils.js +67 -0
- package/dist/lib/Components/CartesianChart/hooks/useShimmerAnimation.d.ts +18 -0
- package/dist/lib/Components/CartesianChart/hooks/useShimmerAnimation.d.ts.map +1 -0
- package/dist/lib/Components/CartesianChart/hooks/useShimmerAnimation.js +14 -0
- package/dist/lib/Components/CartesianChart/types.d.ts +11 -0
- package/dist/lib/Components/CartesianChart/types.d.ts.map +1 -1
- package/dist/lib/Components/CartesianChart/utils.d.ts +1 -24
- package/dist/lib/Components/CartesianChart/utils.d.ts.map +1 -1
- package/dist/lib/Components/CartesianChart/utils.js +12 -23
- package/dist/lib/Components/Line/Line.d.ts +1 -1
- package/dist/lib/Components/Line/Line.d.ts.map +1 -1
- package/dist/lib/Components/Line/Line.js +43 -36
- package/dist/lib/Components/Line/constants.d.ts +4 -0
- package/dist/lib/Components/Line/constants.d.ts.map +1 -0
- package/dist/lib/Components/Line/constants.js +7 -0
- package/dist/lib/Components/Line/index.d.ts +1 -1
- package/dist/lib/Components/Line/index.d.ts.map +1 -1
- package/dist/lib/Components/Line/types.d.ts +15 -0
- package/dist/lib/Components/Line/types.d.ts.map +1 -1
- package/dist/lib/Components/Line/utils.d.ts +11 -6
- package/dist/lib/Components/Line/utils.d.ts.map +1 -1
- package/dist/lib/Components/Line/utils.js +36 -18
- package/dist/lib/Components/LineChart/LineChart.d.ts +1 -1
- package/dist/lib/Components/LineChart/LineChart.d.ts.map +1 -1
- package/dist/lib/Components/LineChart/LineChart.js +152 -69
- package/dist/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.d.ts +9 -0
- package/dist/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.d.ts.map +1 -0
- package/dist/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.js +51 -0
- package/dist/lib/Components/LineChart/LineChartEmptyState/index.d.ts +3 -0
- package/dist/lib/Components/LineChart/LineChartEmptyState/index.d.ts.map +1 -0
- package/dist/lib/Components/LineChart/LineChartEmptyState/types.d.ts +3 -0
- package/dist/lib/Components/LineChart/LineChartEmptyState/types.d.ts.map +1 -0
- package/dist/lib/Components/LineChart/LineChartEmptyState/utils.d.ts +14 -0
- package/dist/lib/Components/LineChart/LineChartEmptyState/utils.d.ts.map +1 -0
- package/dist/lib/Components/LineChart/LineChartEmptyState/utils.js +9 -0
- package/dist/lib/Components/LineChart/__stories__/chartStoryFixtures.d.ts +57 -3
- package/dist/lib/Components/LineChart/__stories__/chartStoryFixtures.d.ts.map +1 -1
- package/dist/lib/Components/LineChart/types.d.ts +39 -1
- package/dist/lib/Components/LineChart/types.d.ts.map +1 -1
- package/dist/lib/Components/LineChart/utils.d.ts +43 -0
- package/dist/lib/Components/LineChart/utils.d.ts.map +1 -0
- package/dist/lib/Components/LineChart/utils.js +37 -0
- package/dist/lib/Components/Point/Point.d.ts.map +1 -1
- package/dist/lib/Components/Point/Point.js +29 -27
- package/dist/lib/Components/ReferenceLine/ReferenceLine.d.ts.map +1 -1
- package/dist/lib/Components/ReferenceLine/ReferenceLine.js +16 -16
- package/dist/lib/Components/ReferenceLine/constants.d.ts +3 -3
- package/dist/lib/Components/ReferenceLine/constants.d.ts.map +1 -1
- package/dist/lib/Components/ReferenceLine/constants.js +5 -5
- package/dist/lib/Components/ReferenceLine/utils.d.ts.map +1 -1
- package/dist/lib/Components/ReferenceLine/utils.js +15 -14
- package/dist/lib/Components/Scrubber/DefaultScrubberTooltip/DefaultScrubberTooltip.d.ts.map +1 -1
- package/dist/lib/Components/Scrubber/DefaultScrubberTooltip/DefaultScrubberTooltip.js +4 -2
- package/dist/lib/Components/Scrubber/Scrubber.d.ts.map +1 -1
- package/dist/lib/Components/Scrubber/Scrubber.js +34 -29
- package/dist/lib/Components/Scrubber/ScrubberProvider.d.ts.map +1 -1
- package/dist/lib/Components/Scrubber/ScrubberProvider.js +68 -67
- package/dist/lib/Components/Scrubber/utils.d.ts.map +1 -1
- package/dist/lib/Components/Scrubber/utils.js +30 -32
- package/dist/lib/utils/index.d.ts +1 -1
- package/dist/lib/utils/index.d.ts.map +1 -1
- package/dist/lib/utils/numbers.d.ts +13 -0
- package/dist/lib/utils/numbers.d.ts.map +1 -0
- package/dist/lib/utils/numbers.js +5 -0
- package/dist/lib/utils/ticks/ticks.d.ts +1 -11
- package/dist/lib/utils/ticks/ticks.d.ts.map +1 -1
- package/dist/lib/utils/ticks/ticks.js +19 -21
- package/dist/lib/utils/types.d.ts +26 -1
- package/dist/lib/utils/types.d.ts.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/monotone.js +69 -0
- package/dist/node_modules/d3-shape/src/curve/natural.js +41 -0
- package/dist/node_modules/d3-shape/src/curve/step.js +51 -0
- package/dist/package.json +3 -3
- package/package.json +3 -3
- package/dist/lib/Components/CartesianChart/RevealClip/RevealClipDefs.d.ts +0 -3
- package/dist/lib/Components/CartesianChart/RevealClip/RevealClipDefs.d.ts.map +0 -1
- package/dist/lib/Components/CartesianChart/RevealClip/RevealClipDefs.js +0 -41
- package/dist/lib/Components/CartesianChart/RevealClip/context.d.ts +0 -7
- package/dist/lib/Components/CartesianChart/RevealClip/context.d.ts.map +0 -1
- package/dist/lib/Components/CartesianChart/RevealClip/context.js +0 -6
- package/dist/lib/Components/CartesianChart/RevealClip/index.d.ts +0 -3
- package/dist/lib/Components/CartesianChart/RevealClip/index.d.ts.map +0 -1
- package/dist/lib/Components/CartesianChart/RevealClip/types.d.ts +0 -37
- package/dist/lib/Components/CartesianChart/RevealClip/types.d.ts.map +0 -1
- package/dist/lib/Components/CartesianChart/RevealClip/utils.d.ts +0 -17
- package/dist/lib/Components/CartesianChart/RevealClip/utils.d.ts.map +0 -1
- package/dist/lib/Components/CartesianChart/RevealClip/utils.js +0 -23
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
function a(t) {
|
|
2
|
+
return t < 0 ? -1 : 1;
|
|
3
|
+
}
|
|
4
|
+
function p(t, i, n) {
|
|
5
|
+
var s = t._x1 - t._x0, _ = i - t._x1, e = (t._y1 - t._y0) / (s || _ < 0 && -0), o = (n - t._y1) / (_ || s < 0 && -0), h = (e * _ + o * s) / (s + _);
|
|
6
|
+
return (a(e) + a(o)) * Math.min(Math.abs(e), Math.abs(o), 0.5 * Math.abs(h)) || 0;
|
|
7
|
+
}
|
|
8
|
+
function u(t, i) {
|
|
9
|
+
var n = t._x1 - t._x0;
|
|
10
|
+
return n ? (3 * (t._y1 - t._y0) / n - i) / 2 : i;
|
|
11
|
+
}
|
|
12
|
+
function c(t, i, n) {
|
|
13
|
+
var s = t._x0, _ = t._y0, e = t._x1, o = t._y1, h = (e - s) / 3;
|
|
14
|
+
t._context.bezierCurveTo(s + h, _ + h * i, e - h, o - h * n, e, o);
|
|
15
|
+
}
|
|
16
|
+
function r(t) {
|
|
17
|
+
this._context = t;
|
|
18
|
+
}
|
|
19
|
+
r.prototype = {
|
|
20
|
+
areaStart: function() {
|
|
21
|
+
this._line = 0;
|
|
22
|
+
},
|
|
23
|
+
areaEnd: function() {
|
|
24
|
+
this._line = NaN;
|
|
25
|
+
},
|
|
26
|
+
lineStart: function() {
|
|
27
|
+
this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0;
|
|
28
|
+
},
|
|
29
|
+
lineEnd: function() {
|
|
30
|
+
switch (this._point) {
|
|
31
|
+
case 2:
|
|
32
|
+
this._context.lineTo(this._x1, this._y1);
|
|
33
|
+
break;
|
|
34
|
+
case 3:
|
|
35
|
+
c(this, this._t0, u(this, this._t0));
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
39
|
+
},
|
|
40
|
+
point: function(t, i) {
|
|
41
|
+
var n = NaN;
|
|
42
|
+
if (t = +t, i = +i, !(t === this._x1 && i === this._y1)) {
|
|
43
|
+
switch (this._point) {
|
|
44
|
+
case 0:
|
|
45
|
+
this._point = 1, this._line ? this._context.lineTo(t, i) : this._context.moveTo(t, i);
|
|
46
|
+
break;
|
|
47
|
+
case 1:
|
|
48
|
+
this._point = 2;
|
|
49
|
+
break;
|
|
50
|
+
case 2:
|
|
51
|
+
this._point = 3, c(this, u(this, n = p(this, t, i)), n);
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
c(this, this._t0, n = p(this, t, i));
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = i, this._t0 = n;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
Object.create(r.prototype).point = function(t, i) {
|
|
62
|
+
r.prototype.point.call(this, i, t);
|
|
63
|
+
};
|
|
64
|
+
function l(t) {
|
|
65
|
+
return new r(t);
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
l as monotoneX
|
|
69
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
function a(i) {
|
|
2
|
+
this._context = i;
|
|
3
|
+
}
|
|
4
|
+
a.prototype = {
|
|
5
|
+
areaStart: function() {
|
|
6
|
+
this._line = 0;
|
|
7
|
+
},
|
|
8
|
+
areaEnd: function() {
|
|
9
|
+
this._line = NaN;
|
|
10
|
+
},
|
|
11
|
+
lineStart: function() {
|
|
12
|
+
this._x = [], this._y = [];
|
|
13
|
+
},
|
|
14
|
+
lineEnd: function() {
|
|
15
|
+
var i = this._x, t = this._y, n = i.length;
|
|
16
|
+
if (n)
|
|
17
|
+
if (this._line ? this._context.lineTo(i[0], t[0]) : this._context.moveTo(i[0], t[0]), n === 2)
|
|
18
|
+
this._context.lineTo(i[1], t[1]);
|
|
19
|
+
else
|
|
20
|
+
for (var s = h(i), o = h(t), e = 0, r = 1; r < n; ++e, ++r)
|
|
21
|
+
this._context.bezierCurveTo(s[0][e], o[0][e], s[1][e], o[1][e], i[r], t[r]);
|
|
22
|
+
(this._line || this._line !== 0 && n === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
|
|
23
|
+
},
|
|
24
|
+
point: function(i, t) {
|
|
25
|
+
this._x.push(+i), this._y.push(+t);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
function h(i) {
|
|
29
|
+
var t, n = i.length - 1, s, o = new Array(n), e = new Array(n), r = new Array(n);
|
|
30
|
+
for (o[0] = 0, e[0] = 2, r[0] = i[0] + 2 * i[1], t = 1; t < n - 1; ++t) o[t] = 1, e[t] = 4, r[t] = 4 * i[t] + 2 * i[t + 1];
|
|
31
|
+
for (o[n - 1] = 2, e[n - 1] = 7, r[n - 1] = 8 * i[n - 1] + i[n], t = 1; t < n; ++t) s = o[t] / e[t - 1], e[t] -= s, r[t] -= s * r[t - 1];
|
|
32
|
+
for (o[n - 1] = r[n - 1] / e[n - 1], t = n - 2; t >= 0; --t) o[t] = (r[t] - o[t + 1]) / e[t];
|
|
33
|
+
for (e[n - 1] = (i[n] + o[n - 1]) / 2, t = 0; t < n - 1; ++t) e[t] = 2 * i[t + 1] - o[t + 1];
|
|
34
|
+
return [o, e];
|
|
35
|
+
}
|
|
36
|
+
function l(i) {
|
|
37
|
+
return new a(i);
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
l as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
function n(t, i) {
|
|
2
|
+
this._context = t, this._t = i;
|
|
3
|
+
}
|
|
4
|
+
n.prototype = {
|
|
5
|
+
areaStart: function() {
|
|
6
|
+
this._line = 0;
|
|
7
|
+
},
|
|
8
|
+
areaEnd: function() {
|
|
9
|
+
this._line = NaN;
|
|
10
|
+
},
|
|
11
|
+
lineStart: function() {
|
|
12
|
+
this._x = this._y = NaN, this._point = 0;
|
|
13
|
+
},
|
|
14
|
+
lineEnd: function() {
|
|
15
|
+
0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line);
|
|
16
|
+
},
|
|
17
|
+
point: function(t, i) {
|
|
18
|
+
switch (t = +t, i = +i, this._point) {
|
|
19
|
+
case 0:
|
|
20
|
+
this._point = 1, this._line ? this._context.lineTo(t, i) : this._context.moveTo(t, i);
|
|
21
|
+
break;
|
|
22
|
+
case 1:
|
|
23
|
+
this._point = 2;
|
|
24
|
+
// falls through
|
|
25
|
+
default: {
|
|
26
|
+
if (this._t <= 0)
|
|
27
|
+
this._context.lineTo(this._x, i), this._context.lineTo(t, i);
|
|
28
|
+
else {
|
|
29
|
+
var e = this._x * (1 - this._t) + t * this._t;
|
|
30
|
+
this._context.lineTo(e, this._y), this._context.lineTo(e, i);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
this._x = t, this._y = i;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
function s(t) {
|
|
39
|
+
return new n(t, 0.5);
|
|
40
|
+
}
|
|
41
|
+
function h(t) {
|
|
42
|
+
return new n(t, 0);
|
|
43
|
+
}
|
|
44
|
+
function _(t) {
|
|
45
|
+
return new n(t, 1);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
s as default,
|
|
49
|
+
_ as stepAfter,
|
|
50
|
+
h as stepBefore
|
|
51
|
+
};
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-react-visualization",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@ledgerhq/lumen-design-core": "0.1.
|
|
37
|
-
"@ledgerhq/lumen-ui-react": "0.1.
|
|
36
|
+
"@ledgerhq/lumen-design-core": "0.1.17",
|
|
37
|
+
"@ledgerhq/lumen-ui-react": "0.1.40",
|
|
38
38
|
"class-variance-authority": "^0.7.1",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"react": "^18.0.0 || ^19.0.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-react-visualization",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@ledgerhq/lumen-design-core": "0.1.
|
|
37
|
-
"@ledgerhq/lumen-ui-react": "0.1.
|
|
36
|
+
"@ledgerhq/lumen-design-core": "0.1.17",
|
|
37
|
+
"@ledgerhq/lumen-ui-react": "0.1.41",
|
|
38
38
|
"class-variance-authority": "^0.7.1",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RevealClipDefs.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/CartesianChart/RevealClip/RevealClipDefs.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAMnD,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,MAAM,EACN,OAAc,EACd,WAAW,GACZ,EAAE,mBAAmB,2CA4CrB"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as i, Fragment as d, jsxs as F } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as x } from "react";
|
|
3
|
-
import { OVERFLOW_BUFFER as t } from "../utils.js";
|
|
4
|
-
import { RevealClipContext as D } from "./context.js";
|
|
5
|
-
import { useComputeDataFingerprint as y, useRevealClipAnimation as C } from "./utils.js";
|
|
6
|
-
const E = 0.8, R = "linear";
|
|
7
|
-
function O({
|
|
8
|
-
children: n,
|
|
9
|
-
drawingArea: e,
|
|
10
|
-
series: l,
|
|
11
|
-
animate: s = !0,
|
|
12
|
-
transitions: r
|
|
13
|
-
}) {
|
|
14
|
-
const m = !s, c = r?.enter?.duration ?? E, p = r?.enter?.easing ?? R, a = y({ series: l }), { clipId: o, animationStyle: u, keyframe: f } = C({
|
|
15
|
-
duration: c,
|
|
16
|
-
easing: p,
|
|
17
|
-
drawingArea: e
|
|
18
|
-
}), h = x(
|
|
19
|
-
() => ({
|
|
20
|
-
clipPathAttr: `url(#${o})`
|
|
21
|
-
}),
|
|
22
|
-
[o]
|
|
23
|
-
);
|
|
24
|
-
return m ? /* @__PURE__ */ i(d, { children: n }) : /* @__PURE__ */ F(D.Provider, { value: h, children: [
|
|
25
|
-
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: o, children: /* @__PURE__ */ i(
|
|
26
|
-
"rect",
|
|
27
|
-
{
|
|
28
|
-
x: e.x - t.left,
|
|
29
|
-
y: e.y - t.top,
|
|
30
|
-
height: e.height + t.top + t.bottom,
|
|
31
|
-
width: e.width + t.left + t.right,
|
|
32
|
-
style: { animation: u }
|
|
33
|
-
}
|
|
34
|
-
) }) }),
|
|
35
|
-
/* @__PURE__ */ i("style", { children: f }),
|
|
36
|
-
n
|
|
37
|
-
] }, a);
|
|
38
|
-
}
|
|
39
|
-
export {
|
|
40
|
-
O as RevealClipDefs
|
|
41
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
type RevealClipContextValue = {
|
|
2
|
-
clipPathAttr: string;
|
|
3
|
-
};
|
|
4
|
-
export declare const RevealClipContext: import('react').Context<RevealClipContextValue | undefined>;
|
|
5
|
-
export declare const useRevealClip: () => string | undefined;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/CartesianChart/RevealClip/context.ts"],"names":[],"mappings":"AAEA,KAAK,sBAAsB,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,6DAElB,CAAC;AAEb,eAAO,MAAM,aAAa,QAAO,MAAM,GAAG,SAEzC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/CartesianChart/RevealClip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DrawingArea, Series } from '../../../utils';
|
|
3
|
-
export type EnterTransitionConfig = {
|
|
4
|
-
/**
|
|
5
|
-
* Duration in seconds. @default 0.8
|
|
6
|
-
*/
|
|
7
|
-
duration?: number;
|
|
8
|
-
/**
|
|
9
|
-
* CSS easing function. @default 'linear'
|
|
10
|
-
*/
|
|
11
|
-
easing?: string;
|
|
12
|
-
};
|
|
13
|
-
export type RevealClipDefsProps = {
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* The drawing area whose bounds define the clip rectangle.
|
|
17
|
-
*/
|
|
18
|
-
drawingArea: DrawingArea;
|
|
19
|
-
/**
|
|
20
|
-
* Whether to animate the chart.
|
|
21
|
-
* @default true
|
|
22
|
-
*/
|
|
23
|
-
animate?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Transition configuration.
|
|
26
|
-
* @default { enter: { duration: 0.8, easing: 'linear' } }
|
|
27
|
-
*/
|
|
28
|
-
transitions?: {
|
|
29
|
-
enter?: EnterTransitionConfig;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Data series used to compute a fingerprint that restarts
|
|
33
|
-
* the animation when data changes.
|
|
34
|
-
*/
|
|
35
|
-
series: Series[];
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/CartesianChart/RevealClip/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,qBAAqB,CAAA;KAAE,CAAC;IAChD;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DrawingArea, Series } from '../../../utils/types';
|
|
2
|
-
type RevealClipAnimationConfig = {
|
|
3
|
-
duration: number;
|
|
4
|
-
easing: string;
|
|
5
|
-
drawingArea: DrawingArea;
|
|
6
|
-
};
|
|
7
|
-
type RevealClipAnimationResult = {
|
|
8
|
-
clipId: string;
|
|
9
|
-
animationStyle: string;
|
|
10
|
-
keyframe: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const useRevealClipAnimation: ({ duration, easing, drawingArea, }: RevealClipAnimationConfig) => RevealClipAnimationResult;
|
|
13
|
-
export declare const useComputeDataFingerprint: ({ series, }: {
|
|
14
|
-
series: Series[];
|
|
15
|
-
}) => string;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/CartesianChart/RevealClip/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGhE,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,oCAIpC,yBAAyB,KAAG,yBAY9B,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,aAEvC;IACD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,KAAG,MAEH,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useId as a, useMemo as n } from "react";
|
|
2
|
-
import { OVERFLOW_BUFFER as m } from "../utils.js";
|
|
3
|
-
const s = ({
|
|
4
|
-
duration: t,
|
|
5
|
-
easing: e,
|
|
6
|
-
drawingArea: r
|
|
7
|
-
}) => {
|
|
8
|
-
const o = a(), i = `reveal-clip-${o.replaceAll(":", "")}`;
|
|
9
|
-
return n(
|
|
10
|
-
() => ({
|
|
11
|
-
clipId: o,
|
|
12
|
-
animationStyle: `${i} ${t}s ${e} forwards`,
|
|
13
|
-
keyframe: `@keyframes ${i} { from { width: 0; } to { width: ${r.width + m.left + m.right}px; } }`
|
|
14
|
-
}),
|
|
15
|
-
[o, i, t, e, r.width]
|
|
16
|
-
);
|
|
17
|
-
}, c = ({
|
|
18
|
-
series: t
|
|
19
|
-
}) => t.map((e) => e.data?.join(",") ?? "").join("|");
|
|
20
|
-
export {
|
|
21
|
-
c as useComputeDataFingerprint,
|
|
22
|
-
s as useRevealClipAnimation
|
|
23
|
-
};
|