open-mcp-app-ui 0.0.3 → 0.0.6

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.
@@ -0,0 +1,124 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ export { Area, Bar, CartesianGrid, Cell, Legend, Line, Pie, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, Tooltip as RechartsTooltip, ReferenceArea, ReferenceLine, ResponsiveContainer, Scatter, XAxis, YAxis } from 'recharts';
4
+
5
+ /**
6
+ * Shared chart types.
7
+ * Defines the theme interface and common props used across all chart wrappers.
8
+ */
9
+
10
+ /**
11
+ * Color palette for multi-series charts.
12
+ * Each series gets the next color in the palette.
13
+ * Uses CSS variables from the MCP Apps spec where possible,
14
+ * with opacity variations for additional series.
15
+ */
16
+ declare const DEFAULT_PALETTE: string[];
17
+ /**
18
+ * Base props shared by all chart container wrappers.
19
+ */
20
+ interface ChartContainerProps {
21
+ /** Chart height in pixels. Width is always 100% of parent. */
22
+ height?: number;
23
+ /** Custom color palette for series data. Overrides the default palette. */
24
+ colorPalette?: string[];
25
+ /** Additional CSS class on the outermost wrapper. */
26
+ className?: string;
27
+ /** Inline styles on the outermost wrapper. */
28
+ style?: CSSProperties;
29
+ }
30
+
31
+ interface ThemedLineChartProps extends ChartContainerProps {
32
+ /** Chart data array. Each entry is one data point. */
33
+ data: Record<string, unknown>[];
34
+ /** Child elements (Line, XAxis, YAxis, Tooltip, Legend, etc.) */
35
+ children: ReactNode;
36
+ /** Show background grid lines. */
37
+ grid?: boolean;
38
+ }
39
+ /**
40
+ * Themed LineChart.
41
+ * Automatically assigns palette colors to Line children that
42
+ * don't have an explicit stroke prop.
43
+ */
44
+ declare const LineChart: ({ data, height, colorPalette, className, style, grid, children, }: ThemedLineChartProps) => react_jsx_runtime.JSX.Element;
45
+
46
+ interface ThemedBarChartProps extends ChartContainerProps {
47
+ /** Chart data array. */
48
+ data: Record<string, unknown>[];
49
+ children: ReactNode;
50
+ grid?: boolean;
51
+ }
52
+ /**
53
+ * Themed BarChart.
54
+ * Automatically assigns palette colors to Bar children.
55
+ */
56
+ declare const BarChart: ({ data, height, colorPalette, className, style, grid, children, }: ThemedBarChartProps) => react_jsx_runtime.JSX.Element;
57
+
58
+ interface ThemedAreaChartProps extends ChartContainerProps {
59
+ data: Record<string, unknown>[];
60
+ children: ReactNode;
61
+ grid?: boolean;
62
+ }
63
+ /**
64
+ * Themed AreaChart.
65
+ * Auto-assigns palette colors with gradient fill to Area children.
66
+ */
67
+ declare const AreaChart: ({ data, height, colorPalette, className, style, grid, children, }: ThemedAreaChartProps) => react_jsx_runtime.JSX.Element;
68
+
69
+ interface ThemedPieChartProps extends Omit<ChartContainerProps, "height"> {
70
+ /** Chart height (also used for approximate width in responsive container). */
71
+ height?: number;
72
+ children: ReactNode;
73
+ }
74
+ /**
75
+ * Themed PieChart.
76
+ * Auto-assigns palette colors to Pie data via Cell children when no
77
+ * explicit fill is provided on individual data entries.
78
+ */
79
+ declare const PieChart: ({ height, colorPalette, className, style, children, }: ThemedPieChartProps) => react_jsx_runtime.JSX.Element;
80
+
81
+ interface ThemedScatterChartProps extends ChartContainerProps {
82
+ children: ReactNode;
83
+ grid?: boolean;
84
+ }
85
+ /**
86
+ * Themed ScatterChart.
87
+ * Auto-assigns palette fill colors to Scatter children.
88
+ */
89
+ declare const ScatterChart: ({ height, colorPalette, className, style, grid, children, }: ThemedScatterChartProps) => react_jsx_runtime.JSX.Element;
90
+
91
+ interface ThemedRadarChartProps extends ChartContainerProps {
92
+ data: Record<string, unknown>[];
93
+ children: ReactNode;
94
+ }
95
+ /**
96
+ * Themed RadarChart.
97
+ * Auto-assigns palette colors to Radar children.
98
+ */
99
+ declare const RadarChart: ({ data, height, colorPalette, className, style, children, }: ThemedRadarChartProps) => react_jsx_runtime.JSX.Element;
100
+
101
+ interface ThemedComposedChartProps extends ChartContainerProps {
102
+ data: Record<string, unknown>[];
103
+ children: ReactNode;
104
+ grid?: boolean;
105
+ }
106
+ /**
107
+ * Themed ComposedChart.
108
+ * Auto-assigns palette colors to Line, Bar, and Area children.
109
+ */
110
+ declare const ComposedChart: ({ data, height, colorPalette, className, style, grid, children, }: ThemedComposedChartProps) => react_jsx_runtime.JSX.Element;
111
+
112
+ /**
113
+ * ThemedTooltip — Pre-themed tooltip using MCP Apps spec CSS variables.
114
+ *
115
+ * Drop-in replacement for Recharts' Tooltip that automatically
116
+ * applies the host's theme colors for background, text, border.
117
+ */
118
+ /**
119
+ * A themed Tooltip that reads CSS variables at render time.
120
+ * Forwards all standard Recharts Tooltip props.
121
+ */
122
+ declare const ThemedTooltip: (props: any) => react_jsx_runtime.JSX.Element;
123
+
124
+ export { AreaChart, BarChart, type ChartContainerProps, ComposedChart, DEFAULT_PALETTE, LineChart, PieChart, RadarChart, ScatterChart, ThemedTooltip as Tooltip };
@@ -0,0 +1,401 @@
1
+ // src/charts/LineChart.tsx
2
+ import { Children, cloneElement, isValidElement } from "react";
3
+ import {
4
+ LineChart as RechartsLineChart,
5
+ Line as RechartsLine,
6
+ CartesianGrid
7
+ } from "recharts";
8
+
9
+ // src/charts/ChartContainer.tsx
10
+ import { ResponsiveContainer } from "recharts";
11
+
12
+ // src/charts/types.ts
13
+ var DEFAULT_PALETTE = [
14
+ "var(--color-accent, #6366f1)",
15
+ "var(--color-text-secondary, #6b7280)",
16
+ "var(--color-ring-primary, #a78bfa)",
17
+ "var(--color-text-tertiary, #9ca3af)",
18
+ "var(--color-border-primary, #d1d5db)",
19
+ "color-mix(in srgb, var(--color-accent, #6366f1) 60%, transparent)",
20
+ "color-mix(in srgb, var(--color-accent, #6366f1) 35%, transparent)"
21
+ ];
22
+
23
+ // src/charts/ChartContainer.tsx
24
+ import { jsx } from "react/jsx-runtime";
25
+ var ChartContainer = ({
26
+ height = 300,
27
+ className = "",
28
+ style,
29
+ children
30
+ }) => /* @__PURE__ */ jsx(
31
+ "div",
32
+ {
33
+ className: `omu-chart w-full ${className}`,
34
+ style: { height: `${height}px`, ...style },
35
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children })
36
+ }
37
+ );
38
+ var getSeriesColor = ({
39
+ index,
40
+ palette
41
+ }) => {
42
+ const colors = palette ?? DEFAULT_PALETTE;
43
+ return colors[index % colors.length];
44
+ };
45
+
46
+ // src/charts/theme.ts
47
+ var getCSSVar = ({ name, fallback }) => {
48
+ if (typeof window === "undefined") return fallback;
49
+ const value = getComputedStyle(document.documentElement).getPropertyValue(name).trim();
50
+ return value || fallback;
51
+ };
52
+ var getTooltipStyle = () => ({
53
+ contentStyle: {
54
+ backgroundColor: getCSSVar({ name: "--color-background-secondary", fallback: "#f9fafb" }),
55
+ border: `1px solid ${getCSSVar({ name: "--color-border-secondary", fallback: "#e5e7eb" })}`,
56
+ borderRadius: getCSSVar({ name: "--border-radius-md", fallback: "8px" }),
57
+ color: getCSSVar({ name: "--color-text-primary", fallback: "#111827" }),
58
+ fontSize: getCSSVar({ name: "--font-text-sm-size", fallback: "13px" }),
59
+ fontFamily: getCSSVar({ name: "--font-sans", fallback: "ui-sans-serif, system-ui, sans-serif" }),
60
+ padding: "8px 12px",
61
+ boxShadow: "0 4px 12px rgba(0,0,0,0.08)"
62
+ },
63
+ labelStyle: {
64
+ color: getCSSVar({ name: "--color-text-primary", fallback: "#111827" }),
65
+ fontWeight: 500,
66
+ marginBottom: "4px"
67
+ }
68
+ });
69
+ var getGridColor = () => getCSSVar({ name: "--color-border-secondary", fallback: "#e5e7eb" });
70
+
71
+ // src/charts/LineChart.tsx
72
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
73
+ var LineChart = ({
74
+ data,
75
+ height,
76
+ colorPalette,
77
+ className,
78
+ style,
79
+ grid = true,
80
+ children
81
+ }) => {
82
+ let seriesIndex = 0;
83
+ const themedChildren = Children.map(children, (child) => {
84
+ if (!isValidElement(child)) return child;
85
+ if (child.type === RechartsLine || child.type?.displayName === "Line") {
86
+ const idx = seriesIndex++;
87
+ const existing = child.props.stroke;
88
+ return cloneElement(child, {
89
+ stroke: existing || getSeriesColor({ index: idx, palette: colorPalette }),
90
+ strokeWidth: child.props.strokeWidth ?? 2,
91
+ dot: child.props.dot ?? false,
92
+ activeDot: child.props.activeDot ?? { r: 4 }
93
+ });
94
+ }
95
+ return child;
96
+ });
97
+ return /* @__PURE__ */ jsx2(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs(RechartsLineChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
98
+ grid && /* @__PURE__ */ jsx2(CartesianGrid, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5 }),
99
+ themedChildren
100
+ ] }) });
101
+ };
102
+
103
+ // src/charts/BarChart.tsx
104
+ import { Children as Children2, cloneElement as cloneElement2, isValidElement as isValidElement2 } from "react";
105
+ import {
106
+ BarChart as RechartsBarChart,
107
+ Bar as RechartsBar,
108
+ CartesianGrid as CartesianGrid2
109
+ } from "recharts";
110
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
111
+ var BarChart = ({
112
+ data,
113
+ height,
114
+ colorPalette,
115
+ className,
116
+ style,
117
+ grid = true,
118
+ children
119
+ }) => {
120
+ let seriesIndex = 0;
121
+ const themedChildren = Children2.map(children, (child) => {
122
+ if (!isValidElement2(child)) return child;
123
+ if (child.type === RechartsBar || child.type?.displayName === "Bar") {
124
+ const idx = seriesIndex++;
125
+ const existing = child.props.fill;
126
+ return cloneElement2(child, {
127
+ fill: existing || getSeriesColor({ index: idx, palette: colorPalette }),
128
+ radius: child.props.radius ?? [4, 4, 0, 0]
129
+ });
130
+ }
131
+ return child;
132
+ });
133
+ return /* @__PURE__ */ jsx3(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs2(RechartsBarChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
134
+ grid && /* @__PURE__ */ jsx3(CartesianGrid2, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5, vertical: false }),
135
+ themedChildren
136
+ ] }) });
137
+ };
138
+
139
+ // src/charts/AreaChart.tsx
140
+ import { Children as Children3, cloneElement as cloneElement3, isValidElement as isValidElement3 } from "react";
141
+ import {
142
+ AreaChart as RechartsAreaChart,
143
+ Area as RechartsArea,
144
+ CartesianGrid as CartesianGrid3
145
+ } from "recharts";
146
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
147
+ var AreaChart = ({
148
+ data,
149
+ height,
150
+ colorPalette,
151
+ className,
152
+ style,
153
+ grid = true,
154
+ children
155
+ }) => {
156
+ let seriesIndex = 0;
157
+ const themedChildren = Children3.map(children, (child) => {
158
+ if (!isValidElement3(child)) return child;
159
+ if (child.type === RechartsArea || child.type?.displayName === "Area") {
160
+ const idx = seriesIndex++;
161
+ const color = child.props.stroke || getSeriesColor({ index: idx, palette: colorPalette });
162
+ return cloneElement3(child, {
163
+ stroke: color,
164
+ fill: child.props.fill || color,
165
+ fillOpacity: child.props.fillOpacity ?? 0.15,
166
+ strokeWidth: child.props.strokeWidth ?? 2
167
+ });
168
+ }
169
+ return child;
170
+ });
171
+ return /* @__PURE__ */ jsx4(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs3(RechartsAreaChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
172
+ grid && /* @__PURE__ */ jsx4(CartesianGrid3, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5 }),
173
+ themedChildren
174
+ ] }) });
175
+ };
176
+
177
+ // src/charts/PieChart.tsx
178
+ import { Children as Children4, cloneElement as cloneElement4, isValidElement as isValidElement4 } from "react";
179
+ import {
180
+ PieChart as RechartsPieChart,
181
+ Pie as RechartsPie,
182
+ Cell
183
+ } from "recharts";
184
+ import { jsx as jsx5 } from "react/jsx-runtime";
185
+ var PieChart = ({
186
+ height,
187
+ colorPalette,
188
+ className,
189
+ style,
190
+ children
191
+ }) => {
192
+ const themedChildren = Children4.map(children, (child) => {
193
+ if (!isValidElement4(child)) return child;
194
+ if (child.type === RechartsPie || child.type?.displayName === "Pie") {
195
+ const props = child.props;
196
+ const data = props.data ?? [];
197
+ const hasExplicitCells = Children4.toArray(props.children).some(
198
+ (c) => isValidElement4(c) && (c.type === Cell || c.type?.displayName === "Cell")
199
+ );
200
+ if (!hasExplicitCells && data.length > 0) {
201
+ return cloneElement4(child, {
202
+ children: data.map((_, i) => /* @__PURE__ */ jsx5(Cell, { fill: getSeriesColor({ index: i, palette: colorPalette }) }, `cell-${i}`))
203
+ });
204
+ }
205
+ }
206
+ return child;
207
+ });
208
+ return /* @__PURE__ */ jsx5(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsx5(RechartsPieChart, { children: themedChildren }) });
209
+ };
210
+
211
+ // src/charts/ScatterChart.tsx
212
+ import { Children as Children5, cloneElement as cloneElement5, isValidElement as isValidElement5 } from "react";
213
+ import {
214
+ ScatterChart as RechartsScatterChart,
215
+ Scatter as RechartsScatter,
216
+ CartesianGrid as CartesianGrid4
217
+ } from "recharts";
218
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
219
+ var ScatterChart = ({
220
+ height,
221
+ colorPalette,
222
+ className,
223
+ style,
224
+ grid = true,
225
+ children
226
+ }) => {
227
+ let seriesIndex = 0;
228
+ const themedChildren = Children5.map(children, (child) => {
229
+ if (!isValidElement5(child)) return child;
230
+ if (child.type === RechartsScatter || child.type?.displayName === "Scatter") {
231
+ const idx = seriesIndex++;
232
+ const existing = child.props.fill;
233
+ return cloneElement5(child, {
234
+ fill: existing || getSeriesColor({ index: idx, palette: colorPalette })
235
+ });
236
+ }
237
+ return child;
238
+ });
239
+ return /* @__PURE__ */ jsx6(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs4(RechartsScatterChart, { margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
240
+ grid && /* @__PURE__ */ jsx6(CartesianGrid4, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5 }),
241
+ themedChildren
242
+ ] }) });
243
+ };
244
+
245
+ // src/charts/RadarChart.tsx
246
+ import { Children as Children6, cloneElement as cloneElement6, isValidElement as isValidElement6 } from "react";
247
+ import {
248
+ RadarChart as RechartsRadarChart,
249
+ Radar as RechartsRadar
250
+ } from "recharts";
251
+ import { jsx as jsx7 } from "react/jsx-runtime";
252
+ var RadarChart = ({
253
+ data,
254
+ height,
255
+ colorPalette,
256
+ className,
257
+ style,
258
+ children
259
+ }) => {
260
+ let seriesIndex = 0;
261
+ const themedChildren = Children6.map(children, (child) => {
262
+ if (!isValidElement6(child)) return child;
263
+ if (child.type === RechartsRadar || child.type?.displayName === "Radar") {
264
+ const idx = seriesIndex++;
265
+ const color = child.props.stroke || getSeriesColor({ index: idx, palette: colorPalette });
266
+ return cloneElement6(child, {
267
+ stroke: color,
268
+ fill: child.props.fill || color,
269
+ fillOpacity: child.props.fillOpacity ?? 0.2
270
+ });
271
+ }
272
+ return child;
273
+ });
274
+ return /* @__PURE__ */ jsx7(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsx7(RechartsRadarChart, { data, cx: "50%", cy: "50%", outerRadius: "70%", children: themedChildren }) });
275
+ };
276
+
277
+ // src/charts/ComposedChart.tsx
278
+ import { Children as Children7, cloneElement as cloneElement7, isValidElement as isValidElement7 } from "react";
279
+ import {
280
+ ComposedChart as RechartsComposedChart,
281
+ Line as RechartsLine2,
282
+ Bar as RechartsBar2,
283
+ Area as RechartsArea2,
284
+ CartesianGrid as CartesianGrid5
285
+ } from "recharts";
286
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
287
+ var ComposedChart = ({
288
+ data,
289
+ height,
290
+ colorPalette,
291
+ className,
292
+ style,
293
+ grid = true,
294
+ children
295
+ }) => {
296
+ let seriesIndex = 0;
297
+ const themedChildren = Children7.map(children, (child) => {
298
+ if (!isValidElement7(child)) return child;
299
+ const t = child.type;
300
+ const dn = t?.displayName;
301
+ if (t === RechartsLine2 || dn === "Line") {
302
+ const idx = seriesIndex++;
303
+ return cloneElement7(child, {
304
+ stroke: child.props.stroke || getSeriesColor({ index: idx, palette: colorPalette }),
305
+ strokeWidth: child.props.strokeWidth ?? 2,
306
+ dot: child.props.dot ?? false
307
+ });
308
+ }
309
+ if (t === RechartsBar2 || dn === "Bar") {
310
+ const idx = seriesIndex++;
311
+ return cloneElement7(child, {
312
+ fill: child.props.fill || getSeriesColor({ index: idx, palette: colorPalette }),
313
+ radius: child.props.radius ?? [4, 4, 0, 0]
314
+ });
315
+ }
316
+ if (t === RechartsArea2 || dn === "Area") {
317
+ const idx = seriesIndex++;
318
+ const color = child.props.stroke || getSeriesColor({ index: idx, palette: colorPalette });
319
+ return cloneElement7(child, {
320
+ stroke: color,
321
+ fill: child.props.fill || color,
322
+ fillOpacity: child.props.fillOpacity ?? 0.15,
323
+ strokeWidth: child.props.strokeWidth ?? 2
324
+ });
325
+ }
326
+ return child;
327
+ });
328
+ return /* @__PURE__ */ jsx8(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs5(RechartsComposedChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
329
+ grid && /* @__PURE__ */ jsx8(CartesianGrid5, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5 }),
330
+ themedChildren
331
+ ] }) });
332
+ };
333
+
334
+ // src/charts/ThemedTooltip.tsx
335
+ import { useMemo } from "react";
336
+ import { Tooltip as RechartsTooltip } from "recharts";
337
+ import { jsx as jsx9 } from "react/jsx-runtime";
338
+ var ThemedTooltip = (props) => {
339
+ const style = useMemo(() => getTooltipStyle(), []);
340
+ return /* @__PURE__ */ jsx9(
341
+ RechartsTooltip,
342
+ {
343
+ contentStyle: style.contentStyle,
344
+ labelStyle: style.labelStyle,
345
+ cursor: { stroke: "var(--color-border-secondary, #e5e7eb)", strokeWidth: 1 },
346
+ ...props
347
+ }
348
+ );
349
+ };
350
+
351
+ // src/charts/index.ts
352
+ import {
353
+ Line,
354
+ Bar,
355
+ Area,
356
+ Pie,
357
+ Scatter,
358
+ Radar,
359
+ Cell as Cell2,
360
+ XAxis,
361
+ YAxis,
362
+ CartesianGrid as CartesianGrid6,
363
+ Legend,
364
+ PolarGrid,
365
+ PolarAngleAxis,
366
+ PolarRadiusAxis,
367
+ Tooltip,
368
+ ReferenceLine,
369
+ ReferenceArea,
370
+ ResponsiveContainer as ResponsiveContainer2
371
+ } from "recharts";
372
+ export {
373
+ Area,
374
+ AreaChart,
375
+ Bar,
376
+ BarChart,
377
+ CartesianGrid6 as CartesianGrid,
378
+ Cell2 as Cell,
379
+ ComposedChart,
380
+ DEFAULT_PALETTE,
381
+ Legend,
382
+ Line,
383
+ LineChart,
384
+ Pie,
385
+ PieChart,
386
+ PolarAngleAxis,
387
+ PolarGrid,
388
+ PolarRadiusAxis,
389
+ Radar,
390
+ RadarChart,
391
+ Tooltip as RechartsTooltip,
392
+ ReferenceArea,
393
+ ReferenceLine,
394
+ ResponsiveContainer2 as ResponsiveContainer,
395
+ Scatter,
396
+ ScatterChart,
397
+ ThemedTooltip as Tooltip,
398
+ XAxis,
399
+ YAxis
400
+ };
401
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/charts/LineChart.tsx","../../src/charts/ChartContainer.tsx","../../src/charts/types.ts","../../src/charts/theme.ts","../../src/charts/BarChart.tsx","../../src/charts/AreaChart.tsx","../../src/charts/PieChart.tsx","../../src/charts/ScatterChart.tsx","../../src/charts/RadarChart.tsx","../../src/charts/ComposedChart.tsx","../../src/charts/ThemedTooltip.tsx","../../src/charts/index.ts"],"sourcesContent":["/**\n * LineChart — Themed line/trend chart wrapper.\n *\n * Thin wrapper around Recharts' LineChart that auto-applies\n * MCP Apps spec CSS variable theming to all visual elements.\n *\n * @example\n * ```tsx\n * import { LineChart, Line, XAxis, YAxis, Tooltip } from \"open-mcp-app-ui/charts\";\n *\n * <LineChart data={data} height={300}>\n * <XAxis dataKey=\"month\" />\n * <YAxis />\n * <Tooltip />\n * <Line dataKey=\"revenue\" />\n * </LineChart>\n * ```\n */\n\nimport React, { type ReactNode, Children, cloneElement, isValidElement } from \"react\";\nimport {\n LineChart as RechartsLineChart,\n Line as RechartsLine,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor } from \"./theme.js\";\nimport type { ChartContainerProps } from \"./types.js\";\n\ninterface ThemedLineChartProps extends ChartContainerProps {\n /** Chart data array. Each entry is one data point. */\n data: Record<string, unknown>[];\n /** Child elements (Line, XAxis, YAxis, Tooltip, Legend, etc.) */\n children: ReactNode;\n /** Show background grid lines. */\n grid?: boolean;\n}\n\n/**\n * Themed LineChart.\n * Automatically assigns palette colors to Line children that\n * don't have an explicit stroke prop.\n */\nexport const LineChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n children,\n}: ThemedLineChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n if ((child.type as any) === RechartsLine || (child.type as any)?.displayName === \"Line\") {\n const idx = seriesIndex++;\n const existing = (child.props as any).stroke;\n return cloneElement(child as React.ReactElement<any>, {\n stroke: existing || getSeriesColor({ index: idx, palette: colorPalette }),\n strokeWidth: (child.props as any).strokeWidth ?? 2,\n dot: (child.props as any).dot ?? false,\n activeDot: (child.props as any).activeDot ?? { r: 4 },\n });\n }\n return child;\n });\n\n return (\n <ChartContainer height={height} className={className} style={style}>\n <RechartsLineChart data={data} margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" stroke={getGridColor()} opacity={0.5} />}\n {themedChildren}\n </RechartsLineChart>\n </ChartContainer>\n );\n};\n","/**\n * ChartContainer — Responsive wrapper for all chart types.\n *\n * Wraps Recharts' ResponsiveContainer with the theme palette context.\n * All chart wrappers use this internally. Not exported directly — each\n * chart type (LineChart, BarChart, etc.) composes it.\n */\n\nimport { type ReactNode } from \"react\";\nimport { ResponsiveContainer } from \"recharts\";\nimport { DEFAULT_PALETTE, type ChartContainerProps } from \"./types.js\";\n\n/**\n * Provides a responsive, themed container for a Recharts chart.\n * Fills 100% width of its parent and uses the specified height.\n */\nexport const ChartContainer = ({\n height = 300,\n className = \"\",\n style,\n children,\n}: ChartContainerProps & { children: ReactNode }) => (\n <div\n className={`omu-chart w-full ${className}`}\n style={{ height: `${height}px`, ...style }}\n >\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n {children as React.ReactElement}\n </ResponsiveContainer>\n </div>\n);\n\n/**\n * Get the color for a given series index from the palette.\n * Wraps around if there are more series than palette entries.\n */\nexport const getSeriesColor = ({\n index,\n palette,\n}: {\n index: number;\n palette?: string[];\n}): string => {\n const colors = palette ?? DEFAULT_PALETTE;\n return colors[index % colors.length];\n};\n","/**\n * Shared chart types.\n * Defines the theme interface and common props used across all chart wrappers.\n */\n\nimport type { CSSProperties } from \"react\";\n\n/**\n * Color palette for multi-series charts.\n * Each series gets the next color in the palette.\n * Uses CSS variables from the MCP Apps spec where possible,\n * with opacity variations for additional series.\n */\nexport const DEFAULT_PALETTE = [\n \"var(--color-accent, #6366f1)\",\n \"var(--color-text-secondary, #6b7280)\",\n \"var(--color-ring-primary, #a78bfa)\",\n \"var(--color-text-tertiary, #9ca3af)\",\n \"var(--color-border-primary, #d1d5db)\",\n \"color-mix(in srgb, var(--color-accent, #6366f1) 60%, transparent)\",\n \"color-mix(in srgb, var(--color-accent, #6366f1) 35%, transparent)\",\n];\n\n/**\n * Base props shared by all chart container wrappers.\n */\nexport interface ChartContainerProps {\n /** Chart height in pixels. Width is always 100% of parent. */\n height?: number;\n /** Custom color palette for series data. Overrides the default palette. */\n colorPalette?: string[];\n /** Additional CSS class on the outermost wrapper. */\n className?: string;\n /** Inline styles on the outermost wrapper. */\n style?: CSSProperties;\n}\n","/**\n * Chart Theme — CSS variable mapping for Recharts.\n *\n * Reads MCP Apps spec CSS variables at render time and provides\n * them as style objects for Recharts sub-components (tooltip, grid,\n * axis labels, legend). This is how charts automatically adapt to\n * the host's theme without configuration.\n */\n\n/**\n * Resolve a CSS variable value at runtime.\n * Falls back to the provided default if the variable is not set.\n */\nexport const getCSSVar = ({ name, fallback }: { name: string; fallback: string }): string => {\n if (typeof window === \"undefined\") return fallback;\n const value = getComputedStyle(document.documentElement).getPropertyValue(name).trim();\n return value || fallback;\n};\n\n/**\n * Themed tooltip style object for Recharts <Tooltip>.\n * Applied via contentStyle, labelStyle, and wrapperStyle props.\n */\nexport const getTooltipStyle = () => ({\n contentStyle: {\n backgroundColor: getCSSVar({ name: \"--color-background-secondary\", fallback: \"#f9fafb\" }),\n border: `1px solid ${getCSSVar({ name: \"--color-border-secondary\", fallback: \"#e5e7eb\" })}`,\n borderRadius: getCSSVar({ name: \"--border-radius-md\", fallback: \"8px\" }),\n color: getCSSVar({ name: \"--color-text-primary\", fallback: \"#111827\" }),\n fontSize: getCSSVar({ name: \"--font-text-sm-size\", fallback: \"13px\" }),\n fontFamily: getCSSVar({ name: \"--font-sans\", fallback: \"ui-sans-serif, system-ui, sans-serif\" }),\n padding: \"8px 12px\",\n boxShadow: \"0 4px 12px rgba(0,0,0,0.08)\",\n },\n labelStyle: {\n color: getCSSVar({ name: \"--color-text-primary\", fallback: \"#111827\" }),\n fontWeight: 500,\n marginBottom: \"4px\",\n },\n});\n\n/**\n * Themed grid line color for <CartesianGrid>.\n */\nexport const getGridColor = (): string =>\n getCSSVar({ name: \"--color-border-secondary\", fallback: \"#e5e7eb\" });\n\n/**\n * Themed axis tick/label style for <XAxis> and <YAxis>.\n */\nexport const getAxisStyle = () => ({\n tick: {\n fill: getCSSVar({ name: \"--color-text-secondary\", fallback: \"#6b7280\" }),\n fontSize: getCSSVar({ name: \"--font-text-xs-size\", fallback: \"11px\" }),\n fontFamily: getCSSVar({ name: \"--font-sans\", fallback: \"ui-sans-serif, system-ui, sans-serif\" }),\n },\n axisLine: {\n stroke: getCSSVar({ name: \"--color-border-secondary\", fallback: \"#e5e7eb\" }),\n },\n tickLine: {\n stroke: getCSSVar({ name: \"--color-border-secondary\", fallback: \"#e5e7eb\" }),\n },\n});\n\n/**\n * Themed legend style for <Legend>.\n */\nexport const getLegendStyle = () => ({\n color: getCSSVar({ name: \"--color-text-secondary\", fallback: \"#6b7280\" }),\n fontSize: getCSSVar({ name: \"--font-text-sm-size\", fallback: \"13px\" }),\n fontFamily: getCSSVar({ name: \"--font-sans\", fallback: \"ui-sans-serif, system-ui, sans-serif\" }),\n});\n","/**\n * BarChart — Themed bar/column chart wrapper.\n */\n\nimport React, { type ReactNode, Children, cloneElement, isValidElement } from \"react\";\nimport {\n BarChart as RechartsBarChart,\n Bar as RechartsBar,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor } from \"./theme.js\";\nimport type { ChartContainerProps } from \"./types.js\";\n\ninterface ThemedBarChartProps extends ChartContainerProps {\n /** Chart data array. */\n data: Record<string, unknown>[];\n children: ReactNode;\n grid?: boolean;\n}\n\n/**\n * Themed BarChart.\n * Automatically assigns palette colors to Bar children.\n */\nexport const BarChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n children,\n}: ThemedBarChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n if ((child.type as any) === RechartsBar || (child.type as any)?.displayName === \"Bar\") {\n const idx = seriesIndex++;\n const existing = (child.props as any).fill;\n return cloneElement(child as React.ReactElement<any>, {\n fill: existing || getSeriesColor({ index: idx, palette: colorPalette }),\n radius: (child.props as any).radius ?? [4, 4, 0, 0],\n });\n }\n return child;\n });\n\n return (\n <ChartContainer height={height} className={className} style={style}>\n <RechartsBarChart data={data} margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" stroke={getGridColor()} opacity={0.5} vertical={false} />}\n {themedChildren}\n </RechartsBarChart>\n </ChartContainer>\n );\n};\n","/**\n * AreaChart — Themed area/volume chart wrapper.\n */\n\nimport React, { type ReactNode, Children, cloneElement, isValidElement } from \"react\";\nimport {\n AreaChart as RechartsAreaChart,\n Area as RechartsArea,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor } from \"./theme.js\";\nimport type { ChartContainerProps } from \"./types.js\";\n\ninterface ThemedAreaChartProps extends ChartContainerProps {\n data: Record<string, unknown>[];\n children: ReactNode;\n grid?: boolean;\n}\n\n/**\n * Themed AreaChart.\n * Auto-assigns palette colors with gradient fill to Area children.\n */\nexport const AreaChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n children,\n}: ThemedAreaChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n if ((child.type as any) === RechartsArea || (child.type as any)?.displayName === \"Area\") {\n const idx = seriesIndex++;\n const color = (child.props as any).stroke || getSeriesColor({ index: idx, palette: colorPalette });\n return cloneElement(child as React.ReactElement<any>, {\n stroke: color,\n fill: (child.props as any).fill || color,\n fillOpacity: (child.props as any).fillOpacity ?? 0.15,\n strokeWidth: (child.props as any).strokeWidth ?? 2,\n });\n }\n return child;\n });\n\n return (\n <ChartContainer height={height} className={className} style={style}>\n <RechartsAreaChart data={data} margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" stroke={getGridColor()} opacity={0.5} />}\n {themedChildren}\n </RechartsAreaChart>\n </ChartContainer>\n );\n};\n","/**\n * PieChart — Themed pie/donut chart wrapper.\n */\n\nimport React, { type ReactNode, Children, cloneElement, isValidElement } from \"react\";\nimport {\n PieChart as RechartsPieChart,\n Pie as RechartsPie,\n Cell,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport type { ChartContainerProps } from \"./types.js\";\n\ninterface ThemedPieChartProps extends Omit<ChartContainerProps, \"height\"> {\n /** Chart height (also used for approximate width in responsive container). */\n height?: number;\n children: ReactNode;\n}\n\n/**\n * Themed PieChart.\n * Auto-assigns palette colors to Pie data via Cell children when no\n * explicit fill is provided on individual data entries.\n */\nexport const PieChart = ({\n height,\n colorPalette,\n className,\n style,\n children,\n}: ThemedPieChartProps) => {\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n if ((child.type as any) === RechartsPie || (child.type as any)?.displayName === \"Pie\") {\n const props = child.props as any;\n const data: any[] = props.data ?? [];\n /**\n * If the Pie has no Cell children, inject them automatically\n * so each slice gets a palette color.\n */\n const hasExplicitCells = Children.toArray(props.children).some(\n (c: any) => isValidElement(c) && ((c.type as any) === Cell || (c.type as any)?.displayName === \"Cell\")\n );\n if (!hasExplicitCells && data.length > 0) {\n return cloneElement(child as React.ReactElement<any>, {\n children: data.map((_, i) => (\n <Cell key={`cell-${i}`} fill={getSeriesColor({ index: i, palette: colorPalette })} />\n )),\n });\n }\n }\n return child;\n });\n\n return (\n <ChartContainer height={height} className={className} style={style}>\n <RechartsPieChart>\n {themedChildren}\n </RechartsPieChart>\n </ChartContainer>\n );\n};\n","/**\n * ScatterChart — Themed scatter/correlation chart wrapper.\n */\n\nimport React, { type ReactNode, Children, cloneElement, isValidElement } from \"react\";\nimport {\n ScatterChart as RechartsScatterChart,\n Scatter as RechartsScatter,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor } from \"./theme.js\";\nimport type { ChartContainerProps } from \"./types.js\";\n\ninterface ThemedScatterChartProps extends ChartContainerProps {\n children: ReactNode;\n grid?: boolean;\n}\n\n/**\n * Themed ScatterChart.\n * Auto-assigns palette fill colors to Scatter children.\n */\nexport const ScatterChart = ({\n height,\n colorPalette,\n className,\n style,\n grid = true,\n children,\n}: ThemedScatterChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n if ((child.type as any) === RechartsScatter || (child.type as any)?.displayName === \"Scatter\") {\n const idx = seriesIndex++;\n const existing = (child.props as any).fill;\n return cloneElement(child as React.ReactElement<any>, {\n fill: existing || getSeriesColor({ index: idx, palette: colorPalette }),\n });\n }\n return child;\n });\n\n return (\n <ChartContainer height={height} className={className} style={style}>\n <RechartsScatterChart margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" stroke={getGridColor()} opacity={0.5} />}\n {themedChildren}\n </RechartsScatterChart>\n </ChartContainer>\n );\n};\n","/**\n * RadarChart — Themed radar/spider chart wrapper.\n */\n\nimport React, { type ReactNode, Children, cloneElement, isValidElement } from \"react\";\nimport {\n RadarChart as RechartsRadarChart,\n Radar as RechartsRadar,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport type { ChartContainerProps } from \"./types.js\";\n\ninterface ThemedRadarChartProps extends ChartContainerProps {\n data: Record<string, unknown>[];\n children: ReactNode;\n}\n\n/**\n * Themed RadarChart.\n * Auto-assigns palette colors to Radar children.\n */\nexport const RadarChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n children,\n}: ThemedRadarChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n if ((child.type as any) === RechartsRadar || (child.type as any)?.displayName === \"Radar\") {\n const idx = seriesIndex++;\n const color = (child.props as any).stroke || getSeriesColor({ index: idx, palette: colorPalette });\n return cloneElement(child as React.ReactElement<any>, {\n stroke: color,\n fill: (child.props as any).fill || color,\n fillOpacity: (child.props as any).fillOpacity ?? 0.2,\n });\n }\n return child;\n });\n\n return (\n <ChartContainer height={height} className={className} style={style}>\n <RechartsRadarChart data={data} cx=\"50%\" cy=\"50%\" outerRadius=\"70%\">\n {themedChildren}\n </RechartsRadarChart>\n </ChartContainer>\n );\n};\n","/**\n * ComposedChart — Themed mixed chart wrapper (Bar + Line + Area in one).\n */\n\nimport React, { type ReactNode, Children, cloneElement, isValidElement } from \"react\";\nimport {\n ComposedChart as RechartsComposedChart,\n Line as RechartsLine,\n Bar as RechartsBar,\n Area as RechartsArea,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor } from \"./theme.js\";\nimport type { ChartContainerProps } from \"./types.js\";\n\ninterface ThemedComposedChartProps extends ChartContainerProps {\n data: Record<string, unknown>[];\n children: ReactNode;\n grid?: boolean;\n}\n\n/**\n * Themed ComposedChart.\n * Auto-assigns palette colors to Line, Bar, and Area children.\n */\nexport const ComposedChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n children,\n}: ThemedComposedChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n const t = child.type as any;\n const dn = t?.displayName;\n\n if (t === RechartsLine || dn === \"Line\") {\n const idx = seriesIndex++;\n return cloneElement(child as React.ReactElement<any>, {\n stroke: (child.props as any).stroke || getSeriesColor({ index: idx, palette: colorPalette }),\n strokeWidth: (child.props as any).strokeWidth ?? 2,\n dot: (child.props as any).dot ?? false,\n });\n }\n if (t === RechartsBar || dn === \"Bar\") {\n const idx = seriesIndex++;\n return cloneElement(child as React.ReactElement<any>, {\n fill: (child.props as any).fill || getSeriesColor({ index: idx, palette: colorPalette }),\n radius: (child.props as any).radius ?? [4, 4, 0, 0],\n });\n }\n if (t === RechartsArea || dn === \"Area\") {\n const idx = seriesIndex++;\n const color = (child.props as any).stroke || getSeriesColor({ index: idx, palette: colorPalette });\n return cloneElement(child as React.ReactElement<any>, {\n stroke: color,\n fill: (child.props as any).fill || color,\n fillOpacity: (child.props as any).fillOpacity ?? 0.15,\n strokeWidth: (child.props as any).strokeWidth ?? 2,\n });\n }\n return child;\n });\n\n return (\n <ChartContainer height={height} className={className} style={style}>\n <RechartsComposedChart data={data} margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" stroke={getGridColor()} opacity={0.5} />}\n {themedChildren}\n </RechartsComposedChart>\n </ChartContainer>\n );\n};\n","/**\n * ThemedTooltip — Pre-themed tooltip using MCP Apps spec CSS variables.\n *\n * Drop-in replacement for Recharts' Tooltip that automatically\n * applies the host's theme colors for background, text, border.\n */\n\nimport { useMemo } from \"react\";\nimport { Tooltip as RechartsTooltip } from \"recharts\";\nimport { getTooltipStyle } from \"./theme.js\";\n\n/**\n * A themed Tooltip that reads CSS variables at render time.\n * Forwards all standard Recharts Tooltip props.\n */\nexport const ThemedTooltip = (props: any) => {\n const style = useMemo(() => getTooltipStyle(), []);\n return (\n <RechartsTooltip\n contentStyle={style.contentStyle}\n labelStyle={style.labelStyle}\n cursor={{ stroke: \"var(--color-border-secondary, #e5e7eb)\", strokeWidth: 1 }}\n {...props}\n />\n );\n};\n","/**\n * open-mcp-app-ui/charts\n *\n * Themed chart components built on Recharts v3.\n * Auto-styled via MCP Apps spec CSS variables.\n *\n * Usage:\n * import { LineChart, Line, XAxis, YAxis, Tooltip } from \"open-mcp-app-ui/charts\";\n *\n * <LineChart data={data} height={300}>\n * <XAxis dataKey=\"month\" />\n * <YAxis />\n * <Tooltip />\n * <Line dataKey=\"revenue\" />\n * </LineChart>\n */\n\n// Themed chart wrappers\nexport { LineChart } from \"./LineChart.js\";\nexport { BarChart } from \"./BarChart.js\";\nexport { AreaChart } from \"./AreaChart.js\";\nexport { PieChart } from \"./PieChart.js\";\nexport { ScatterChart } from \"./ScatterChart.js\";\nexport { RadarChart } from \"./RadarChart.js\";\nexport { ComposedChart } from \"./ComposedChart.js\";\nexport { ThemedTooltip as Tooltip } from \"./ThemedTooltip.js\";\n\n// Re-export Recharts primitives for composition\nexport {\n Line,\n Bar,\n Area,\n Pie,\n Scatter,\n Radar,\n Cell,\n XAxis,\n YAxis,\n CartesianGrid,\n Legend,\n PolarGrid,\n PolarAngleAxis,\n PolarRadiusAxis,\n Tooltip as RechartsTooltip,\n ReferenceLine,\n ReferenceArea,\n ResponsiveContainer,\n} from \"recharts\";\n\n// Types\nexport type { ChartContainerProps } from \"./types.js\";\nexport { DEFAULT_PALETTE } from \"./types.js\";\n"],"mappings":";AAmBA,SAAgC,UAAU,cAAc,sBAAsB;AAC9E;AAAA,EACE,aAAa;AAAA,EACb,QAAQ;AAAA,EACR;AAAA,OACK;;;ACfP,SAAS,2BAA2B;;;ACI7B,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;;ADKI;AAVG,IAAM,iBAAiB,CAAC;AAAA,EAC7B,SAAS;AAAA,EACT,YAAY;AAAA,EACZ;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,oBAAoB,SAAS;AAAA,IACxC,OAAO,EAAE,QAAQ,GAAG,MAAM,MAAM,GAAG,MAAM;AAAA,IAEzC,8BAAC,uBAAoB,OAAM,QAAO,QAAO,QACtC,UACH;AAAA;AACF;AAOK,IAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AACF,MAGc;AACZ,QAAM,SAAS,WAAW;AAC1B,SAAO,OAAO,QAAQ,OAAO,MAAM;AACrC;;;AEhCO,IAAM,YAAY,CAAC,EAAE,MAAM,SAAS,MAAkD;AAC3F,MAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,QAAM,QAAQ,iBAAiB,SAAS,eAAe,EAAE,iBAAiB,IAAI,EAAE,KAAK;AACrF,SAAO,SAAS;AAClB;AAMO,IAAM,kBAAkB,OAAO;AAAA,EACpC,cAAc;AAAA,IACZ,iBAAiB,UAAU,EAAE,MAAM,gCAAgC,UAAU,UAAU,CAAC;AAAA,IACxF,QAAQ,aAAa,UAAU,EAAE,MAAM,4BAA4B,UAAU,UAAU,CAAC,CAAC;AAAA,IACzF,cAAc,UAAU,EAAE,MAAM,sBAAsB,UAAU,MAAM,CAAC;AAAA,IACvE,OAAO,UAAU,EAAE,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Ac,eAAe;AAAA,MACnD,CAAC;AAAA,IACH;AACA,WAAO;AAAA,EACT,CAAC;AAED,SACE,gBAAAL,KAAC,kBAAe,QAAgB,WAAsB,OACpD,0BAAAC,MAAC,yBAAsB,MAAY,QAAQ,EAAE,KAAK,GAAG,OAAO,IAAI,QAAQ,GAAG,MAAM,EAAE,GAChF;AAAA,YAAQ,gBAAAD,KAACQ,gBAAA,EAAc,iBAAgB,OAAM,QAAQ,aAAa,GAAG,SAAS,KAAK;AAAA,IACnF;AAAA,KACH,GACF;AAEJ;;;ACvEA,SAAS,eAAe;AACxB,SAAS,WAAW,uBAAuB;AAUvC,gBAAAC,YAAA;AAHG,IAAM,gBAAgB,CAAC,UAAe;AAC3C,QAAM,QAAQ,QAAQ,MAAM,gBAAgB,GAAG,CAAC,CAAC;AACjD,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,cAAc,MAAM;AAAA,MACpB,YAAY,MAAM;AAAA,MAClB,QAAQ,EAAE,QAAQ,0CAA0C,aAAa,EAAE;AAAA,MAC1E,GAAG;AAAA;AAAA,EACN;AAEJ;;;ACGA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACW;AAAA,EACX;AAAA,EACA;AAAA,EACA,uBAAAC;AAAA,OACK;","names":["jsx","Children","cloneElement","isValidElement","CartesianGrid","jsx","jsxs","Children","isValidElement","cloneElement","CartesianGrid","Children","cloneElement","isValidElement","CartesianGrid","jsx","jsxs","Children","isValidElement","cloneElement","CartesianGrid","Children","cloneElement","isValidElement","jsx","Children","isValidElement","cloneElement","Children","cloneElement","isValidElement","CartesianGrid","jsx","jsxs","Children","isValidElement","cloneElement","CartesianGrid","Children","cloneElement","isValidElement","jsx","Children","isValidElement","cloneElement","Children","cloneElement","isValidElement","RechartsLine","RechartsBar","RechartsArea","CartesianGrid","jsx","jsxs","Children","isValidElement","RechartsLine","cloneElement","RechartsBar","RechartsArea","CartesianGrid","jsx","Cell","CartesianGrid","ResponsiveContainer"]}