@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scrubber.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Scrubber/Scrubber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Scrubber.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Scrubber/Scrubber.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAY7C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,QAAgB,EAChB,WAAmB,EACnB,WAAmB,EACnB,OAAO,GACR,EAAE,QAAQ,CAAC,aAAa,CAAC,kDAwJzB"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsxs as f, jsx as i, Fragment as
|
|
2
|
-
import { useId as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as f, jsx as i, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { useId as D, useMemo as u } from "react";
|
|
3
|
+
import { LINE_DEFAULT_STROKE_COLOR as N } from "../Line/constants.js";
|
|
4
|
+
import { DefaultScrubberTooltip as P } from "./DefaultScrubberTooltip/DefaultScrubberTooltip.js";
|
|
5
|
+
import { resolvePixelX as X, resolvePixelY as w, LINE_GRADIENT_EDGE_OPACITY as O, OVERLAY_OPACITY as F, BEACON_STROKE_WIDTH as G, BEACON_RADIUS as U, OVERLAY_OFFSET as m, OVERLAY_LINE_INSET as C } from "./utils.js";
|
|
6
|
+
import { useScrubberContext as V } from "./context/scrubberContext.js";
|
|
6
7
|
import { useCartesianChartContext as H } from "../CartesianChart/context/cartesianChartContext.js";
|
|
7
8
|
import { cssVar as o } from "../../../libs/design-core/dist/lib/cssVar/cssVar.js";
|
|
8
|
-
function
|
|
9
|
-
hideLine:
|
|
10
|
-
hideOverlay:
|
|
9
|
+
function Q({
|
|
10
|
+
hideLine: _ = !1,
|
|
11
|
+
hideOverlay: A = !1,
|
|
11
12
|
showBeacons: n = !1,
|
|
12
13
|
tooltip: d
|
|
13
14
|
}) {
|
|
14
|
-
const
|
|
15
|
+
const p = D(), { scrubberPosition: e } = V(), {
|
|
15
16
|
getXScale: v,
|
|
16
17
|
getXAxisConfig: b,
|
|
17
18
|
getYScale: h,
|
|
@@ -21,9 +22,13 @@ function B({
|
|
|
21
22
|
} = H(), r = u(() => {
|
|
22
23
|
if (e !== void 0)
|
|
23
24
|
return X(e, v, b());
|
|
24
|
-
}, [e, v, b]),
|
|
25
|
-
const c = g.get(t.id)?.data,
|
|
26
|
-
return
|
|
25
|
+
}, [e, v, b]), T = u(() => e === void 0 || !n ? [] : y.map((t) => {
|
|
26
|
+
const c = g.get(t.id)?.data, E = w(e, c, h);
|
|
27
|
+
return E === void 0 ? null : {
|
|
28
|
+
id: t.id,
|
|
29
|
+
stroke: t.stroke || N,
|
|
30
|
+
pixelY: E
|
|
31
|
+
};
|
|
27
32
|
}).filter(
|
|
28
33
|
(t) => t !== null
|
|
29
34
|
), [e, n, y, g, h]), s = u(() => {
|
|
@@ -46,16 +51,16 @@ function B({
|
|
|
46
51
|
y: a,
|
|
47
52
|
width: S,
|
|
48
53
|
height: l
|
|
49
|
-
} = x,
|
|
54
|
+
} = x, Y = r + C, k = a - m, W = Math.max(
|
|
50
55
|
0,
|
|
51
|
-
I + S - r -
|
|
52
|
-
),
|
|
56
|
+
I + S - r - C + m
|
|
57
|
+
), L = l + m * 2;
|
|
53
58
|
return /* @__PURE__ */ f("g", { "data-testid": "scrubber", children: [
|
|
54
|
-
!
|
|
59
|
+
!_ && /* @__PURE__ */ f(R, { children: [
|
|
55
60
|
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ f(
|
|
56
61
|
"linearGradient",
|
|
57
62
|
{
|
|
58
|
-
id:
|
|
63
|
+
id: p,
|
|
59
64
|
gradientUnits: "userSpaceOnUse",
|
|
60
65
|
x1: r,
|
|
61
66
|
y1: a,
|
|
@@ -67,7 +72,7 @@ function B({
|
|
|
67
72
|
{
|
|
68
73
|
offset: "0%",
|
|
69
74
|
stopColor: o("var(--border-base)"),
|
|
70
|
-
stopOpacity:
|
|
75
|
+
stopOpacity: O
|
|
71
76
|
}
|
|
72
77
|
),
|
|
73
78
|
/* @__PURE__ */ i("stop", { offset: "20%", stopColor: o("var(--border-base)") }),
|
|
@@ -77,7 +82,7 @@ function B({
|
|
|
77
82
|
{
|
|
78
83
|
offset: "100%",
|
|
79
84
|
stopColor: o("var(--border-base)"),
|
|
80
|
-
stopOpacity:
|
|
85
|
+
stopOpacity: O
|
|
81
86
|
}
|
|
82
87
|
)
|
|
83
88
|
]
|
|
@@ -91,30 +96,30 @@ function B({
|
|
|
91
96
|
y1: a,
|
|
92
97
|
x2: r,
|
|
93
98
|
y2: a + l,
|
|
94
|
-
stroke: `url(#${
|
|
99
|
+
stroke: `url(#${p})`,
|
|
95
100
|
strokeWidth: o("var(--stroke-1)")
|
|
96
101
|
}
|
|
97
102
|
)
|
|
98
103
|
] }),
|
|
99
|
-
!
|
|
104
|
+
!A && /* @__PURE__ */ i(
|
|
100
105
|
"rect",
|
|
101
106
|
{
|
|
102
107
|
"data-testid": "scrubber-overlay",
|
|
103
|
-
x:
|
|
104
|
-
y:
|
|
108
|
+
x: Y,
|
|
109
|
+
y: k,
|
|
105
110
|
width: W,
|
|
106
|
-
height:
|
|
111
|
+
height: L,
|
|
107
112
|
fill: o("var(--background-base)"),
|
|
108
|
-
opacity:
|
|
113
|
+
opacity: F
|
|
109
114
|
}
|
|
110
115
|
),
|
|
111
|
-
n &&
|
|
116
|
+
n && T.map((t) => /* @__PURE__ */ i(
|
|
112
117
|
"circle",
|
|
113
118
|
{
|
|
114
119
|
"data-testid": `scrubber-beacon-${t.id}`,
|
|
115
120
|
cx: r,
|
|
116
121
|
cy: t.pixelY,
|
|
117
|
-
r:
|
|
122
|
+
r: U,
|
|
118
123
|
fill: t.stroke,
|
|
119
124
|
stroke: o("var(--background-canvas)"),
|
|
120
125
|
strokeWidth: G
|
|
@@ -122,7 +127,7 @@ function B({
|
|
|
122
127
|
t.id
|
|
123
128
|
)),
|
|
124
129
|
s !== void 0 && /* @__PURE__ */ i(
|
|
125
|
-
|
|
130
|
+
P,
|
|
126
131
|
{
|
|
127
132
|
pixelX: r,
|
|
128
133
|
drawingArea: x,
|
|
@@ -135,5 +140,5 @@ function B({
|
|
|
135
140
|
] });
|
|
136
141
|
}
|
|
137
142
|
export {
|
|
138
|
-
|
|
143
|
+
Q as Scrubber
|
|
139
144
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrubberProvider.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Scrubber/ScrubberProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScrubberProvider.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Scrubber/ScrubberProvider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAwB,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAQ3E,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,MAAM,EACN,eAAe,EACf,wBAAwB,EACxB,YAAgB,GACjB,EAAE,QAAQ,CAAC,qBAAqB,CAAC,2CA+NjC"}
|
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as q } from "react/jsx-runtime";
|
|
2
|
+
import { useState as K, useRef as k, useMemo as X, useCallback as c, useEffect as j } from "react";
|
|
3
|
+
import { clamp as p } from "../../utils/numbers.js";
|
|
4
|
+
import { buildSortedMagnets as z, getDataIndexFromPosition as H, resolvePixelX as N, applyMagnetization as U } from "./utils.js";
|
|
5
|
+
import { useCartesianChartContext as V } from "../CartesianChart/context/cartesianChartContext.js";
|
|
6
|
+
import { useMagneticPointsContext as G } from "../Point/pointContext/magneticPointsContext.js";
|
|
7
|
+
import { ScrubberContextProvider as J } from "./context/scrubberContext.js";
|
|
8
|
+
function S({
|
|
9
|
+
children: R,
|
|
10
|
+
svgRef: D,
|
|
10
11
|
enableScrubbing: r,
|
|
11
|
-
onScrubberPositionChange:
|
|
12
|
-
magnetRadius:
|
|
12
|
+
onScrubberPositionChange: y,
|
|
13
|
+
magnetRadius: E = 8
|
|
13
14
|
}) {
|
|
14
|
-
const { getXScale: f, getXAxisConfig:
|
|
15
|
+
const { getXScale: f, getXAxisConfig: v, dataLength: n } = V(), { getMagneticPoints: w, version: T } = G(), [m, B] = K(
|
|
15
16
|
void 0
|
|
16
|
-
), h =
|
|
17
|
-
h.current =
|
|
18
|
-
const
|
|
19
|
-
const t =
|
|
20
|
-
return
|
|
17
|
+
), h = k(m);
|
|
18
|
+
h.current = m;
|
|
19
|
+
const g = k(null), l = k(0), A = X(() => {
|
|
20
|
+
const t = w();
|
|
21
|
+
return z({
|
|
21
22
|
magneticIndices: t,
|
|
22
|
-
getPixelForIndex: (e) =>
|
|
23
|
+
getPixelForIndex: (e) => N(e, f, v())
|
|
23
24
|
});
|
|
24
|
-
}, [
|
|
25
|
+
}, [T, w, f, v]), i = c(
|
|
25
26
|
(t) => {
|
|
26
|
-
const e = t === void 0 ? void 0 :
|
|
27
|
-
|
|
27
|
+
const e = t === void 0 || n <= 0 ? void 0 : p(t, 0, n - 1);
|
|
28
|
+
B(e), y?.(e);
|
|
28
29
|
},
|
|
29
|
-
[
|
|
30
|
-
),
|
|
30
|
+
[n, y]
|
|
31
|
+
), I = c(
|
|
31
32
|
(t) => {
|
|
32
33
|
const e = f();
|
|
33
|
-
if (!e || !r ||
|
|
34
|
-
const a =
|
|
35
|
-
let o =
|
|
34
|
+
if (!e || !r || n <= 0) return;
|
|
35
|
+
const a = v();
|
|
36
|
+
let o = H(
|
|
36
37
|
t,
|
|
37
38
|
e,
|
|
38
39
|
a,
|
|
39
|
-
|
|
40
|
+
n
|
|
40
41
|
);
|
|
41
|
-
|
|
42
|
+
E > 0 && (o = U({
|
|
42
43
|
resolvedIndex: o,
|
|
43
44
|
pixelX: t,
|
|
44
|
-
sortedMagnets:
|
|
45
|
-
magnetRadius:
|
|
45
|
+
sortedMagnets: A,
|
|
46
|
+
magnetRadius: E
|
|
46
47
|
})), o !== h.current && i(o);
|
|
47
48
|
},
|
|
48
49
|
[
|
|
49
50
|
r,
|
|
50
51
|
f,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
v,
|
|
53
|
+
n,
|
|
54
|
+
A,
|
|
55
|
+
E,
|
|
55
56
|
i
|
|
56
57
|
]
|
|
57
|
-
), u =
|
|
58
|
+
), u = c(
|
|
58
59
|
(t) => {
|
|
59
|
-
|
|
60
|
+
g.current = t, l.current || (l.current = requestAnimationFrame(() => {
|
|
60
61
|
l.current = 0;
|
|
61
|
-
const e =
|
|
62
|
-
e !== null && (
|
|
62
|
+
const e = g.current;
|
|
63
|
+
e !== null && (g.current = null, I(e));
|
|
63
64
|
}));
|
|
64
65
|
},
|
|
65
|
-
[
|
|
66
|
-
),
|
|
66
|
+
[I]
|
|
67
|
+
), s = c(() => {
|
|
67
68
|
r && i(void 0);
|
|
68
|
-
}, [r, i]),
|
|
69
|
+
}, [r, i]), L = c(
|
|
69
70
|
(t) => {
|
|
70
71
|
const a = t.currentTarget.getBoundingClientRect();
|
|
71
72
|
u(t.clientX - a.left);
|
|
72
73
|
},
|
|
73
74
|
[u]
|
|
74
|
-
),
|
|
75
|
+
), x = c(
|
|
75
76
|
(t) => {
|
|
76
77
|
if (!r || !t.touches.length) return;
|
|
77
78
|
const e = t.touches[0], o = t.currentTarget.getBoundingClientRect();
|
|
78
79
|
u(e.clientX - o.left);
|
|
79
80
|
},
|
|
80
81
|
[r, u]
|
|
81
|
-
),
|
|
82
|
+
), P = c(
|
|
82
83
|
(t) => {
|
|
83
84
|
if (!t.touches.length) return;
|
|
84
85
|
t.preventDefault();
|
|
@@ -86,17 +87,17 @@ function _({
|
|
|
86
87
|
u(e.clientX - o.left);
|
|
87
88
|
},
|
|
88
89
|
[u]
|
|
89
|
-
),
|
|
90
|
+
), C = c(
|
|
90
91
|
(t) => {
|
|
91
|
-
if (!r ||
|
|
92
|
-
const e =
|
|
92
|
+
if (!r || n <= 0) return;
|
|
93
|
+
const e = n - 1, a = h.current ?? e, o = t.shiftKey ? p(Math.floor(e * 0.1), 1, 10) : 1;
|
|
93
94
|
let d;
|
|
94
95
|
switch (t.key) {
|
|
95
96
|
case "ArrowLeft":
|
|
96
|
-
t.preventDefault(), d =
|
|
97
|
+
t.preventDefault(), d = p(a - o, 0, e);
|
|
97
98
|
break;
|
|
98
99
|
case "ArrowRight":
|
|
99
|
-
t.preventDefault(), d =
|
|
100
|
+
t.preventDefault(), d = p(a + o, 0, e);
|
|
100
101
|
break;
|
|
101
102
|
case "Home":
|
|
102
103
|
t.preventDefault(), d = 0;
|
|
@@ -112,36 +113,36 @@ function _({
|
|
|
112
113
|
}
|
|
113
114
|
i(d);
|
|
114
115
|
},
|
|
115
|
-
[r,
|
|
116
|
-
),
|
|
117
|
-
!r || h.current === void 0 ||
|
|
118
|
-
}, [r,
|
|
119
|
-
|
|
120
|
-
const t =
|
|
116
|
+
[r, n, i]
|
|
117
|
+
), M = c(() => {
|
|
118
|
+
!r || h.current === void 0 || s();
|
|
119
|
+
}, [r, s]);
|
|
120
|
+
j(() => {
|
|
121
|
+
const t = D.current;
|
|
121
122
|
if (!(!t || !r))
|
|
122
|
-
return t.addEventListener("mousemove",
|
|
123
|
-
t.removeEventListener("mousemove",
|
|
123
|
+
return t.addEventListener("mousemove", L), t.addEventListener("mouseleave", s), t.addEventListener("touchstart", x, { passive: !1 }), t.addEventListener("touchmove", P, { passive: !1 }), t.addEventListener("touchend", s), t.addEventListener("touchcancel", s), t.addEventListener("keydown", C), t.addEventListener("blur", M), () => {
|
|
124
|
+
t.removeEventListener("mousemove", L), t.removeEventListener("mouseleave", s), t.removeEventListener("touchstart", x), t.removeEventListener("touchmove", P), t.removeEventListener("touchend", s), t.removeEventListener("touchcancel", s), t.removeEventListener("keydown", C), t.removeEventListener("blur", M), cancelAnimationFrame(l.current), l.current = 0;
|
|
124
125
|
};
|
|
125
126
|
}, [
|
|
126
|
-
|
|
127
|
+
D,
|
|
127
128
|
r,
|
|
128
|
-
E,
|
|
129
|
-
n,
|
|
130
|
-
g,
|
|
131
129
|
L,
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
s,
|
|
131
|
+
x,
|
|
132
|
+
P,
|
|
133
|
+
C,
|
|
134
|
+
M
|
|
134
135
|
]);
|
|
135
|
-
const
|
|
136
|
+
const F = X(
|
|
136
137
|
() => ({
|
|
137
138
|
enableScrubbing: r,
|
|
138
|
-
scrubberPosition:
|
|
139
|
+
scrubberPosition: m,
|
|
139
140
|
onScrubberPositionChange: i
|
|
140
141
|
}),
|
|
141
|
-
[r,
|
|
142
|
+
[r, m, i]
|
|
142
143
|
);
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
+
return /* @__PURE__ */ q(J, { value: F, children: R });
|
|
144
145
|
}
|
|
145
146
|
export {
|
|
146
|
-
|
|
147
|
+
S as ScrubberProvider
|
|
147
148
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Scrubber/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Scrubber/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAE1E,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAC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AAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,SAAS,WAAW,EAAE,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;CACtB,KAAG,MAWH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { clamp as f } from "../../utils/numbers.js";
|
|
2
|
+
import { getPointOnScale as a, isNumericScale as u, isCategoricalScale as d } from "../../utils/scales/scales.js";
|
|
3
|
+
const E = 5, m = 2, A = 2, I = 0.5, O = 0.8, _ = 0.1, S = ({
|
|
3
4
|
magneticIndices: o,
|
|
4
5
|
getPixelForIndex: i
|
|
5
6
|
}) => {
|
|
@@ -10,7 +11,7 @@ const v = 5, E = 2, m = 2, p = 0.5, A = 0.8, I = 0.1, O = ({
|
|
|
10
11
|
t !== void 0 && n.push({ index: e, pixelX: t });
|
|
11
12
|
}
|
|
12
13
|
return n.sort((e, t) => e.pixelX - t.pixelX), n;
|
|
13
|
-
},
|
|
14
|
+
}, h = (o) => typeof o[0] == "number", l = (o, i, n) => {
|
|
14
15
|
let e = 0, t = 1 / 0;
|
|
15
16
|
for (let r = 0; r < o; r++) {
|
|
16
17
|
const c = n(r);
|
|
@@ -19,41 +20,38 @@ const v = 5, E = 2, m = 2, p = 0.5, A = 0.8, I = 0.1, O = ({
|
|
|
19
20
|
s < t && (t = s, e = r);
|
|
20
21
|
}
|
|
21
22
|
return e;
|
|
22
|
-
},
|
|
23
|
-
if (
|
|
23
|
+
}, b = (o, i, n, e) => {
|
|
24
|
+
if (d(i)) {
|
|
24
25
|
const t = i.domain(), r = i.bandwidth();
|
|
25
|
-
return
|
|
26
|
+
return l(t.length, o, (c) => {
|
|
26
27
|
const s = i(t[c]);
|
|
27
28
|
return s === void 0 ? void 0 : s + r / 2;
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
if (
|
|
31
|
+
if (u(i)) {
|
|
31
32
|
const t = n?.data;
|
|
32
|
-
if (t && t.length > 0 &&
|
|
33
|
-
return
|
|
33
|
+
if (t && t.length > 0 && h(t))
|
|
34
|
+
return l(
|
|
34
35
|
t.length,
|
|
35
36
|
o,
|
|
36
37
|
(c) => i(t[c])
|
|
37
38
|
);
|
|
38
39
|
const r = i.invert(o);
|
|
39
|
-
return Math.
|
|
40
|
-
0,
|
|
41
|
-
Math.min(Math.round(r), e - 1)
|
|
42
|
-
);
|
|
40
|
+
return f(Math.round(r), 0, e - 1);
|
|
43
41
|
}
|
|
44
42
|
return 0;
|
|
45
|
-
},
|
|
43
|
+
}, N = (o, i, n) => {
|
|
46
44
|
const e = n();
|
|
47
|
-
if (!e || !
|
|
45
|
+
if (!e || !u(e) || !i) return;
|
|
48
46
|
const t = i[o];
|
|
49
47
|
if (t != null)
|
|
50
48
|
return e(t);
|
|
51
|
-
},
|
|
49
|
+
}, T = (o, i, n) => {
|
|
52
50
|
const e = i();
|
|
53
51
|
if (!e) return;
|
|
54
52
|
const t = n?.data?.[o];
|
|
55
|
-
return
|
|
56
|
-
},
|
|
53
|
+
return a(typeof t == "number" ? t : o, e);
|
|
54
|
+
}, p = (o, i) => {
|
|
57
55
|
if (o.length === 0) return -1;
|
|
58
56
|
let n = 0, e = o.length;
|
|
59
57
|
for (; n < e; ) {
|
|
@@ -64,27 +62,27 @@ const v = 5, E = 2, m = 2, p = 0.5, A = 0.8, I = 0.1, O = ({
|
|
|
64
62
|
if (n === o.length) return n - 1;
|
|
65
63
|
const t = i - o[n - 1].pixelX, r = o[n].pixelX - i;
|
|
66
64
|
return t <= r ? n - 1 : n;
|
|
67
|
-
},
|
|
65
|
+
}, y = ({
|
|
68
66
|
resolvedIndex: o,
|
|
69
67
|
pixelX: i,
|
|
70
68
|
sortedMagnets: n,
|
|
71
69
|
magnetRadius: e
|
|
72
70
|
}) => {
|
|
73
71
|
if (e <= 0 || n.length === 0) return o;
|
|
74
|
-
const t =
|
|
72
|
+
const t = p(n, i);
|
|
75
73
|
return t >= 0 && Math.abs(n[t].pixelX - i) <= e ? n[t].index : o;
|
|
76
74
|
};
|
|
77
75
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
E as BEACON_RADIUS,
|
|
77
|
+
m as BEACON_STROKE_WIDTH,
|
|
78
|
+
_ as LINE_GRADIENT_EDGE_OPACITY,
|
|
79
|
+
I as OVERLAY_LINE_INSET,
|
|
80
|
+
A as OVERLAY_OFFSET,
|
|
81
|
+
O as OVERLAY_OPACITY,
|
|
82
|
+
y as applyMagnetization,
|
|
83
|
+
S as buildSortedMagnets,
|
|
84
|
+
b as getDataIndexFromPosition,
|
|
85
|
+
p as nearestIndex,
|
|
86
|
+
T as resolvePixelX,
|
|
87
|
+
N as resolvePixelY
|
|
90
88
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { CartesianChartContextValue, CategoricalScale, ChartInset, ChartScaleFunction, DrawingArea, NumericScale, Series, } from './types';
|
|
1
|
+
export type { CartesianChartContextValue, CategoricalScale, ChartInset, ChartScaleFunction, CurveType, DrawingArea, NumericScale, Series, } from './types';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,MAAM,GACP,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,GACP,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type guard for a finite number. Narrows out `null`, `undefined`, `NaN` and
|
|
3
|
+
* `Infinity`, i.e. any value that cannot be projected to a valid coordinate or
|
|
4
|
+
* counted as a drawable data point.
|
|
5
|
+
*/
|
|
6
|
+
export declare const isFiniteNumber: (value: unknown) => value is number;
|
|
7
|
+
/**
|
|
8
|
+
* Constrains `value` to the inclusive `[min, max]` range. For a degenerate
|
|
9
|
+
* range where `min > max` (e.g. an index range `[0, length - 1]` for empty
|
|
10
|
+
* data), `min` takes precedence and is returned — matching `lodash.clamp`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
13
|
+
//# sourceMappingURL=numbers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/numbers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MACjC,CAAC;AAEzB;;;;GAIG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MAC3B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseAxisProps } from '../../Components/Axis';
|
|
2
|
-
import { ChartScaleFunction
|
|
2
|
+
import { ChartScaleFunction } from '../types';
|
|
3
3
|
export declare const APPROXIMATE_TICK_COUNT = 5;
|
|
4
4
|
export type TickData = {
|
|
5
5
|
position: number;
|
|
@@ -32,14 +32,4 @@ export declare const getTickLabel: (tick: number, axisData: BaseAxisProps["data"
|
|
|
32
32
|
* Builds the complete tick data array from a scale and axis configuration.
|
|
33
33
|
*/
|
|
34
34
|
export declare const buildTicksData: (scale: ChartScaleFunction, axisConfig?: BaseAxisProps, explicitTicks?: number[], formatter?: (value: number | string) => string) => TickData[];
|
|
35
|
-
/**
|
|
36
|
-
* Excludes the X grid line at the Y-axis origin (left edge)
|
|
37
|
-
* to prevent overlap with the Y-axis solid line.
|
|
38
|
-
*/
|
|
39
|
-
export declare const isTickOnXAxisDomainEdge: (tick: TickData, drawingArea: DrawingArea) => boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Excludes the Y grid line at the X-axis origin (bottom edge)
|
|
42
|
-
* to prevent overlap with the X-axis solid line.
|
|
43
|
-
*/
|
|
44
|
-
export declare const isTickOnYAxisDomainEdge: (tick: TickData, drawingArea: DrawingArea) => boolean;
|
|
45
35
|
//# sourceMappingURL=ticks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticks.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/ticks/ticks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"ticks.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/ticks/ticks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,kBAAkB,EACzB,gBAAgB,MAAM,EAAE,EACxB,WAAW,aAAa,CAAC,MAAM,CAAC,KAC/B,MAAM,EAUR,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,kBAAkB,EACzB,MAAM,MAAM,KACX,MAKF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,EACZ,UAAU,aAAa,CAAC,MAAM,CAAC,EAC/B,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,KAC7C,MAeF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,kBAAkB,EACzB,aAAa,aAAa,EAC1B,gBAAgB,MAAM,EAAE,EACxB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,KAC7C,QAAQ,EASV,CAAC"}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import { isCategoricalScale as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
if (
|
|
5
|
-
const t =
|
|
6
|
-
return String(
|
|
1
|
+
import { isCategoricalScale as g, isNumericScale as i } from "../scales/scales.js";
|
|
2
|
+
const f = 5, d = (r, n, e) => n && n.length > 0 ? n : e && e.length > 0 ? typeof e[0] == "number" ? e : e.map((o, t) => t) : g(r) ? r.domain() : i(r) ? r.ticks(f) : [], b = (r, n) => g(r) ? (r(n) ?? 0) + r.bandwidth() / 2 : r(n), l = (r, n, e) => {
|
|
3
|
+
const o = n && Array.isArray(n) && typeof n[0] == "string";
|
|
4
|
+
if (e) {
|
|
5
|
+
const t = o && n[r] !== void 0 ? n[r] : r;
|
|
6
|
+
return String(e(t));
|
|
7
7
|
}
|
|
8
|
-
return
|
|
9
|
-
},
|
|
10
|
-
const t =
|
|
11
|
-
return
|
|
12
|
-
position:
|
|
13
|
-
value:
|
|
14
|
-
label:
|
|
8
|
+
return o && n[r] !== void 0 ? String(n[r]) : String(r);
|
|
9
|
+
}, p = (r, n, e, o) => {
|
|
10
|
+
const t = n?.data;
|
|
11
|
+
return d(r, e, t).map((u) => ({
|
|
12
|
+
position: b(r, u),
|
|
13
|
+
value: u,
|
|
14
|
+
label: l(u, t, o)
|
|
15
15
|
}));
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
h as isTickOnXAxisDomainEdge,
|
|
24
|
-
l as isTickOnYAxisDomainEdge
|
|
18
|
+
f as APPROXIMATE_TICK_COUNT,
|
|
19
|
+
p as buildTicksData,
|
|
20
|
+
l as getTickLabel,
|
|
21
|
+
b as getTickPosition,
|
|
22
|
+
d as getTickValues
|
|
25
23
|
};
|
|
@@ -15,6 +15,18 @@ export type DrawingArea = {
|
|
|
15
15
|
width: number;
|
|
16
16
|
height: number;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Interpolation used to draw a line (and its area) between data points.
|
|
20
|
+
* Each value maps to a [d3-shape](https://d3js.org/d3-shape/curve) curve:
|
|
21
|
+
* - `'bump'` — smooth cubic curve with horizontal tangents (`curveBumpX`).
|
|
22
|
+
* - `'natural'` — natural cubic spline through every point (`curveNatural`).
|
|
23
|
+
* - `'monotone'` — smooth curve that preserves monotonicity (`curveMonotoneX`).
|
|
24
|
+
* - `'linear'` — straight segments between points (`curveLinear`).
|
|
25
|
+
* - `'step'` — stepped, piecewise-constant line (`curveStep`).
|
|
26
|
+
* - `'stepAfter'` — stepped line where changes occur after the x-coordinate (`curveStepAfter`).
|
|
27
|
+
* - `'stepBefore'` — stepped line where changes occur before the x-coordinate (`curveStepBefore`).
|
|
28
|
+
*/
|
|
29
|
+
export type CurveType = 'bump' | 'natural' | 'monotone' | 'linear' | 'step' | 'stepAfter' | 'stepBefore';
|
|
18
30
|
export type Series = {
|
|
19
31
|
/**
|
|
20
32
|
* Unique identifier for the series.
|
|
@@ -30,8 +42,21 @@ export type Series = {
|
|
|
30
42
|
label?: string;
|
|
31
43
|
/**
|
|
32
44
|
* CSS color applied to the series line/mark.
|
|
45
|
+
* @default border-muted
|
|
46
|
+
*/
|
|
47
|
+
stroke?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Interpolation used to draw the line between data points.
|
|
50
|
+
* @default 'bump'
|
|
51
|
+
*/
|
|
52
|
+
curve?: CurveType;
|
|
53
|
+
/**
|
|
54
|
+
* When true, skips null values and draws a continuous line across gaps.
|
|
55
|
+
* When false (default), null values create gaps in the line.
|
|
56
|
+
* Overridden by the chart-level `connectNulls` prop when that is set.
|
|
57
|
+
* @default false
|
|
33
58
|
*/
|
|
34
|
-
|
|
59
|
+
connectNulls?: boolean;
|
|
35
60
|
};
|
|
36
61
|
export type NumericScale = ScaleLinear<number, number> | ScaleLogarithmic<number, number>;
|
|
37
62
|
export type CategoricalScale = ScaleBand<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/types.ts"],"names":[],"mappings":"A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