@ledgerhq/lumen-ui-react-visualization 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/lib/Components/Axis/Axis.types.d.ts +33 -0
  2. package/dist/lib/Components/Axis/Axis.types.d.ts.map +1 -0
  3. package/dist/lib/Components/Axis/XAxis/XAxis.d.ts +4 -0
  4. package/dist/lib/Components/Axis/XAxis/XAxis.d.ts.map +1 -0
  5. package/dist/lib/Components/Axis/XAxis/XAxis.js +84 -0
  6. package/dist/lib/Components/Axis/XAxis/index.d.ts +3 -0
  7. package/dist/lib/Components/Axis/XAxis/index.d.ts.map +1 -0
  8. package/dist/lib/Components/Axis/XAxis/types.d.ts +9 -0
  9. package/dist/lib/Components/Axis/XAxis/types.d.ts.map +1 -0
  10. package/dist/lib/Components/Axis/YAxis/YAxis.d.ts +4 -0
  11. package/dist/lib/Components/Axis/YAxis/YAxis.d.ts.map +1 -0
  12. package/dist/lib/Components/Axis/YAxis/YAxis.js +81 -0
  13. package/dist/lib/Components/Axis/YAxis/index.d.ts +3 -0
  14. package/dist/lib/Components/Axis/YAxis/index.d.ts.map +1 -0
  15. package/dist/lib/Components/Axis/YAxis/types.d.ts +14 -0
  16. package/dist/lib/Components/Axis/YAxis/types.d.ts.map +1 -0
  17. package/dist/lib/Components/CartesianChart/CartesianChart.d.ts +3 -0
  18. package/dist/lib/Components/CartesianChart/CartesianChart.d.ts.map +1 -0
  19. package/dist/lib/Components/CartesianChart/CartesianChart.js +79 -0
  20. package/dist/lib/Components/CartesianChart/context/cartesianChartContext.d.ts +8 -0
  21. package/dist/lib/Components/CartesianChart/context/cartesianChartContext.d.ts.map +1 -0
  22. package/dist/lib/Components/CartesianChart/context/cartesianChartContext.js +9 -0
  23. package/dist/lib/Components/CartesianChart/context/index.d.ts +3 -0
  24. package/dist/lib/Components/CartesianChart/context/index.d.ts.map +1 -0
  25. package/dist/lib/Components/CartesianChart/context/useBuildChartContext.d.ts +23 -0
  26. package/dist/lib/Components/CartesianChart/context/useBuildChartContext.d.ts.map +1 -0
  27. package/dist/lib/Components/CartesianChart/context/useBuildChartContext.js +61 -0
  28. package/dist/lib/Components/CartesianChart/index.d.ts +4 -0
  29. package/dist/lib/Components/CartesianChart/index.d.ts.map +1 -0
  30. package/dist/lib/Components/CartesianChart/types.d.ts +48 -0
  31. package/dist/lib/Components/CartesianChart/types.d.ts.map +1 -0
  32. package/dist/lib/Components/Line/Line.d.ts +3 -0
  33. package/dist/lib/Components/Line/Line.d.ts.map +1 -0
  34. package/dist/lib/Components/Line/Line.js +73 -0
  35. package/dist/lib/Components/Line/index.d.ts +3 -0
  36. package/dist/lib/Components/Line/index.d.ts.map +1 -0
  37. package/dist/lib/Components/Line/types.d.ts +24 -0
  38. package/dist/lib/Components/Line/types.d.ts.map +1 -0
  39. package/dist/lib/Components/Line/utils.d.ts +19 -0
  40. package/dist/lib/Components/Line/utils.d.ts.map +1 -0
  41. package/dist/lib/Components/Line/utils.js +22 -0
  42. package/dist/lib/Components/LineChart/LineChart.d.ts +2 -8
  43. package/dist/lib/Components/LineChart/LineChart.d.ts.map +1 -1
  44. package/dist/lib/Components/LineChart/LineChart.js +79 -23
  45. package/dist/lib/Components/LineChart/index.d.ts +1 -0
  46. package/dist/lib/Components/LineChart/index.d.ts.map +1 -1
  47. package/dist/lib/Components/LineChart/types.d.ts +63 -0
  48. package/dist/lib/Components/LineChart/types.d.ts.map +1 -0
  49. package/dist/lib/utils/domain/domain.d.ts +17 -0
  50. package/dist/lib/utils/domain/domain.d.ts.map +1 -0
  51. package/dist/lib/utils/domain/domain.js +38 -0
  52. package/dist/lib/utils/index.d.ts +1 -1
  53. package/dist/lib/utils/index.d.ts.map +1 -1
  54. package/dist/lib/utils/scales/scales.d.ts +24 -0
  55. package/dist/lib/utils/scales/scales.d.ts.map +1 -0
  56. package/dist/lib/utils/scales/scales.js +25 -0
  57. package/dist/lib/utils/ticks/ticks.d.ts +27 -0
  58. package/dist/lib/utils/ticks/ticks.d.ts.map +1 -0
  59. package/dist/lib/utils/ticks/ticks.js +23 -0
  60. package/dist/lib/utils/types.d.ts +90 -6
  61. package/dist/lib/utils/types.d.ts.map +1 -1
  62. package/dist/libs/ui-react/dist/lib/Components/ThemeProvider/ThemeProvider.js +8 -0
  63. package/dist/libs/ui-react/dist/libs/utils-shared/dist/index.js +35 -0
  64. package/dist/libs/utils-shared/dist/index.js +35 -0
  65. package/dist/node_modules/d3-array/src/ascending.js +6 -0
  66. package/dist/node_modules/d3-array/src/bisect.js +9 -0
  67. package/dist/node_modules/d3-array/src/bisector.js +37 -0
  68. package/dist/node_modules/d3-array/src/descending.js +6 -0
  69. package/dist/node_modules/d3-array/src/number.js +6 -0
  70. package/dist/node_modules/d3-array/src/range.js +9 -0
  71. package/dist/node_modules/d3-array/src/ticks.js +32 -0
  72. package/dist/node_modules/d3-color/src/color.js +305 -0
  73. package/dist/node_modules/d3-color/src/define.js +12 -0
  74. package/dist/node_modules/d3-format/src/defaultLocale.js +15 -0
  75. package/dist/node_modules/d3-format/src/exponent.js +7 -0
  76. package/dist/node_modules/d3-format/src/formatDecimal.js +15 -0
  77. package/dist/node_modules/d3-format/src/formatGroup.js +10 -0
  78. package/dist/node_modules/d3-format/src/formatNumerals.js +10 -0
  79. package/dist/node_modules/d3-format/src/formatPrefixAuto.js +12 -0
  80. package/dist/node_modules/d3-format/src/formatRounded.js +10 -0
  81. package/dist/node_modules/d3-format/src/formatSpecifier.js +28 -0
  82. package/dist/node_modules/d3-format/src/formatTrim.js +19 -0
  83. package/dist/node_modules/d3-format/src/formatTypes.js +21 -0
  84. package/dist/node_modules/d3-format/src/identity.js +6 -0
  85. package/dist/node_modules/d3-format/src/locale.js +68 -0
  86. package/dist/node_modules/d3-format/src/precisionFixed.js +7 -0
  87. package/dist/node_modules/d3-format/src/precisionPrefix.js +7 -0
  88. package/dist/node_modules/d3-format/src/precisionRound.js +7 -0
  89. package/dist/node_modules/d3-interpolate/src/array.js +13 -0
  90. package/dist/node_modules/d3-interpolate/src/color.js +24 -0
  91. package/dist/node_modules/d3-interpolate/src/constant.js +4 -0
  92. package/dist/node_modules/d3-interpolate/src/date.js +9 -0
  93. package/dist/node_modules/d3-interpolate/src/number.js +8 -0
  94. package/dist/node_modules/d3-interpolate/src/numberArray.js +15 -0
  95. package/dist/node_modules/d3-interpolate/src/object.js +14 -0
  96. package/dist/node_modules/d3-interpolate/src/rgb.js +15 -0
  97. package/dist/node_modules/d3-interpolate/src/round.js +8 -0
  98. package/dist/node_modules/d3-interpolate/src/string.js +24 -0
  99. package/dist/node_modules/d3-interpolate/src/value.js +16 -0
  100. package/dist/node_modules/d3-path/src/path.js +64 -0
  101. package/dist/node_modules/d3-scale/src/band.js +41 -0
  102. package/dist/node_modules/d3-scale/src/constant.js +8 -0
  103. package/dist/node_modules/d3-scale/src/continuous.js +75 -0
  104. package/dist/node_modules/d3-scale/src/init.js +16 -0
  105. package/dist/node_modules/d3-scale/src/linear.js +39 -0
  106. package/dist/node_modules/d3-scale/src/log.js +86 -0
  107. package/dist/node_modules/d3-scale/src/nice.js +8 -0
  108. package/dist/node_modules/d3-scale/src/number.js +6 -0
  109. package/dist/node_modules/d3-scale/src/ordinal.js +31 -0
  110. package/dist/node_modules/d3-scale/src/tickFormat.js +32 -0
  111. package/dist/node_modules/d3-shape/src/area.js +56 -0
  112. package/dist/node_modules/d3-shape/src/array.js +6 -0
  113. package/dist/node_modules/d3-shape/src/constant.js +8 -0
  114. package/dist/node_modules/d3-shape/src/curve/bump.js +39 -0
  115. package/dist/node_modules/d3-shape/src/curve/linear.js +36 -0
  116. package/dist/node_modules/d3-shape/src/line.js +29 -0
  117. package/dist/node_modules/d3-shape/src/path.js +18 -0
  118. package/dist/node_modules/d3-shape/src/point.js +10 -0
  119. package/dist/node_modules/internmap/src/index.js +35 -0
  120. package/dist/package.json +15 -3
  121. package/package.json +13 -1
  122. package/dist/lib/utils/math/index.d.ts +0 -1
  123. package/dist/lib/utils/math/index.d.ts.map +0 -1
