@ledgerhq/lumen-ui-react-visualization 0.1.22 → 0.1.23

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.
@@ -1,3 +1,3 @@
1
1
  import { LineProps } from './types';
2
- export declare function Line({ seriesId, stroke, showArea, areaType: _areaType, curve, connectNulls, }: LineProps): import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const Line: import('react').NamedExoticComponent<LineProps>;
3
3
  //# sourceMappingURL=Line.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Line/Line.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,MAAM,EACN,QAAgB,EAChB,QAAQ,EAAE,SAAsB,EAChC,KAAK,EACL,YAAY,GACb,EAAE,SAAS,kDAwFX"}
1
+ {"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Line/Line.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,eAAO,MAAM,IAAI,iDA+Ff,CAAC"}
@@ -1,20 +1,20 @@
1
1
  import { jsxs as c, jsx as o, Fragment as T } from "react/jsx-runtime";
2
- import { useId as k, useMemo as d } from "react";
3
- import { isNumericScale as y } from "../../utils/scales/scales.js";
4
- import { LINE_DEFAULT_STROKE_COLOR as A, LINE_AREA_GRADIENT_OPACITY as N, LINE_STROKE_WIDTH as O } from "./constants.js";
5
- import { toScaledPoints as v, buildLinePath as R, buildAreaPath as D } from "./utils.js";
6
- import { useCartesianChartContext as j } from "../CartesianChart/context/cartesianChartContext.js";
7
- import { usePathReveal as b } from "../CartesianChart/RevealAnimation/context.js";
8
- function U({
2
+ import { memo as k, useId as y, useMemo as d } from "react";
3
+ import { isNumericScale as A } from "../../utils/scales/scales.js";
4
+ import { LINE_DEFAULT_STROKE_COLOR as N, LINE_AREA_GRADIENT_OPACITY as O, LINE_STROKE_WIDTH as v } from "./constants.js";
5
+ import { toScaledPoints as R, buildLinePath as D, buildAreaPath as j } from "./utils.js";
6
+ import { useCartesianChartContext as b } from "../CartesianChart/context/cartesianChartContext.js";
7
+ import { usePathReveal as F } from "../CartesianChart/RevealAnimation/context.js";
8
+ const q = k(function({
9
9
  seriesId: g,
10
10
  stroke: C,
11
11
  showArea: s = !1,
12
- areaType: F = "gradient",
12
+ areaType: K = "gradient",
13
13
  curve: x,
14
14
  connectNulls: L
15
15
  }) {
16
- const { getXScale: S, getYScale: _, getXAxisConfig: E, drawingArea: i, seriesMap: I } = j(), P = b(), l = S(), n = _(), p = E(), u = k(), t = I.get(g), r = (C ?? t?.stroke) || A, a = x ?? t?.curve, f = L ?? t?.connectNulls ?? !1, e = d(
17
- () => t?.data && l && n && y(n) ? v(
16
+ const { getXScale: S, getYScale: _, getXAxisConfig: E, drawingArea: i, seriesMap: I } = b(), P = F(), l = S(), n = _(), p = E(), u = y(), t = I.get(g), r = (C ?? t?.stroke) || N, a = x ?? t?.curve, f = L ?? t?.connectNulls ?? !1, e = d(
17
+ () => t?.data && l && n && A(n) ? R(
18
18
  t.data,
19
19
  l,
20
20
  n,
@@ -23,10 +23,10 @@ function U({
23
23
  ) : null,
24
24
  [t, l, n, p, f]
25
25
  ), m = d(
26
- () => e ? R(e, a) : null,
26
+ () => e ? D(e, a) : null,
27
27
  [e, a]
28
28
  ), h = d(
29
- () => s && e && i ? D(e, i, a) : null,
29
+ () => s && e && i ? j(e, i, a) : null,
30
30
  [s, e, i, a]
31
31
  );
32
32
  return m ? /* @__PURE__ */ c("g", { clipPath: P, children: [
@@ -46,7 +46,7 @@ function U({
46
46
  {
47
47
  offset: "0%",
48
48
  stopColor: r,
49
- stopOpacity: N
49
+ stopOpacity: O
50
50
  }
51
51
  ),
52
52
  /* @__PURE__ */ o("stop", { offset: "100%", stopColor: r, stopOpacity: 0 })
@@ -70,13 +70,13 @@ function U({
70
70
  d: m,
71
71
  fill: "none",
72
72
  stroke: r,
73
- strokeWidth: O,
73
+ strokeWidth: v,
74
74
  strokeLinecap: "round",
75
75
  strokeLinejoin: "round"
76
76
  }
77
77
  )
78
78
  ] }) : null;
79
- }
79
+ });
80
80
  export {
81
- U as Line
81
+ q as Line
82
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/LineChart/LineChart.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,SAAS,CAAC;AA0FjB,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,QAAgB,EAChB,QAAqB,EACrB,YAAY,EACZ,SAAiB,EACjB,SAAiB,EACjB,KAAK,EACL,KAAK,EACL,KAAc,EACd,MAAY,EACZ,KAAK,EACL,eAAe,EACf,wBAAwB,EACxB,OAAO,EACP,YAAY,EACZ,OAAe,EACf,UAAsB,EACtB,QAAQ,GACT,EAAE,QAAQ,CAAC,cAAc,CAAC,2CAgF1B"}
1
+ {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/LineChart/LineChart.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,SAAS,CAAC;AA0FjB,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,QAAgB,EAChB,QAAqB,EACrB,YAAY,EACZ,SAAiB,EACjB,SAAiB,EACjB,KAAK,EACL,KAAK,EACL,KAAc,EACd,MAAY,EACZ,KAAK,EACL,eAAe,EACf,wBAAwB,EACxB,OAAO,EACP,YAAY,EACZ,OAAe,EACf,UAAsB,EACtB,QAAQ,GACT,EAAE,QAAQ,CAAC,cAAc,CAAC,2CAsF1B"}
@@ -1,47 +1,47 @@
1
- import { jsx as i, jsxs as A, Fragment as g } from "react/jsx-runtime";
2
- import { useMemo as I } from "react";
1
+ import { jsx as i, jsxs as S, Fragment as u } from "react/jsx-runtime";
2
+ import { useMemo as h } from "react";
3
3
  import { ChartEmptyLabel as M } from "../CartesianChart/ChartEmptyLabel/ChartEmptyLabel.js";
4
4
  import { useShimmerAnimation as R } from "../CartesianChart/hooks/useShimmerAnimation.js";
5
5
  import { computeAxisPadding as V, canRenderLine as W, getChartDisplayState as q } from "./utils.js";
6
- import { defaultXAxisProps as P, defaultYAxisProps as h } from "../Axis/Axis.constants.js";
6
+ import { defaultXAxisProps as k, defaultYAxisProps as g } from "../Axis/Axis.constants.js";
7
7
  import { CartesianChart as z } from "../CartesianChart/CartesianChart.js";
8
8
  import { LineChartEmptyState as G } from "./LineChartEmptyState/LineChartEmptyState.js";
9
9
  import { XAxis as H } from "../Axis/XAxis/XAxis.js";
10
10
  import { YAxis as J } from "../Axis/YAxis/YAxis.js";
11
11
  import { Line as K } from "../Line/Line.js";
12
12
  import { cssVar as N } from "../../../libs/design-core/dist/lib/cssVar/cssVar.js";
13
- const k = ({
13
+ const b = ({
14
14
  series: o,
15
15
  showArea: r,
16
16
  areaType: a,
17
- connectNulls: s,
17
+ connectNulls: e,
18
18
  stroke: n
19
- }) => /* @__PURE__ */ i(g, { children: o.map((t) => /* @__PURE__ */ i(
19
+ }) => /* @__PURE__ */ i(u, { children: o.map((t) => /* @__PURE__ */ i(
20
20
  K,
21
21
  {
22
22
  seriesId: t.id,
23
23
  stroke: n ?? t.stroke,
24
24
  showArea: r,
25
25
  areaType: a,
26
- connectNulls: s
26
+ connectNulls: e
27
27
  },
28
28
  t.id
29
29
  )) }), O = ({
30
30
  series: o,
31
31
  showArea: r,
32
32
  areaType: a,
33
- connectNulls: s
33
+ connectNulls: e
34
34
  }) => {
35
35
  const { animationStyle: n, keyframe: t } = R();
36
- return /* @__PURE__ */ A(g, { children: [
36
+ return /* @__PURE__ */ S(u, { children: [
37
37
  /* @__PURE__ */ i("style", { children: t }),
38
38
  /* @__PURE__ */ i("g", { style: { animation: n }, children: /* @__PURE__ */ i(
39
- k,
39
+ b,
40
40
  {
41
41
  series: o,
42
42
  showArea: r,
43
43
  areaType: a,
44
- connectNulls: s,
44
+ connectNulls: e,
45
45
  stroke: N("var(--border-muted-subtle)")
46
46
  }
47
47
  ) })
@@ -50,77 +50,83 @@ const k = ({
50
50
  series: o,
51
51
  showArea: r,
52
52
  areaType: a,
53
- connectNulls: s,
53
+ connectNulls: e,
54
54
  showXAxis: n,
55
55
  showYAxis: t,
56
- xAxisConfig: d,
57
- yAxisConfig: e,
56
+ xAxisConfig: m,
57
+ yAxisConfig: s,
58
58
  isTransitionLoading: c,
59
59
  children: f
60
- }) => /* @__PURE__ */ A(g, { children: [
61
- n && /* @__PURE__ */ i(H, { ...d }),
62
- t && /* @__PURE__ */ i(J, { ...e }),
60
+ }) => /* @__PURE__ */ S(u, { children: [
61
+ n && /* @__PURE__ */ i(H, { ...m }),
62
+ t && /* @__PURE__ */ i(J, { ...s }),
63
63
  c ? /* @__PURE__ */ i(
64
64
  O,
65
65
  {
66
66
  series: o,
67
67
  showArea: r,
68
68
  areaType: a,
69
- connectNulls: s
69
+ connectNulls: e
70
70
  }
71
71
  ) : /* @__PURE__ */ i(
72
- k,
72
+ b,
73
73
  {
74
74
  series: o,
75
75
  showArea: r,
76
76
  areaType: a,
77
- connectNulls: s
77
+ connectNulls: e
78
78
  }
79
79
  ),
80
80
  f
81
81
  ] });
82
- function ei({
82
+ function si({
83
83
  series: o,
84
84
  showArea: r = !1,
85
85
  areaType: a = "gradient",
86
- connectNulls: s,
86
+ connectNulls: e,
87
87
  showXAxis: n = !1,
88
88
  showYAxis: t = !1,
89
- xAxis: d,
90
- yAxis: e,
89
+ xAxis: m,
90
+ yAxis: s,
91
91
  width: c = "100%",
92
92
  height: f = 240,
93
- inset: S,
94
- enableScrubbing: b,
95
- onScrubberPositionChange: v,
96
- animate: j,
97
- magnetRadius: D,
98
- loading: u = !1,
99
- emptyLabel: C = "No data",
100
- children: E
93
+ inset: v,
94
+ enableScrubbing: A,
95
+ onScrubberPositionChange: j,
96
+ animate: D,
97
+ magnetRadius: E,
98
+ loading: C = !1,
99
+ emptyLabel: L = "No data",
100
+ children: T
101
101
  }) {
102
- const p = {
103
- ...P,
104
- ...d,
105
- position: d?.position ?? P.position
106
- }, l = {
107
- ...h,
108
- ...e,
109
- position: e?.position ?? h.position,
110
- width: e?.width ?? h.width
111
- }, L = p.position, x = l.position, y = l.width, T = I(
102
+ const p = h(
103
+ () => ({
104
+ ...k,
105
+ ...m,
106
+ position: m?.position ?? k.position
107
+ }),
108
+ [m]
109
+ ), l = h(
110
+ () => ({
111
+ ...g,
112
+ ...s,
113
+ position: s?.position ?? g.position,
114
+ width: s?.width ?? g.width
115
+ }),
116
+ [s]
117
+ ), y = p.position, x = l.position, P = l.width, B = h(
112
118
  () => V({
113
119
  showXAxis: n,
114
120
  showYAxis: t,
115
- xAxisPosition: L,
121
+ xAxisPosition: y,
116
122
  yAxisPosition: x,
117
- yAxisWidth: y
123
+ yAxisWidth: P
118
124
  }),
119
- [n, t, L, x, y]
120
- ), B = W(o, p.data), { status: m, ariaLabel: F } = q({
121
- loading: u,
122
- hasData: B,
123
- emptyLabel: C
125
+ [n, t, y, x, P]
126
+ ), F = W(o, p.data), { status: d, ariaLabel: I } = q({
127
+ loading: C,
128
+ hasData: F,
129
+ emptyLabel: L
124
130
  });
125
131
  return /* @__PURE__ */ i(
126
132
  z,
@@ -130,33 +136,33 @@ function ei({
130
136
  yAxis: l,
131
137
  width: c,
132
138
  height: f,
133
- inset: S,
134
- axisPadding: T,
135
- enableScrubbing: b,
136
- onScrubberPositionChange: v,
137
- animate: j,
138
- magnetRadius: D,
139
- ariaLabel: F,
140
- ariaBusy: u,
141
- overlay: m === "empty" ? /* @__PURE__ */ i(M, { children: C }) : void 0,
142
- children: m === "initial-loading" || m === "empty" ? /* @__PURE__ */ i(G, { loading: m === "initial-loading" }) : /* @__PURE__ */ i(
139
+ inset: v,
140
+ axisPadding: B,
141
+ enableScrubbing: A,
142
+ onScrubberPositionChange: j,
143
+ animate: D,
144
+ magnetRadius: E,
145
+ ariaLabel: I,
146
+ ariaBusy: C,
147
+ overlay: d === "empty" ? /* @__PURE__ */ i(M, { children: L }) : void 0,
148
+ children: d === "initial-loading" || d === "empty" ? /* @__PURE__ */ i(G, { loading: d === "initial-loading" }) : /* @__PURE__ */ i(
143
149
  Q,
144
150
  {
145
151
  series: o ?? [],
146
152
  showArea: r,
147
153
  areaType: a,
148
- connectNulls: s,
154
+ connectNulls: e,
149
155
  showXAxis: n,
150
156
  showYAxis: t,
151
157
  xAxisConfig: p,
152
158
  yAxisConfig: l,
153
- isTransitionLoading: m === "transition-loading",
154
- children: E
159
+ isTransitionLoading: d === "transition-loading",
160
+ children: T
155
161
  }
156
162
  )
157
163
  }
158
164
  );
159
165
  }
160
166
  export {
161
- ei as LineChart
167
+ si as LineChart
162
168
  };
@@ -1,4 +1,4 @@
1
1
  import { PointLabelProps, PointProps } from './types';
2
2
  export declare function PointLabel({ style, textAnchor, dominantBaseline, ...props }: Readonly<PointLabelProps>): import("react/jsx-runtime").JSX.Element;
3
- export declare function Point({ dataX, dataY, color, label, LabelComponent, labelPosition, hidePoint, showLabelArrow, size, onClick, magnetic, labelAlignment, }: Readonly<PointProps>): import("react/jsx-runtime").JSX.Element | null;
3
+ export declare const Point: import('react').NamedExoticComponent<Readonly<PointProps>>;
4
4
  //# sourceMappingURL=Point.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Point/Point.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,eAAe,EAEf,UAAU,EACX,MAAM,SAAS,CAAC;AAIjB,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,UAAqB,EACrB,gBAAyB,EACzB,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,eAAe,CAAC,2CAe3B;AA+BD,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,cAAc,EACd,aAAqB,EACrB,SAAiB,EACjB,cAAqB,EACrB,IAAmB,EACnB,OAAO,EACP,QAAgB,EAChB,cAAuB,GACxB,EAAE,QAAQ,CAAC,UAAU,CAAC,kDA2DtB"}
1
+ {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Point/Point.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,eAAe,EAEf,UAAU,EACX,MAAM,SAAS,CAAC;AAKjB,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,UAAqB,EACrB,gBAAyB,EACzB,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,eAAe,CAAC,2CAe3B;AA+BD,eAAO,MAAM,KAAK,4DAwEhB,CAAC"}
@@ -1,122 +1,123 @@
1
- import { jsxs as A, jsx as n } from "react/jsx-runtime";
2
- import { DEFAULT_SIZE as E, LABEL_FONT_SIZE as P, STROKE_WIDTH as S } from "./constants.js";
3
- import { usePointGeometry as T } from "./usePointGeometry.js";
4
- import { resolveLabel as k, computeLabelGeometry as _, buildArrowPoints as w } from "./utils.js";
1
+ import { jsxs as P, jsx as n } from "react/jsx-runtime";
2
+ import { memo as E } from "react";
3
+ import { DEFAULT_SIZE as S, LABEL_FONT_SIZE as T, STROKE_WIDTH as k } from "./constants.js";
4
+ import { usePointGeometry as _ } from "./usePointGeometry.js";
5
+ import { resolveLabel as w, computeLabelGeometry as F, buildArrowPoints as G } from "./utils.js";
5
6
  import { cssVar as l } from "../../../libs/design-core/dist/lib/cssVar/cssVar.js";
6
- function F({
7
- style: t,
8
- textAnchor: e = "middle",
7
+ function I({
8
+ style: i,
9
+ textAnchor: t = "middle",
9
10
  dominantBaseline: o = "auto",
10
- ...r
11
+ ...e
11
12
  }) {
12
13
  return /* @__PURE__ */ n(
13
14
  "text",
14
15
  {
15
- textAnchor: e,
16
+ textAnchor: t,
16
17
  dominantBaseline: o,
17
18
  style: {
18
19
  fill: l("var(--text-base)"),
19
- fontSize: P,
20
+ fontSize: T,
20
21
  fontWeight: l("var(--font-style-body-4-weight-medium)"),
21
22
  fontFamily: l("var(--font-family-font)"),
22
- ...t
23
+ ...i
23
24
  },
24
- ...r
25
+ ...e
25
26
  }
26
27
  );
27
28
  }
28
- function G({ x: t, y: e, size: o, color: r }) {
29
- const u = o / 2, a = r ?? l("var(--background-muted-strong)");
29
+ function V({ x: i, y: t, size: o, color: e }) {
30
+ const c = o / 2, m = e ?? l("var(--background-muted-strong)");
30
31
  return /* @__PURE__ */ n(
31
32
  "circle",
32
33
  {
33
34
  "data-testid": "point-circle",
34
- cx: t,
35
- cy: e,
36
- r: u,
35
+ cx: i,
36
+ cy: t,
37
+ r: c,
37
38
  style: {
38
- fill: a,
39
+ fill: m,
39
40
  stroke: l("var(--background-canvas)")
40
41
  },
41
- strokeWidth: S
42
+ strokeWidth: k
42
43
  }
43
44
  );
44
45
  }
45
- function I({ x: t, y: e, size: o, position: r }) {
46
+ function W({ x: i, y: t, size: o, position: e }) {
46
47
  return /* @__PURE__ */ n(
47
48
  "polygon",
48
49
  {
49
50
  "data-testid": "point-arrow",
50
- points: w(t, e, o / 2, r),
51
+ points: G(i, t, o / 2, e),
51
52
  style: { fill: l("var(--text-base)") }
52
53
  }
53
54
  );
54
55
  }
55
- function Z({
56
+ const K = E(function({
56
57
  dataX: t,
57
- dataY: e,
58
- color: o,
59
- label: r,
60
- LabelComponent: u,
61
- labelPosition: a = "top",
62
- hidePoint: d = !1,
63
- showLabelArrow: m = !0,
64
- size: f = E,
65
- onClick: x,
66
- magnetic: p = !1,
67
- labelAlignment: b = "auto"
58
+ dataY: o,
59
+ color: e,
60
+ label: c,
61
+ LabelComponent: m,
62
+ labelPosition: f = "top",
63
+ hidePoint: p = !1,
64
+ showLabelArrow: x = !0,
65
+ size: u = S,
66
+ onClick: y,
67
+ magnetic: b = !1,
68
+ labelAlignment: v = "auto"
68
69
  }) {
69
- const { pixel: i, drawingArea: v, revealStyle: g, isVisible: L } = T({
70
+ const { pixel: r, drawingArea: g, revealStyle: L, isVisible: h } = _({
70
71
  dataX: t,
71
- dataY: e,
72
- magnetic: p
72
+ dataY: o,
73
+ magnetic: b
73
74
  });
74
- if (!L || !i)
75
+ if (!h || !r)
75
76
  return null;
76
- const s = k(r, t), y = s !== void 0, c = y ? _({
77
- text: s,
78
- pixelX: i.x,
79
- pixelY: i.y,
80
- size: f,
81
- labelPosition: a,
82
- showLabelArrow: m,
83
- area: v,
84
- alignment: b
85
- }) : null, h = u ?? F;
86
- return /* @__PURE__ */ A(
77
+ const a = w(c, t), d = a !== void 0, s = d ? F({
78
+ text: a,
79
+ pixelX: r.x,
80
+ pixelY: r.y,
81
+ size: u,
82
+ labelPosition: f,
83
+ showLabelArrow: x,
84
+ area: g,
85
+ alignment: v
86
+ }) : null, A = m ?? I;
87
+ return /* @__PURE__ */ P(
87
88
  "g",
88
89
  {
89
90
  "data-testid": "point-group",
90
- onClick: x,
91
+ onClick: y,
91
92
  style: {
92
- ...g,
93
- ...x ? { cursor: "pointer" } : void 0
93
+ ...L,
94
+ ...y ? { cursor: "pointer" } : void 0
94
95
  },
95
96
  children: [
96
- !d && /* @__PURE__ */ n(G, { x: i.x, y: i.y, size: f, color: o }),
97
- y && m && /* @__PURE__ */ n(
98
- I,
97
+ !p && /* @__PURE__ */ n(V, { x: r.x, y: r.y, size: u, color: e }),
98
+ d && x && /* @__PURE__ */ n(
99
+ W,
99
100
  {
100
- x: i.x,
101
- y: i.y,
102
- size: f,
103
- position: a
101
+ x: r.x,
102
+ y: r.y,
103
+ size: u,
104
+ position: f
104
105
  }
105
106
  ),
106
- s != null && c && /* @__PURE__ */ n(
107
- h,
107
+ a != null && s && /* @__PURE__ */ n(
108
+ A,
108
109
  {
109
- x: c.x,
110
- y: c.y,
111
- textAnchor: c.textAnchor,
112
- children: s
110
+ x: s.x,
111
+ y: s.y,
112
+ textAnchor: s.textAnchor,
113
+ children: a
113
114
  }
114
115
  )
115
116
  ]
116
117
  }
117
118
  );
118
- }
119
+ });
119
120
  export {
120
- Z as Point,
121
- F as PointLabel
121
+ K as Point,
122
+ I as PointLabel
122
123
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MagneticPointsProvider.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Point/pointContext/MagneticPointsProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,KAAK,2BAA2B,GAAG;IACjC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,GACT,EAAE,QAAQ,CAAC,2BAA2B,CAAC,2CA8BvC"}
1
+ {"version":3,"file":"MagneticPointsProvider.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Point/pointContext/MagneticPointsProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,KAAK,2BAA2B,GAAG;IACjC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,GACT,EAAE,QAAQ,CAAC,2BAA2B,CAAC,2CAwCvC"}
@@ -1,19 +1,22 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { useRef as g, useState as p, useCallback as n, useMemo as P } from "react";
3
- import { MagneticPointsContextProvider as l } from "./magneticPointsContext.js";
4
- function C({
2
+ import { useRef as l, useState as v, useCallback as n, useMemo as g } from "react";
3
+ import { MagneticRegistryProvider as h, MagneticSnapshotProvider as M } from "./magneticPointsContext.js";
4
+ function S({
5
5
  children: f
6
6
  }) {
7
- const e = g(/* @__PURE__ */ new Set()), [o, s] = p(0), i = n((r) => {
8
- e.current.has(r) || (e.current.add(r), s((t) => t + 1));
7
+ const e = l(/* @__PURE__ */ new Set()), [s, o] = v(0), i = n((r) => {
8
+ e.current.has(r) || (e.current.add(r), o((t) => t + 1));
9
9
  }, []), c = n((r) => {
10
- e.current.has(r) && (e.current.delete(r), s((t) => t + 1));
11
- }, []), u = n(() => e.current, []), m = P(
12
- () => ({ register: i, unregister: c, getMagneticPoints: u, version: o }),
13
- [i, c, u, o]
10
+ e.current.has(r) && (e.current.delete(r), o((t) => t + 1));
11
+ }, []), u = n(() => e.current, []), m = g(
12
+ () => ({ register: i, unregister: c }),
13
+ [i, c]
14
+ ), p = g(
15
+ () => ({ version: s, getMagneticPoints: u }),
16
+ [s, u]
14
17
  );
15
- return /* @__PURE__ */ a(l, { value: m, children: f });
18
+ return /* @__PURE__ */ a(h, { value: m, children: /* @__PURE__ */ a(M, { value: p, children: f }) });
16
19
  }
17
20
  export {
18
- C as MagneticPointsProvider
21
+ S as MagneticPointsProvider
19
22
  };
@@ -1,3 +1,3 @@
1
- export { useMagneticPointsContext, type MagneticPointsContextValue, } from './magneticPointsContext';
1
+ export { useMagneticRegistry, useMagneticSnapshot, type MagneticRegistryValue, type MagneticSnapshotValue, } from './magneticPointsContext';
2
2
  export { MagneticPointsProvider } from './MagneticPointsProvider';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Point/pointContext/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,0BAA0B,GAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Point/pointContext/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,13 +1,30 @@
1
- export type MagneticPointsContextValue = {
1
+ /**
2
+ * Stable registration API for magnetic points. Its identity never changes for
3
+ * the provider's lifetime, so consumers (every `Point`) do not re-render when
4
+ * the magnetic set changes — only when they mount/unmount.
5
+ */
6
+ export type MagneticRegistryValue = {
2
7
  register: (dataIndex: number) => void;
3
8
  unregister: (dataIndex: number) => void;
9
+ };
10
+ /**
11
+ * Mutable snapshot of the registered magnetic points. Changes on every
12
+ * register/unregister (via `version`) and is consumed only by the scrubber,
13
+ * which needs to recompute its snap targets when the set changes.
14
+ */
15
+ export type MagneticSnapshotValue = {
4
16
  version: number;
5
17
  getMagneticPoints: () => ReadonlySet<number>;
6
18
  };
7
- declare const MagneticPointsContextProvider: import('react').FC<{
19
+ declare const MagneticRegistryProvider: import('react').FC<{
20
+ children: import('react').ReactNode;
21
+ value: MagneticRegistryValue;
22
+ }>;
23
+ declare const MagneticSnapshotProvider: import('react').FC<{
8
24
  children: import('react').ReactNode;
9
- value: MagneticPointsContextValue;
25
+ value: MagneticSnapshotValue;
10
26
  }>;
11
- export declare const useMagneticPointsContext: () => MagneticPointsContextValue;
12
- export { MagneticPointsContextProvider };
27
+ export declare const useMagneticRegistry: () => MagneticRegistryValue;
28
+ export declare const useMagneticSnapshot: () => MagneticSnapshotValue;
29
+ export { MagneticRegistryProvider, MagneticSnapshotProvider };
13
30
  //# sourceMappingURL=magneticPointsContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"magneticPointsContext.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Point/pointContext/magneticPointsContext.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C,CAAC;AAEF,QAAA,MAAO,6BAA6B;;;EAC6B,CAAC;AAElE,eAAO,MAAM,wBAAwB,QAAO,0BAIxC,CAAC;AAEL,OAAO,EAAE,6BAA6B,EAAE,CAAC"}
1
+ {"version":3,"file":"magneticPointsContext.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Point/pointContext/magneticPointsContext.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C,CAAC;AAEF,QAAA,MAAO,wBAAwB;;;EAC+B,CAAC;AAE/D,QAAA,MAAO,wBAAwB;;;EAC+B,CAAC;AAE/D,eAAO,MAAM,mBAAmB,QAAO,qBAInC,CAAC;AAEL,eAAO,MAAM,mBAAmB,QAAO,qBAInC,CAAC;AAEL,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,9 +1,14 @@
1
- import { createSafeContext as t } from "../../../../libs/utils-shared/dist/index.js";
2
- const [o, e] = t("MagneticPoints"), i = () => e({
3
- consumerName: "useMagneticPointsContext",
1
+ import { createSafeContext as e } from "../../../../libs/utils-shared/dist/index.js";
2
+ const [a, t] = e("MagneticRegistry"), [o, n] = e("MagneticSnapshot"), i = () => t({
3
+ consumerName: "useMagneticRegistry",
4
+ contextRequired: !0
5
+ }), c = () => n({
6
+ consumerName: "useMagneticSnapshot",
4
7
  contextRequired: !0
5
8
  });
6
9
  export {
7
- o as MagneticPointsContextProvider,
8
- i as useMagneticPointsContext
10
+ a as MagneticRegistryProvider,
11
+ o as MagneticSnapshotProvider,
12
+ i as useMagneticRegistry,
13
+ c as useMagneticSnapshot
9
14
  };
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { DrawingArea } from '../../utils/types';
3
3
  import { BaseAxisProps } from '../Axis';
4
- import { MagneticPointsContextValue } from './pointContext/magneticPointsContext';
4
+ import { MagneticRegistryValue } from './pointContext/magneticPointsContext';
5
5
  type Pixel = {
6
6
  x: number;
7
7
  y: number;
@@ -28,6 +28,6 @@ export declare const usePointGeometry: ({ dataX, dataY, magnetic, }: UsePointGeo
28
28
  * Registers/unregisters a data index as a magnetic snap target
29
29
  * when the Point has `magnetic` enabled.
30
30
  */
31
- export declare const useMagneticRegistration: (magnetic: boolean, dataX: number, getXAxisConfig: () => BaseAxisProps | undefined, { register, unregister }: MagneticPointsContextValue) => void;
31
+ export declare const useMagneticRegistration: (magnetic: boolean, dataX: number, getXAxisConfig: () => BaseAxisProps | undefined, { register, unregister }: MagneticRegistryValue) => void;
32
32
  export {};
33
33
  //# sourceMappingURL=usePointGeometry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePointGeometry.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Point/usePointGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGvF,KAAK,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,6BAI9B,sBAAsB,KAAG,aAqB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,OAAO,EACjB,OAAO,MAAM,EACb,gBAAgB,MAAM,aAAa,GAAG,SAAS,EAC/C,0BAA0B,0BAA0B,KACnD,IAQF,CAAC"}
1
+ {"version":3,"file":"usePointGeometry.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Point/usePointGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAGlF,KAAK,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,6BAI9B,sBAAsB,KAAG,aAqB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,OAAO,EACjB,OAAO,MAAM,EACb,gBAAgB,MAAM,aAAa,GAAG,SAAS,EAC/C,0BAA0B,qBAAqB,KAC9C,IAQF,CAAC"}
@@ -1,30 +1,30 @@
1
- import { useMemo as x, useEffect as a } from "react";
2
- import { projectPoint as v } from "../../utils/scales/scales.js";
3
- import { isWithinBounds as C, resolveDataXToIndex as S } from "./utils.js";
4
- import { useCartesianChartContext as g } from "../CartesianChart/context/cartesianChartContext.js";
5
- import { useMagneticPointsContext as y } from "./pointContext/magneticPointsContext.js";
6
- import { usePointReveal as P } from "../CartesianChart/RevealAnimation/context.js";
1
+ import { useMemo as a, useEffect as x } from "react";
2
+ import { projectPoint as g } from "../../utils/scales/scales.js";
3
+ import { isWithinBounds as v, resolveDataXToIndex as y } from "./utils.js";
4
+ import { useCartesianChartContext as S } from "../CartesianChart/context/cartesianChartContext.js";
5
+ import { useMagneticRegistry as R } from "./pointContext/magneticPointsContext.js";
6
+ import { usePointReveal as d } from "../CartesianChart/RevealAnimation/context.js";
7
7
  const A = ({
8
- dataX: t,
9
- dataY: e,
10
- magnetic: n
8
+ dataX: e,
9
+ dataY: t,
10
+ magnetic: r
11
11
  }) => {
12
- const { getXScale: r, getYScale: i, getXAxisConfig: o, drawingArea: u } = g(), f = y();
13
- d(n, t, o, f);
14
- const c = r(), m = i(), s = x(() => {
12
+ const { getXScale: i, getYScale: n, getXAxisConfig: o, drawingArea: u } = S(), f = R();
13
+ C(r, e, o, f);
14
+ const c = i(), m = n(), s = a(() => {
15
15
  if (!(!c || !m))
16
- return v(t, e, c, m);
17
- }, [t, e, c, m]), l = P(), p = s !== void 0 && C(s.x, s.y, u);
16
+ return g(e, t, c, m);
17
+ }, [e, t, c, m]), l = d(), p = s !== void 0 && v(s.x, s.y, u);
18
18
  return { pixel: s, drawingArea: u, revealStyle: l, isVisible: p };
19
- }, d = (t, e, n, { register: r, unregister: i }) => {
20
- a(() => {
21
- if (!t) return;
22
- const o = S(e, n());
19
+ }, C = (e, t, r, { register: i, unregister: n }) => {
20
+ x(() => {
21
+ if (!e) return;
22
+ const o = y(t, r());
23
23
  if (o !== void 0)
24
- return r(o), () => i(o);
25
- }, [t, e, n, r, i]);
24
+ return i(o), () => n(o);
25
+ }, [e, t, r, i, n]);
26
26
  };
27
27
  export {
28
- d as useMagneticRegistration,
28
+ C as useMagneticRegistration,
29
29
  A as usePointGeometry
30
30
  };
@@ -3,7 +3,7 @@ import { useState as K, useRef as k, useMemo as X, useCallback as c, useEffect a
3
3
  import { clamp as p } from "../../utils/numbers.js";
4
4
  import { buildSortedMagnets as z, getDataIndexFromPosition as H, resolvePixelX as N, applyMagnetization as U } from "./utils.js";
5
5
  import { useCartesianChartContext as V } from "../CartesianChart/context/cartesianChartContext.js";
6
- import { useMagneticPointsContext as G } from "../Point/pointContext/magneticPointsContext.js";
6
+ import { useMagneticSnapshot as G } from "../Point/pointContext/magneticPointsContext.js";
7
7
  import { ScrubberContextProvider as J } from "./context/scrubberContext.js";
8
8
  function S({
9
9
  children: R,
@@ -17,31 +17,31 @@ function S({
17
17
  ), h = k(m);
18
18
  h.current = m;
19
19
  const g = k(null), l = k(0), A = X(() => {
20
- const t = w();
20
+ const e = w();
21
21
  return z({
22
- magneticIndices: t,
23
- getPixelForIndex: (e) => N(e, f, v())
22
+ magneticIndices: e,
23
+ getPixelForIndex: (t) => N(t, f, v())
24
24
  });
25
25
  }, [T, w, f, v]), i = c(
26
- (t) => {
27
- const e = t === void 0 || n <= 0 ? void 0 : p(t, 0, n - 1);
28
- B(e), y?.(e);
26
+ (e) => {
27
+ const t = e === void 0 || n <= 0 ? void 0 : p(e, 0, n - 1);
28
+ B(t), y?.(t);
29
29
  },
30
30
  [n, y]
31
31
  ), I = c(
32
- (t) => {
33
- const e = f();
34
- if (!e || !r || n <= 0) return;
32
+ (e) => {
33
+ const t = f();
34
+ if (!t || !r || n <= 0) return;
35
35
  const a = v();
36
36
  let o = H(
37
- t,
38
37
  e,
38
+ t,
39
39
  a,
40
40
  n
41
41
  );
42
42
  E > 0 && (o = U({
43
43
  resolvedIndex: o,
44
- pixelX: t,
44
+ pixelX: e,
45
45
  sortedMagnets: A,
46
46
  magnetRadius: E
47
47
  })), o !== h.current && i(o);
@@ -56,57 +56,57 @@ function S({
56
56
  i
57
57
  ]
58
58
  ), u = c(
59
- (t) => {
60
- g.current = t, l.current || (l.current = requestAnimationFrame(() => {
59
+ (e) => {
60
+ g.current = e, l.current || (l.current = requestAnimationFrame(() => {
61
61
  l.current = 0;
62
- const e = g.current;
63
- e !== null && (g.current = null, I(e));
62
+ const t = g.current;
63
+ t !== null && (g.current = null, I(t));
64
64
  }));
65
65
  },
66
66
  [I]
67
67
  ), s = c(() => {
68
68
  r && i(void 0);
69
69
  }, [r, i]), L = c(
70
- (t) => {
71
- const a = t.currentTarget.getBoundingClientRect();
72
- u(t.clientX - a.left);
70
+ (e) => {
71
+ const a = e.currentTarget.getBoundingClientRect();
72
+ u(e.clientX - a.left);
73
73
  },
74
74
  [u]
75
75
  ), x = c(
76
- (t) => {
77
- if (!r || !t.touches.length) return;
78
- const e = t.touches[0], o = t.currentTarget.getBoundingClientRect();
79
- u(e.clientX - o.left);
76
+ (e) => {
77
+ if (!r || !e.touches.length) return;
78
+ const t = e.touches[0], o = e.currentTarget.getBoundingClientRect();
79
+ u(t.clientX - o.left);
80
80
  },
81
81
  [r, u]
82
82
  ), P = c(
83
- (t) => {
84
- if (!t.touches.length) return;
85
- t.preventDefault();
86
- const e = t.touches[0], o = t.currentTarget.getBoundingClientRect();
87
- u(e.clientX - o.left);
83
+ (e) => {
84
+ if (!e.touches.length) return;
85
+ e.preventDefault();
86
+ const t = e.touches[0], o = e.currentTarget.getBoundingClientRect();
87
+ u(t.clientX - o.left);
88
88
  },
89
89
  [u]
90
90
  ), C = c(
91
- (t) => {
91
+ (e) => {
92
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
+ const t = n - 1, a = h.current ?? t, o = e.shiftKey ? p(Math.floor(t * 0.1), 1, 10) : 1;
94
94
  let d;
95
- switch (t.key) {
95
+ switch (e.key) {
96
96
  case "ArrowLeft":
97
- t.preventDefault(), d = p(a - o, 0, e);
97
+ e.preventDefault(), d = p(a - o, 0, t);
98
98
  break;
99
99
  case "ArrowRight":
100
- t.preventDefault(), d = p(a + o, 0, e);
100
+ e.preventDefault(), d = p(a + o, 0, t);
101
101
  break;
102
102
  case "Home":
103
- t.preventDefault(), d = 0;
103
+ e.preventDefault(), d = 0;
104
104
  break;
105
105
  case "End":
106
- t.preventDefault(), d = e;
106
+ e.preventDefault(), d = t;
107
107
  break;
108
108
  case "Escape":
109
- t.preventDefault(), d = void 0;
109
+ e.preventDefault(), d = void 0;
110
110
  break;
111
111
  default:
112
112
  return;
@@ -118,10 +118,10 @@ function S({
118
118
  !r || h.current === void 0 || s();
119
119
  }, [r, s]);
120
120
  j(() => {
121
- const t = D.current;
122
- if (!(!t || !r))
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;
121
+ const e = D.current;
122
+ if (!(!e || !r))
123
+ return e.addEventListener("mousemove", L), e.addEventListener("mouseleave", s), e.addEventListener("touchstart", x, { passive: !1 }), e.addEventListener("touchmove", P, { passive: !1 }), e.addEventListener("touchend", s), e.addEventListener("touchcancel", s), e.addEventListener("keydown", C), e.addEventListener("blur", M), () => {
124
+ e.removeEventListener("mousemove", L), e.removeEventListener("mouseleave", s), e.removeEventListener("touchstart", x), e.removeEventListener("touchmove", P), e.removeEventListener("touchend", s), e.removeEventListener("touchcancel", s), e.removeEventListener("keydown", C), e.removeEventListener("blur", M), cancelAnimationFrame(l.current), l.current = 0;
125
125
  };
126
126
  }, [
127
127
  D,
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react-visualization",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
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.17",
37
- "@ledgerhq/lumen-ui-react": "0.1.42",
36
+ "@ledgerhq/lumen-design-core": "0.1.18",
37
+ "@ledgerhq/lumen-ui-react": "0.1.43",
38
38
  "class-variance-authority": "^0.7.1",
39
39
  "clsx": "^2.1.1",
40
40
  "react": "^18.0.0 || ^19.0.0",
@@ -42,7 +42,7 @@
42
42
  "tailwind-merge": "^2.6.0"
43
43
  },
44
44
  "dependencies": {
45
- "@ledgerhq/lumen-utils-shared": "0.1.5",
45
+ "@ledgerhq/lumen-utils-shared": "0.1.6",
46
46
  "d3-array": "^3.2.4",
47
47
  "d3-scale": "^4.0.2",
48
48
  "d3-shape": "^3.2.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react-visualization",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@ledgerhq/lumen-design-core": "0.1.18",
37
- "@ledgerhq/lumen-ui-react": "0.1.43",
37
+ "@ledgerhq/lumen-ui-react": "0.1.44",
38
38
  "class-variance-authority": "^0.7.1",
39
39
  "clsx": "^2.1.1",
40
40
  "react": "^18.0.0 || ^19.0.0",