@@ -0,0 +1,24 @@
1
+ export type LineProps = {
2
+ /**
3
+ * The ID of the series to render.
4
+ * Must match a `Series.id` provided to the parent chart.
5
+ */
6
+ seriesId: string;
7
+ /**
8
+ * Override color for the line stroke.
9
+ * When omitted, falls back to the `stroke` defined on the series.
10
+ */
11
+ stroke?: string;
12
+ /**
13
+ * Whether to show a filled area under the line.
14
+ * @default false
15
+ */
16
+ showArea?: boolean;
17
+ /**
18
+ * Area fill style.
19
+ * When `'gradient'`, renders a vertical gradient from the stroke color to transparent.
20
+ * @default 'gradient'
21
+ */
22
+ areaType?: 'gradient';
23
+ };
24
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Line/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { ChartScaleFunction, DrawingArea, NumericScale } from '../../utils/types';
2
+ type Point = [x: number, y: number];
3
+ /**
4
+ * Project series data into scaled [x, y] pixel coordinates, skipping nulls.
5
+ *
6
+ * When `xData` contains numeric values, those values are fed into the scale
7
+ * instead of the array index so the points honour a numeric X domain.
8
+ */
9
+ export declare const toScaledPoints: (data: Array<number | null>, xScale: ChartScaleFunction, yScale: NumericScale, xData?: ReadonlyArray<string | number>) => Point[] | null;
10
+ /**
11
+ * Build the SVG `d` attribute for the line stroke.
12
+ */
13
+ export declare const buildLinePath: (points: Point[]) => string | null;
14
+ /**
15
+ * Build the SVG `d` attribute for the filled area beneath the line.
16
+ */
17
+ export declare const buildAreaPath: (points: Point[], drawingArea: DrawingArea) => string | null;
18
+ export {};
19
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Line/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,YAAY,EACb,MAAM,mBAAmB,CAAC;AAE3B,KAAK,KAAK,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAEpC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,EAC1B,QAAQ,kBAAkB,EAC1B,QAAQ,YAAY,EACpB,QAAQ,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,KACrC,KAAK,EAAE,GAAG,IAmBZ,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,KAAK,EAAE,KAAG,MAAM,GAAG,IAOxD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,KAAK,EAAE,EACf,aAAa,WAAW,KACvB,MAAM,GAAG,IAUX,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { isCategoricalScale as p } from "../../utils/scales/scales.js";
2
+ import h from "../../../node_modules/d3-shape/src/line.js";
3
+ import { bumpX as s } from "../../../node_modules/d3-shape/src/curve/bump.js";
4
+ import f from "../../../node_modules/d3-shape/src/area.js";
5
+ const v = (n, t, e, o) => {
6
+ const u = [];
7
+ for (let r = 0; r < n.length; r++) {
8
+ const i = n[r];
9
+ if (i === null) continue;
10
+ const l = o && typeof o[r] == "number" ? o[r] : r, c = p(t) ? (t(l) ?? 0) + t.bandwidth() / 2 : t(l), m = e(i);
11
+ u.push([c, m]);
12
+ }
13
+ return u.length >= 2 ? u : null;
14
+ }, P = (n) => h().x((t) => t[0]).y((t) => t[1]).curve(s)(n) ?? null, B = (n, t) => {
15
+ const e = t.y + t.height;
16
+ return f().x((o) => o[0]).y0(e).y1((o) => o[1]).curve(s)(n) ?? null;
17
+ };
18
+ export {
19
+ B as buildAreaPath,
20
+ P as buildLinePath,
21
+ v as toScaledPoints
22
+ };
@@ -1,9 +1,3 @@
1
- import { Series } from '../../utils';
2
- type LineChartProps = {
3
- series: Series[];
4
- width?: number;
5
- height?: number;
6
- };
7
- export declare function LineChart({ series, width, height, }: LineChartProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
1
+ import { LineChartProps } from './types';
2
+ export declare function LineChart({ series, showArea, areaType, showXAxis, showYAxis, xAxis, yAxis, width, height, inset, children, }: LineChartProps): import("react/jsx-runtime").JSX.Element;
9
3
  //# sourceMappingURL=LineChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/LineChart/LineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,KAAW,EACX,MAAY,GACb,EAAE,cAAc,2CAkBhB"}
1
+ {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/LineChart/LineChart.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,QAAgB,EAChB,QAAqB,EACrB,SAAiB,EACjB,SAAiB,EACjB,KAAK,EACL,KAAK,EACL,KAAc,EACd,MAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE,cAAc,2CAwEhB"}
@@ -1,27 +1,83 @@
1
- import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
- function a({
3
- series: i,
4
- width: e = 400,
5
- height: r = 300
1
+ import { jsxs as b, jsx as e } from "react/jsx-runtime";
2
+ import { useMemo as E } from "react";
3
+ import { DEFAULT_AXIS_WIDTH as H, YAxis as j } from "../Axis/YAxis/YAxis.js";
4
+ import { DEFAULT_AXIS_HEIGHT as m, XAxis as F } from "../Axis/XAxis/XAxis.js";
5
+ import { CartesianChart as U } from "../CartesianChart/CartesianChart.js";
6
+ import { Line as V } from "../Line/Line.js";
7
+ function q({
8
+ series: r,
9
+ showArea: d = !1,
10
+ areaType: c = "gradient",
11
+ showXAxis: t = !1,
12
+ showYAxis: i = !1,
13
+ xAxis: f,
14
+ yAxis: l,
15
+ width: x = "100%",
16
+ height: y = 160,
17
+ inset: T,
18
+ children: g
6
19
  }) {
7
- return /* @__PURE__ */ l("svg", { width: e, height: r, role: "img", "aria-label": "Line chart", children: [
8
- /* @__PURE__ */ n("title", { children: `Line chart with ${i.length} series` }),
9
- /* @__PURE__ */ n("rect", { width: e, height: r, rx: 8, fill: "#F3F0FA" }),
10
- /* @__PURE__ */ n(
11
- "text",
12
- {
13
- x: e / 2,
14
- y: r / 2,
15
- textAnchor: "middle",
16
- dominantBaseline: "central",
17
- fill: "#7e4ea5",
18
- fontSize: 14,
19
- fontFamily: "Inter, sans-serif",
20
- children: "LineChart placeholder"
21
- }
22
- )
23
- ] });
20
+ const {
21
+ scaleType: u,
22
+ data: A,
23
+ domain: D,
24
+ ...n
25
+ } = f ?? {}, {
26
+ scaleType: C,
27
+ data: I,
28
+ domain: P,
29
+ ...o
30
+ } = l ?? {}, L = {
31
+ scaleType: u,
32
+ data: A,
33
+ domain: D
34
+ }, S = {
35
+ scaleType: C,
36
+ data: I,
37
+ domain: P
38
+ }, _ = E(() => {
39
+ if (!t && !i) return;
40
+ const a = n.position === "top" ? "top" : "bottom", s = o.position === "end" ? "right" : "left", p = o.width ?? H;
41
+ return {
42
+ top: t && a === "top" ? m : 0,
43
+ bottom: t && a === "bottom" ? m : 0,
44
+ left: i && s === "left" ? p : 0,
45
+ right: i && s === "right" ? p : 0
46
+ };
47
+ }, [
48
+ t,
49
+ i,
50
+ n.position,
51
+ o.position,
52
+ o.width
53
+ ]);
54
+ return /* @__PURE__ */ b(
55
+ U,
56
+ {
57
+ series: r ?? [],
58
+ xAxis: L,
59
+ yAxis: S,
60
+ width: x,
61
+ height: y,
62
+ inset: T,
63
+ axisPadding: _,
64
+ children: [
65
+ t && /* @__PURE__ */ e(F, { ...n }),
66
+ i && /* @__PURE__ */ e(j, { ...o }),
67
+ r?.map((a) => /* @__PURE__ */ e(
68
+ V,
69
+ {
70
+ seriesId: a.id,
71
+ showArea: d,
72
+ areaType: c
73
+ },
74
+ a.id
75
+ )),
76
+ g
77
+ ]
78
+ }
79
+ );
24
80
  }
25
81
  export {
26
- a as LineChart
82
+ q as LineChart
27
83
  };
@@ -1,2 +1,3 @@
1
1
  export { LineChart } from './LineChart';
2
+ export type { LineChartProps } from './types';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/LineChart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/LineChart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { ReactNode } from 'react';
2
+ import { AxisConfigProps, ChartInset, Series } from '../../utils/types';
3
+ import { XAxisProps } from '../Axis/XAxis';
4
+ import { YAxisProps } from '../Axis/YAxis';
5
+ export type LineChartProps = {
6
+ /**
7
+ * Data series to render as lines.
8
+ * Each series produces one `<Line>` element.
9
+ */
10
+ series?: Series[];
11
+ /**
12
+ * Whether to show area fill under all lines.
13
+ * @default false
14
+ */
15
+ showArea?: boolean;
16
+ /**
17
+ * Area fill style applied to all lines.
18
+ * When `'gradient'`, renders a vertical gradient from the stroke color to transparent.
19
+ * @default 'gradient'
20
+ */
21
+ areaType?: 'gradient';
22
+ /**
23
+ * Whether to render an x-axis.
24
+ * @default false
25
+ */
26
+ showXAxis?: boolean;
27
+ /**
28
+ * Whether to render a y-axis.
29
+ * @default false
30
+ */
31
+ showYAxis?: boolean;
32
+ /**
33
+ * Combined axis configuration and visual props for the x-axis.
34
+ * Includes scale/domain settings as well as visual options like `showGrid` and `showLine`.
35
+ */
36
+ xAxis?: Partial<AxisConfigProps> & XAxisProps;
37
+ /**
38
+ * Combined axis configuration and visual props for the y-axis.
39
+ * Includes scale/domain settings as well as visual options like `showGrid` and `showLine`.
40
+ */
41
+ yAxis?: Partial<AxisConfigProps> & YAxisProps;
42
+ /**
43
+ * Width of the chart.
44
+ * A number is treated as pixels; a string (e.g. `'100%'`) fills the container.
45
+ * @default '100%'
46
+ */
47
+ width?: number | string;
48
+ /**
49
+ * Height of the chart in pixels.
50
+ * @default 160
51
+ */
52
+ height?: number;
53
+ /**
54
+ * Padding between the SVG edge and the drawing area.
55
+ * A number applies uniformly; a partial object overrides individual sides.
56
+ */
57
+ inset?: number | Partial<ChartInset>;
58
+ /**
59
+ * Additional SVG content rendered inside the chart after lines and axes.
60
+ */
61
+ children?: ReactNode;
62
+ };
63
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/LineChart/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;IAC9C;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;IAC9C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { AxisBounds, AxisConfigProps, Series } from '../types';
2
+ /**
3
+ * Compute the X domain (index-based) from series data and axis config.
4
+ * For the X axis the domain is typically 0..N-1 where N = longest series length,
5
+ * unless explicit `data` is provided on the axis config.
6
+ */
7
+ export declare const computeXDomain: (series: Series[], axisConfig?: Partial<AxisConfigProps>) => AxisBounds;
8
+ /**
9
+ * Compute the Y domain (value-based) from series data and axis config.
10
+ * Scans all non-null values across all series to find min/max.
11
+ */
12
+ export declare const computeYDomain: (series: Series[], axisConfig?: Partial<AxisConfigProps>) => AxisBounds;
13
+ /**
14
+ * Compute the data length (number of discrete positions on the index axis).
15
+ */
16
+ export declare const computeDataLength: (series: Series[], axisConfig?: Partial<AxisConfigProps>) => number;
17
+ //# sourceMappingURL=domain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/domain/domain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,EAAE,EAChB,aAAa,OAAO,CAAC,eAAe,CAAC,KACpC,UA4BF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,EAAE,EAChB,aAAa,OAAO,CAAC,eAAe,CAAC,KACpC,UAwBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,MAAM,EAAE,EAChB,aAAa,OAAO,CAAC,eAAe,CAAC,KACpC,MAKF,CAAC"}
@@ -0,0 +1,38 @@
1
+ const i = (m, t) => {
2
+ const n = t?.data;
3
+ let e;
4
+ if (n && n.length > 0)
5
+ if (typeof n[0] == "number") {
6
+ const l = n;
7
+ let u = l[0], o = l[0];
8
+ for (let a = 1; a < l.length; a += 1) {
9
+ const c = l[a];
10
+ c < u && (u = c), c > o && (o = c);
11
+ }
12
+ e = { min: u, max: o };
13
+ } else
14
+ e = { min: 0, max: n.length - 1 };
15
+ else {
16
+ const l = m.reduce(
17
+ (u, o) => Math.max(u, o.data?.length ?? 0),
18
+ 0
19
+ );
20
+ e = { min: 0, max: Math.max(0, l - 1) };
21
+ }
22
+ return f(e, t?.domain);
23
+ }, r = (m, t) => {
24
+ let n = 0, e = 0, l = !1;
25
+ for (const o of m)
26
+ if (o.data)
27
+ for (const a of o.data)
28
+ a != null && (l ? (a < n && (n = a), a > e && (e = a)) : (n = a, e = a, l = !0));
29
+ return f(l ? { min: n, max: e } : { min: 0, max: 1 }, t?.domain);
30
+ }, s = (m, t) => t?.data && t.data.length > 0 ? t.data.length : m.reduce((n, e) => Math.max(n, e.data?.length ?? 0), 0), f = (m, t) => t ? typeof t == "function" ? t(m) : {
31
+ min: t.min ?? m.min,
32
+ max: t.max ?? m.max
33
+ } : m;
34
+ export {
35
+ s as computeDataLength,
36
+ i as computeXDomain,
37
+ r as computeYDomain
38
+ };
@@ -1,2 +1,2 @@
1
- export * from './types';
1
+ export type { AxisBounds, AxisConfigProps, CartesianChartContextValue, CategoricalScale, ChartInset, ChartScaleFunction, 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,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,MAAM,GACP,MAAM,SAAS,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { AxisBounds, AxisConfigProps, CategoricalScale, ChartScaleFunction, NumericScale } from '../types';
2
+ export declare const getNumericScale: ({ scaleType, domain, range, }: {
3
+ scaleType: "linear" | "log";
4
+ domain: AxisBounds;
5
+ range: AxisBounds;
6
+ }) => NumericScale;
7
+ export declare const getCategoricalScale: ({ domain, range, padding, }: {
8
+ domain: AxisBounds;
9
+ range: AxisBounds;
10
+ padding?: number;
11
+ }) => CategoricalScale;
12
+ /**
13
+ * Checks if a scale type config value refers to a band (categorical) scale.
14
+ */
15
+ export declare const isBandScaleType: (scaleType: AxisConfigProps["scaleType"]) => scaleType is "band";
16
+ /**
17
+ * Checks if a scale is a categorical scale.
18
+ */
19
+ export declare const isCategoricalScale: (scale: ChartScaleFunction) => scale is CategoricalScale;
20
+ /**
21
+ * Checks if a scale is a numeric scale.
22
+ */
23
+ export declare const isNumericScale: (scale: ChartScaleFunction) => scale is NumericScale;
24
+ //# sourceMappingURL=scales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/scales/scales.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,eAAe,GAAI,+BAI7B;IACD,SAAS,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,UAAU,CAAC;CACnB,KAAG,YAGH,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,6BAIjC;IACD,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,KAAG,gBAUH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAW,eAAe,CAAC,WAAW,CAAC,KACtC,SAAS,IAAI,MAA8B,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,kBAAkB,KACxB,KAAK,IAAI,gBAEX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,kBAAkB,KACxB,KAAK,IAAI,YAEX,CAAC"}
@@ -0,0 +1,25 @@
1
+ import i from "../../../node_modules/d3-scale/src/band.js";
2
+ import o from "../../../node_modules/d3-scale/src/log.js";
3
+ import c from "../../../node_modules/d3-scale/src/linear.js";
4
+ const u = ({
5
+ scaleType: n,
6
+ domain: r,
7
+ range: t
8
+ }) => (n === "log" ? o() : c()).domain([r.min, r.max]).range([t.min, t.max]), p = ({
9
+ domain: n,
10
+ range: r,
11
+ padding: t = 0.1
12
+ }) => {
13
+ const a = Array.from(
14
+ { length: n.max - n.min + 1 },
15
+ (l, e) => n.min + e
16
+ );
17
+ return i().domain(a).range([r.min, r.max]).paddingInner(t).paddingOuter(t / 2);
18
+ }, f = (n) => n === "band", m = (n) => "bandwidth" in n && typeof n.bandwidth == "function", x = (n) => !m(n);
19
+ export {
20
+ p as getCategoricalScale,
21
+ u as getNumericScale,
22
+ f as isBandScaleType,
23
+ m as isCategoricalScale,
24
+ x as isNumericScale
25
+ };
@@ -0,0 +1,27 @@
1
+ import { AxisConfigProps, ChartScaleFunction } from '../types';
2
+ export declare const APPROXIMATE_TICK_COUNT = 5;
3
+ export type TickData = {
4
+ position: number;
5
+ value: number;
6
+ label: string;
7
+ };
8
+ /**
9
+ * Resolves which numeric tick values should appear on the axis.
10
+ * Explicit ticks take priority, then scale-specific defaults.
11
+ */
12
+ export declare const getTickValues: (scale: ChartScaleFunction, explicitTicks?: number[]) => number[];
13
+ /**
14
+ * Converts a tick value to its pixel position on the axis.
15
+ * Band scales are centered within the band.
16
+ */
17
+ export declare const getTickPosition: (scale: ChartScaleFunction, tick: number) => number;
18
+ /**
19
+ * Resolves the display label for a tick value.
20
+ * Priority: formatter > string label lookup > raw value.
21
+ */
22
+ export declare const getTickLabel: (tick: number, axisData: AxisConfigProps["data"], formatter?: (value: number | string) => string) => string;
23
+ /**
24
+ * Builds the complete tick data array from a scale and axis configuration.
25
+ */
26
+ export declare const buildTicksData: (scale: ChartScaleFunction, axisConfig?: AxisConfigProps, explicitTicks?: number[], formatter?: (value: number | string) => string) => TickData[];
27
+ //# sourceMappingURL=ticks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ticks.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/ticks/ticks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEpE,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;;;GAGG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,kBAAkB,EACzB,gBAAgB,MAAM,EAAE,KACvB,MAAM,EAKR,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,eAAe,CAAC,MAAM,CAAC,EACjC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,KAC7C,MAeF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,kBAAkB,EACzB,aAAa,eAAe,EAC5B,gBAAgB,MAAM,EAAE,EACxB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,KAC7C,QAAQ,EASV,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { isCategoricalScale as u, isNumericScale as s } from "../scales/scales.js";
2
+ const d = 5, f = (r, n) => n || (u(r) ? r.domain() : s(r) ? r.ticks(d) : []), S = (r, n) => u(r) ? (r(n) ?? 0) + r.bandwidth() / 2 : r(n), T = (r, n, t) => {
3
+ const o = n && Array.isArray(n) && typeof n[0] == "string";
4
+ if (t) {
5
+ const e = o && n[r] !== void 0 ? n[r] : r;
6
+ return String(t(e));
7
+ }
8
+ return o && n[r] !== void 0 ? String(n[r]) : String(r);
9
+ }, l = (r, n, t, o) => {
10
+ const e = f(r, t), g = n?.data;
11
+ return e.map((i) => ({
12
+ position: S(r, i),
13
+ value: i,
14
+ label: T(i, g, o)
15
+ }));
16
+ };
17
+ export {
18
+ d as APPROXIMATE_TICK_COUNT,
19
+ l as buildTicksData,
20
+ T as getTickLabel,
21
+ S as getTickPosition,
22
+ f as getTickValues
23
+ };
@@ -1,11 +1,95 @@
1
- export type DataPoint = {
2
- timestamp: number;
3
- value: number;
1
+ import { ScaleBand, ScaleLinear, ScaleLogarithmic } from 'd3-scale';
2
+ export type AxisBounds = {
3
+ min: number;
4
+ max: number;
5
+ };
6
+ export type ChartInset = {
7
+ top: number;
8
+ right: number;
9
+ bottom: number;
10
+ left: number;
11
+ };
12
+ /**
13
+ * Pixel bounds of the drawable region.
14
+ */
15
+ export type DrawingArea = {
16
+ x: number;
17
+ y: number;
18
+ width: number;
19
+ height: number;
4
20
  };
5
21
  export type Series = {
22
+ /**
23
+ * Unique identifier for the series.
24
+ */
6
25
  id: string;
7
- label: string;
8
- data: DataPoint[];
9
- color?: string;
26
+ /**
27
+ * Numeric data points; `null` entries represent gaps.
28
+ */
29
+ data?: Array<number | null>;
30
+ /**
31
+ * Human-readable label used in legends and tooltips.
32
+ */
33
+ label?: string;
34
+ /**
35
+ * CSS color applied to the series line/mark.
36
+ */
37
+ stroke: string;
38
+ };
39
+ export type AxisConfigProps = {
40
+ /**
41
+ * Scale algorithm used by this axis.
42
+ * @default 'linear'
43
+ */
44
+ scaleType?: 'linear' | 'log' | 'band';
45
+ /**
46
+ * Explicit data values for band scales or category labels.
47
+ * For band scales, provides the discrete domain. For numeric scales, string values
48
+ * are used as tick labels at corresponding indices.
49
+ */
50
+ data?: string[] | number[];
51
+ /**
52
+ * Fixed domain bounds or a function that adjusts the computed bounds.
53
+ * A partial object overrides only the specified bound(s).
54
+ * A function receives the auto-computed bounds and returns adjusted ones.
55
+ */
56
+ domain?: Partial<AxisBounds> | ((bounds: AxisBounds) => AxisBounds);
57
+ };
58
+ export type NumericScale = ScaleLinear<number, number> | ScaleLogarithmic<number, number>;
59
+ export type CategoricalScale = ScaleBand<number>;
60
+ export type ChartScaleFunction = NumericScale | CategoricalScale;
61
+ export type CartesianChartContextValue = {
62
+ /**
63
+ * All data series registered in the chart.
64
+ */
65
+ series: Series[];
66
+ /**
67
+ * Lookup map for series by ID. Stable reference when series identity is unchanged.
68
+ */
69
+ seriesMap: Map<string, Series>;
70
+ /**
71
+ * Returns the x-axis scale. Accepts an optional axis ID for future multi-axis support.
72
+ */
73
+ getXScale: (id?: string) => ChartScaleFunction | undefined;
74
+ /**
75
+ * Returns the y-axis scale. Accepts an optional axis ID for future multi-axis support.
76
+ */
77
+ getYScale: (id?: string) => ChartScaleFunction | undefined;
78
+ /**
79
+ * Returns the x-axis config. Accepts an optional axis ID for future multi-axis support.
80
+ */
81
+ getXAxisConfig: (id?: string) => AxisConfigProps | undefined;
82
+ /**
83
+ * Returns the y-axis config. Accepts an optional axis ID for future multi-axis support.
84
+ */
85
+ getYAxisConfig: (id?: string) => AxisConfigProps | undefined;
86
+ /**
87
+ * Pixel bounds of the drawable region.
88
+ */
89
+ drawingArea: DrawingArea;
90
+ /**
91
+ * Number of data points along the x-axis.
92
+ */
93
+ dataLength: number;
10
94
  };
11
95
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
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;AAEzE,MAAM,MAAM,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtD,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,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IACtC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,CAAC,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,YAAY,GACpB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAErC,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAEjE,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B;;OAEG;IACH,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IAC3D;;OAEG;IACH,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IAC3D;;OAEG;IACH,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,eAAe,GAAG,SAAS,CAAC;IAC7D;;OAEG;IACH,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,eAAe,GAAG,SAAS,CAAC;IAC7D;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { createSafeContext as e } from "../../../libs/utils-shared/dist/index.js";
2
+ const [o, r] = e("ThemeProvider"), m = () => r({
3
+ consumerName: "useTheme",
4
+ contextRequired: !0
5
+ });
6
+ export {
7
+ m as useTheme
8
+ };
@@ -0,0 +1,35 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { createContext as i, useRef as l, useContext as f } from "react";
3
+ function d(n, o) {
4
+ if (Object.is(n, o)) return !0;
5
+ const u = n, t = o, c = Object.keys(u), s = Object.keys(t);
6
+ return c.length !== s.length ? !1 : c.every(
7
+ (e) => Object.prototype.hasOwnProperty.call(t, e) && Object.is(u[e], t[e])
8
+ );
9
+ }
10
+ function b(n, o) {
11
+ const u = i(o), t = ({ children: s, value: e }) => {
12
+ const r = l(e);
13
+ return d(r.current, e) || (r.current = e), /* @__PURE__ */ a(u.Provider, { value: r.current, children: s });
14
+ };
15
+ t.displayName = n + "Provider";
16
+ function c({
17
+ consumerName: s,
18
+ contextRequired: e
19
+ }) {
20
+ const r = f(u);
21
+ if (r)
22
+ return r;
23
+ if (e)
24
+ throw new Error(
25
+ `${s} must be used within ${n}`
26
+ );
27
+ return o || {};
28
+ }
29
+ return [t, c];
30
+ }
31
+ b("Disabled", { disabled: !1 });
32
+ export {
33
+ b as createSafeContext,
34
+ d as shallowEqual
35
+ };