open-mcp-app-ui 0.0.7 → 0.0.9

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.
@@ -2,12 +2,89 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
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
4
 
5
+ /**
6
+ * Chart Theme — CSS variable mapping for Recharts.
7
+ *
8
+ * Reads MCP Apps spec CSS variables at render time and provides
9
+ * them as style objects for Recharts sub-components (tooltip, grid,
10
+ * axis labels, legend). This is how charts automatically adapt to
11
+ * the host's theme without configuration.
12
+ */
13
+ /**
14
+ * Resolve a CSS variable value at runtime.
15
+ * Falls back to the provided default if the variable is not set.
16
+ *
17
+ * Recharts requires resolved color values for SVG attributes (stroke, fill)
18
+ * because SVG doesn't support var() in most attributes. We check both
19
+ * document.documentElement (inline styles set by the host SDK) and
20
+ * document.body as a fallback, since hosts may inject CSS variables
21
+ * on either element.
22
+ */
23
+ declare const getCSSVar: ({ name, fallback }: {
24
+ name: string;
25
+ fallback: string;
26
+ }) => string;
27
+ /**
28
+ * Themed tooltip style object for Recharts <Tooltip>.
29
+ * Applied via contentStyle, labelStyle, and wrapperStyle props.
30
+ */
31
+ declare const getTooltipStyle: () => {
32
+ contentStyle: {
33
+ backgroundColor: string;
34
+ border: string;
35
+ borderRadius: string;
36
+ color: string;
37
+ fontSize: string;
38
+ fontFamily: string;
39
+ padding: string;
40
+ boxShadow: string;
41
+ };
42
+ labelStyle: {
43
+ color: string;
44
+ fontWeight: number;
45
+ marginBottom: string;
46
+ };
47
+ };
5
48
  /**
6
49
  * Border variant type shared across chart sub-components.
7
50
  * - "default" uses --color-border-primary (stronger)
8
51
  * - "secondary" uses --color-border-secondary (subtler)
9
52
  */
10
53
  type ChartBorderVariant = "default" | "secondary";
54
+ /**
55
+ * Themed grid line color for <CartesianGrid>.
56
+ * Grids default to secondary (subtle background lines).
57
+ */
58
+ declare const getGridColor: ({ variant }?: {
59
+ variant?: ChartBorderVariant;
60
+ }) => string;
61
+ /**
62
+ * Themed axis tick/label style for <XAxis> and <YAxis>.
63
+ * Axis lines default to primary (visible structural lines).
64
+ */
65
+ declare const getAxisStyle: ({ variant }?: {
66
+ variant?: ChartBorderVariant;
67
+ }) => {
68
+ tick: {
69
+ fill: string;
70
+ fontSize: string;
71
+ fontFamily: string;
72
+ };
73
+ axisLine: {
74
+ stroke: string;
75
+ };
76
+ tickLine: {
77
+ stroke: string;
78
+ };
79
+ };
80
+ /**
81
+ * Themed legend style for <Legend>.
82
+ */
83
+ declare const getLegendStyle: () => {
84
+ color: string;
85
+ fontSize: string;
86
+ fontFamily: string;
87
+ };
11
88
 
12
89
  /**
13
90
  * Shared chart types.
@@ -162,4 +239,4 @@ declare const ComposedChart: ({ data, height, colorPalette, className, style, gr
162
239
  */
163
240
  declare const ThemedTooltip: (props: any) => react_jsx_runtime.JSX.Element;
164
241
 
165
- export { AreaChart, BarChart, type ChartBorderVariant, type ChartContainerProps, ComposedChart, DEFAULT_PALETTE, LineChart, PieChart, RadarChart, ScatterChart, ThemedTooltip as Tooltip };
242
+ export { AreaChart, BarChart, type ChartBorderVariant, type ChartContainerProps, ComposedChart, DEFAULT_PALETTE, LineChart, PieChart, RadarChart, ScatterChart, ThemedTooltip as Tooltip, getAxisStyle, getCSSVar, getGridColor, getLegendStyle, getTooltipStyle };
@@ -28,15 +28,19 @@ var ChartContainer = ({
28
28
  height = 300,
29
29
  className = "",
30
30
  style,
31
+ borderVariant = "default",
31
32
  children
32
- }) => /* @__PURE__ */ jsx(
33
- "div",
34
- {
35
- className: `omu-chart w-full ${className}`,
36
- style: { height: `${height}px`, ...style },
37
- children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children })
38
- }
39
- );
33
+ }) => {
34
+ const baseClass = borderVariant === "secondary" ? "omu-chart-secondary" : "omu-chart";
35
+ return /* @__PURE__ */ jsx(
36
+ "div",
37
+ {
38
+ className: `${baseClass} w-full ${className}`,
39
+ style: { height: `${height}px`, ...style },
40
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children })
41
+ }
42
+ );
43
+ };
40
44
  var getSeriesColor = ({
41
45
  index,
42
46
  palette
@@ -49,7 +53,17 @@ var getSeriesColor = ({
49
53
  import React from "react";
50
54
  var getCSSVar = ({ name, fallback }) => {
51
55
  if (typeof window === "undefined") return fallback;
52
- const value = getComputedStyle(document.documentElement).getPropertyValue(name).trim();
56
+ const root = document.documentElement;
57
+ let value = root.style.getPropertyValue(name).trim();
58
+ if (!value) {
59
+ value = getComputedStyle(root).getPropertyValue(name).trim();
60
+ }
61
+ if (!value && document.body) {
62
+ value = document.body.style.getPropertyValue(name).trim();
63
+ if (!value) {
64
+ value = getComputedStyle(document.body).getPropertyValue(name).trim();
65
+ }
66
+ }
53
67
  return value || fallback;
54
68
  };
55
69
  var getTooltipStyle = () => ({
@@ -88,7 +102,8 @@ var themeAxisChild = ({
88
102
  child,
89
103
  variant = "default",
90
104
  XAxis: XAxis2,
91
- YAxis: YAxis2
105
+ YAxis: YAxis2,
106
+ CartesianGrid: CartesianGrid7
92
107
  }) => {
93
108
  const t = child.type;
94
109
  const dn = t?.displayName;
@@ -101,8 +116,20 @@ var themeAxisChild = ({
101
116
  tickLine: props.tickLine === false ? false : { ...style.tickLine, ...typeof props.tickLine === "object" && props.tickLine ? props.tickLine : {} }
102
117
  });
103
118
  }
119
+ if (CartesianGrid7 && (t === CartesianGrid7 || dn === "CartesianGrid")) {
120
+ const props = child.props;
121
+ return React.cloneElement(child, {
122
+ stroke: props.stroke ?? getGridColor({ variant }),
123
+ opacity: props.opacity ?? 0.5
124
+ });
125
+ }
104
126
  return null;
105
127
  };
128
+ var getLegendStyle = () => ({
129
+ color: getCSSVar({ name: "--color-text-secondary", fallback: "#6b7280" }),
130
+ fontSize: getCSSVar({ name: "--font-text-sm-size", fallback: "13px" }),
131
+ fontFamily: getCSSVar({ name: "--font-sans", fallback: "ui-sans-serif, system-ui, sans-serif" })
132
+ });
106
133
 
107
134
  // src/charts/LineChart.tsx
108
135
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
@@ -119,7 +146,7 @@ var LineChart = ({
119
146
  let seriesIndex = 0;
120
147
  const themedChildren = Children.map(children, (child) => {
121
148
  if (!isValidElement(child)) return child;
122
- const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis });
149
+ const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis, CartesianGrid });
123
150
  if (themedAxis) return themedAxis;
124
151
  if (child.type === RechartsLine || child.type?.displayName === "Line") {
125
152
  const idx = seriesIndex++;
@@ -133,8 +160,8 @@ var LineChart = ({
133
160
  }
134
161
  return child;
135
162
  });
136
- return /* @__PURE__ */ jsx2(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs(RechartsLineChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
137
- grid && /* @__PURE__ */ jsx2(CartesianGrid, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5 }),
163
+ return /* @__PURE__ */ jsx2(ChartContainer, { height, className, style, borderVariant, children: /* @__PURE__ */ jsxs(RechartsLineChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
164
+ grid && /* @__PURE__ */ jsx2(CartesianGrid, { strokeDasharray: "3 3" }),
138
165
  themedChildren
139
166
  ] }) });
140
167
  };
@@ -162,7 +189,7 @@ var BarChart = ({
162
189
  let seriesIndex = 0;
163
190
  const themedChildren = Children2.map(children, (child) => {
164
191
  if (!isValidElement2(child)) return child;
165
- const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis2, YAxis: RechartsYAxis2 });
192
+ const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis2, YAxis: RechartsYAxis2, CartesianGrid: CartesianGrid2 });
166
193
  if (themedAxis) return themedAxis;
167
194
  if (child.type === RechartsBar || child.type?.displayName === "Bar") {
168
195
  const idx = seriesIndex++;
@@ -174,8 +201,8 @@ var BarChart = ({
174
201
  }
175
202
  return child;
176
203
  });
177
- return /* @__PURE__ */ jsx3(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs2(RechartsBarChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
178
- grid && /* @__PURE__ */ jsx3(CartesianGrid2, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5, vertical: false }),
204
+ return /* @__PURE__ */ jsx3(ChartContainer, { height, className, style, borderVariant, children: /* @__PURE__ */ jsxs2(RechartsBarChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
205
+ grid && /* @__PURE__ */ jsx3(CartesianGrid2, { strokeDasharray: "3 3", vertical: false }),
179
206
  themedChildren
180
207
  ] }) });
181
208
  };
@@ -203,7 +230,7 @@ var AreaChart = ({
203
230
  let seriesIndex = 0;
204
231
  const themedChildren = Children3.map(children, (child) => {
205
232
  if (!isValidElement3(child)) return child;
206
- const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis3, YAxis: RechartsYAxis3 });
233
+ const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis3, YAxis: RechartsYAxis3, CartesianGrid: CartesianGrid3 });
207
234
  if (themedAxis) return themedAxis;
208
235
  if (child.type === RechartsArea || child.type?.displayName === "Area") {
209
236
  const idx = seriesIndex++;
@@ -217,8 +244,8 @@ var AreaChart = ({
217
244
  }
218
245
  return child;
219
246
  });
220
- return /* @__PURE__ */ jsx4(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs3(RechartsAreaChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
221
- grid && /* @__PURE__ */ jsx4(CartesianGrid3, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5 }),
247
+ return /* @__PURE__ */ jsx4(ChartContainer, { height, className, style, borderVariant, children: /* @__PURE__ */ jsxs3(RechartsAreaChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
248
+ grid && /* @__PURE__ */ jsx4(CartesianGrid3, { strokeDasharray: "3 3" }),
222
249
  themedChildren
223
250
  ] }) });
224
251
  };
@@ -279,7 +306,7 @@ var ScatterChart = ({
279
306
  let seriesIndex = 0;
280
307
  const themedChildren = Children5.map(children, (child) => {
281
308
  if (!isValidElement5(child)) return child;
282
- const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis4, YAxis: RechartsYAxis4 });
309
+ const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis4, YAxis: RechartsYAxis4, CartesianGrid: CartesianGrid4 });
283
310
  if (themedAxis) return themedAxis;
284
311
  if (child.type === RechartsScatter || child.type?.displayName === "Scatter") {
285
312
  const idx = seriesIndex++;
@@ -290,8 +317,8 @@ var ScatterChart = ({
290
317
  }
291
318
  return child;
292
319
  });
293
- return /* @__PURE__ */ jsx6(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs4(RechartsScatterChart, { margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
294
- grid && /* @__PURE__ */ jsx6(CartesianGrid4, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5 }),
320
+ return /* @__PURE__ */ jsx6(ChartContainer, { height, className, style, borderVariant, children: /* @__PURE__ */ jsxs4(RechartsScatterChart, { margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
321
+ grid && /* @__PURE__ */ jsx6(CartesianGrid4, { strokeDasharray: "3 3" }),
295
322
  themedChildren
296
323
  ] }) });
297
324
  };
@@ -353,7 +380,7 @@ var ComposedChart = ({
353
380
  let seriesIndex = 0;
354
381
  const themedChildren = Children7.map(children, (child) => {
355
382
  if (!isValidElement7(child)) return child;
356
- const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis5, YAxis: RechartsYAxis5 });
383
+ const themedAxis = themeAxisChild({ child, variant: borderVariant, XAxis: RechartsXAxis5, YAxis: RechartsYAxis5, CartesianGrid: CartesianGrid5 });
357
384
  if (themedAxis) return themedAxis;
358
385
  const t = child.type;
359
386
  const dn = t?.displayName;
@@ -384,8 +411,8 @@ var ComposedChart = ({
384
411
  }
385
412
  return child;
386
413
  });
387
- return /* @__PURE__ */ jsx8(ChartContainer, { height, className, style, children: /* @__PURE__ */ jsxs5(RechartsComposedChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
388
- grid && /* @__PURE__ */ jsx8(CartesianGrid5, { strokeDasharray: "3 3", stroke: getGridColor(), opacity: 0.5 }),
414
+ return /* @__PURE__ */ jsx8(ChartContainer, { height, className, style, borderVariant, children: /* @__PURE__ */ jsxs5(RechartsComposedChart, { data, margin: { top: 5, right: 20, bottom: 5, left: 0 }, children: [
415
+ grid && /* @__PURE__ */ jsx8(CartesianGrid5, { strokeDasharray: "3 3" }),
389
416
  themedChildren
390
417
  ] }) });
391
418
  };
@@ -455,6 +482,11 @@ export {
455
482
  ScatterChart,
456
483
  ThemedTooltip as Tooltip,
457
484
  XAxis,
458
- YAxis
485
+ YAxis,
486
+ getAxisStyle,
487
+ getCSSVar,
488
+ getGridColor,
489
+ getLegendStyle,
490
+ getTooltipStyle
459
491
  };
460
492
  //# sourceMappingURL=index.js.map
@@ -1 +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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor, themeAxisChild, type ChartBorderVariant } 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 * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed LineChart.\n * Automatically assigns palette colors to Line children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const LineChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedLineChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n // Theme axis children\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis });\n if (themedAxis) return themedAxis;\n\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","import React from \"react\";\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 * Border variant type shared across chart sub-components.\n * - \"default\" uses --color-border-primary (stronger)\n * - \"secondary\" uses --color-border-secondary (subtler)\n */\nexport type ChartBorderVariant = \"default\" | \"secondary\";\n\n/**\n * Resolve the border CSS variable for the given variant.\n */\nconst getBorderColor = ({ variant = \"default\" }: { variant?: ChartBorderVariant } = {}): string =>\n variant === \"secondary\"\n ? getCSSVar({ name: \"--color-border-secondary\", fallback: \"#e5e7eb\" })\n : getCSSVar({ name: \"--color-border-primary\", fallback: \"#d1d5db\" });\n\n/**\n * Themed grid line color for <CartesianGrid>.\n * Grids default to secondary (subtle background lines).\n */\nexport const getGridColor = ({ variant = \"secondary\" }: { variant?: ChartBorderVariant } = {}): string =>\n getBorderColor({ variant });\n\n/**\n * Themed axis tick/label style for <XAxis> and <YAxis>.\n * Axis lines default to primary (visible structural lines).\n */\nexport const getAxisStyle = ({ variant = \"default\" }: { variant?: ChartBorderVariant } = {}) => ({\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: getBorderColor({ variant }),\n },\n tickLine: {\n stroke: getBorderColor({ variant }),\n },\n});\n\n/**\n * Apply themed axis styles to an XAxis or YAxis child via cloneElement.\n *\n * Recharts identifies axis components by child.type, so wrapping them\n * in custom components breaks chart rendering. Instead, chart wrappers\n * call this in their Children.map loop to inject theme props while\n * preserving the original Recharts component type.\n *\n * Returns a cloned element with themed tick, axisLine, and tickLine,\n * or the original child untouched if it's not an axis component.\n */\nexport const themeAxisChild = ({\n child,\n variant = \"default\",\n XAxis,\n YAxis,\n}: {\n child: React.ReactElement<any>;\n variant?: ChartBorderVariant;\n XAxis: any;\n YAxis: any;\n}): React.ReactElement<any> | null => {\n const t = child.type as any;\n const dn = t?.displayName;\n\n if (t === XAxis || t === YAxis || dn === \"XAxis\" || dn === \"YAxis\") {\n const style = getAxisStyle({ variant });\n const props = child.props as any;\n return React.cloneElement(child, {\n tick: props.tick === false ? false : { ...style.tick, ...(typeof props.tick === \"object\" && props.tick ? props.tick : {}) },\n axisLine: props.axisLine === false ? false : { ...style.axisLine, ...(typeof props.axisLine === \"object\" && props.axisLine ? props.axisLine : {}) },\n tickLine: props.tickLine === false ? false : { ...style.tickLine, ...(typeof props.tickLine === \"object\" && props.tickLine ? props.tickLine : {}) },\n });\n }\n\n return null;\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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor, themeAxisChild, type ChartBorderVariant } 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 * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed BarChart.\n * Automatically assigns palette colors to Bar children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const BarChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedBarChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis });\n if (themedAxis) return themedAxis;\n\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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor, themeAxisChild, type ChartBorderVariant } 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 * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed AreaChart.\n * Auto-assigns palette colors with gradient fill to Area children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const AreaChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedAreaChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis });\n if (themedAxis) return themedAxis;\n\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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor, themeAxisChild, type ChartBorderVariant } from \"./theme.js\";\nimport type { ChartContainerProps } from \"./types.js\";\n\ninterface ThemedScatterChartProps extends ChartContainerProps {\n children: ReactNode;\n grid?: boolean;\n /**\n * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed ScatterChart.\n * Auto-assigns palette fill colors to Scatter children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const ScatterChart = ({\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedScatterChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis });\n if (themedAxis) return themedAxis;\n\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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { getGridColor, themeAxisChild, type ChartBorderVariant } 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 * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed ComposedChart.\n * Auto-assigns palette colors to Line, Bar, and Area children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const ComposedChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedComposedChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis });\n if (themedAxis) return themedAxis;\n\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// Theme utilities\nexport { type ChartBorderVariant } from \"./theme.js\";\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,SAAS;AAAA,EACT,SAAS;AAAA,EACT;AAAA,OACK;;;ACjBP,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,CAA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sx","Children","cloneElement","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","jsx","jsxs","Children","isValidElement","RechartsXAxis","RechartsYAxis","cloneElement","CartesianGrid","Children","cloneElement","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","jsx","jsxs","Children","isValidElement","RechartsXAxis","RechartsYAxis","cloneElement","CartesianGrid","Children","cloneElement","isValidElement","jsx","Children","isValidElement","cloneElement","Children","cloneElement","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","jsx","jsxs","Children","isValidElement","RechartsXAxis","RechartsYAxis","cloneElement","CartesianGrid","Children","cloneElement","isValidElement","jsx","Children","isValidElement","cloneElement","Children","cloneElement","isValidElement","RechartsLine","RechartsBar","RechartsArea","RechartsXAxis","RechartsYAxis","CartesianGrid","jsx","jsxs","Children","isValidElement","RechartsXAxis","RechartsYAxis","RechartsLine","cloneElement","RechartsBar","RechartsArea","CartesianGrid","jsx","Cell","CartesianGrid","ResponsiveContainer"]}
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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { themeAxisChild, type ChartBorderVariant } 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 * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed LineChart.\n * Automatically assigns palette colors to Line children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const LineChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedLineChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n // Theme axis children\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis, CartesianGrid });\n if (themedAxis) return themedAxis;\n\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} borderVariant={borderVariant}>\n <RechartsLineChart data={data} margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" />}\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 * Applies either `.omu-chart` (default/primary border) or\n * `.omu-chart-secondary` CSS class to the container. The corresponding\n * CSS rules in charts.css override Recharts' SVG presentation attributes\n * for axis lines, tick marks, tick labels, and grid lines using\n * CSS variables. This is the most reliable theming approach because\n * CSS rules always override SVG presentation attributes.\n */\n\nimport { type ReactNode } from \"react\";\nimport { ResponsiveContainer } from \"recharts\";\nimport { DEFAULT_PALETTE, type ChartContainerProps } from \"./types.js\";\nimport type { ChartBorderVariant } from \"./theme.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 borderVariant = \"default\",\n children,\n}: ChartContainerProps & { children: ReactNode; borderVariant?: ChartBorderVariant }) => {\n const baseClass = borderVariant === \"secondary\" ? \"omu-chart-secondary\" : \"omu-chart\";\n\n return (\n <div\n className={`${baseClass} 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/**\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","import React from \"react\";\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 *\n * Recharts requires resolved color values for SVG attributes (stroke, fill)\n * because SVG doesn't support var() in most attributes. We check both\n * document.documentElement (inline styles set by the host SDK) and\n * document.body as a fallback, since hosts may inject CSS variables\n * on either element.\n */\nexport const getCSSVar = ({ name, fallback }: { name: string; fallback: string }): string => {\n if (typeof window === \"undefined\") return fallback;\n\n /* Try inline style first (faster, no reflow) — hosts set vars via setProperty */\n const root = document.documentElement;\n let value = root.style.getPropertyValue(name).trim();\n\n /* Fall back to computed style (catches vars set via stylesheets / :root) */\n if (!value) {\n value = getComputedStyle(root).getPropertyValue(name).trim();\n }\n\n /* Some hosts inject on <body> instead */\n if (!value && document.body) {\n value = document.body.style.getPropertyValue(name).trim();\n if (!value) {\n value = getComputedStyle(document.body).getPropertyValue(name).trim();\n }\n }\n\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 * Border variant type shared across chart sub-components.\n * - \"default\" uses --color-border-primary (stronger)\n * - \"secondary\" uses --color-border-secondary (subtler)\n */\nexport type ChartBorderVariant = \"default\" | \"secondary\";\n\n/**\n * Resolve the border CSS variable for the given variant.\n */\nconst getBorderColor = ({ variant = \"default\" }: { variant?: ChartBorderVariant } = {}): string =>\n variant === \"secondary\"\n ? getCSSVar({ name: \"--color-border-secondary\", fallback: \"#e5e7eb\" })\n : getCSSVar({ name: \"--color-border-primary\", fallback: \"#d1d5db\" });\n\n/**\n * Themed grid line color for <CartesianGrid>.\n * Grids default to secondary (subtle background lines).\n */\nexport const getGridColor = ({ variant = \"secondary\" }: { variant?: ChartBorderVariant } = {}): string =>\n getBorderColor({ variant });\n\n/**\n * Themed axis tick/label style for <XAxis> and <YAxis>.\n * Axis lines default to primary (visible structural lines).\n */\nexport const getAxisStyle = ({ variant = \"default\" }: { variant?: ChartBorderVariant } = {}) => ({\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: getBorderColor({ variant }),\n },\n tickLine: {\n stroke: getBorderColor({ variant }),\n },\n});\n\n/**\n * Apply themed styles to axis and grid children via cloneElement.\n *\n * Recharts identifies axis/grid components by child.type, so wrapping them\n * in custom components breaks chart rendering. Instead, chart wrappers\n * call this in their Children.map loop to inject theme props while\n * preserving the original Recharts component type.\n *\n * Handles XAxis, YAxis (tick/axisLine/tickLine) and CartesianGrid\n * (stroke + 50% opacity). Returns a cloned element with themed props,\n * or null if the child is not a recognized chart structural component.\n */\nexport const themeAxisChild = ({\n child,\n variant = \"default\",\n XAxis,\n YAxis,\n CartesianGrid,\n}: {\n child: React.ReactElement<any>;\n variant?: ChartBorderVariant;\n XAxis: any;\n YAxis: any;\n CartesianGrid?: any;\n}): React.ReactElement<any> | null => {\n const t = child.type as any;\n const dn = t?.displayName;\n\n if (t === XAxis || t === YAxis || dn === \"XAxis\" || dn === \"YAxis\") {\n const style = getAxisStyle({ variant });\n const props = child.props as any;\n return React.cloneElement(child, {\n tick: props.tick === false ? false : { ...style.tick, ...(typeof props.tick === \"object\" && props.tick ? props.tick : {}) },\n axisLine: props.axisLine === false ? false : { ...style.axisLine, ...(typeof props.axisLine === \"object\" && props.axisLine ? props.axisLine : {}) },\n tickLine: props.tickLine === false ? false : { ...style.tickLine, ...(typeof props.tickLine === \"object\" && props.tickLine ? props.tickLine : {}) },\n });\n }\n\n if (CartesianGrid && (t === CartesianGrid || dn === \"CartesianGrid\")) {\n const props = child.props as any;\n return React.cloneElement(child, {\n stroke: props.stroke ?? getGridColor({ variant }),\n opacity: props.opacity ?? 0.5,\n });\n }\n\n return null;\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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { themeAxisChild, type ChartBorderVariant } 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 * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed BarChart.\n * Automatically assigns palette colors to Bar children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const BarChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedBarChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis, CartesianGrid });\n if (themedAxis) return themedAxis;\n\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} borderVariant={borderVariant}>\n <RechartsBarChart data={data} margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" 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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { themeAxisChild, type ChartBorderVariant } 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 * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed AreaChart.\n * Auto-assigns palette colors with gradient fill to Area children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const AreaChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedAreaChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis, CartesianGrid });\n if (themedAxis) return themedAxis;\n\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} borderVariant={borderVariant}>\n <RechartsAreaChart data={data} margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" />}\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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { themeAxisChild, type ChartBorderVariant } from \"./theme.js\";\nimport type { ChartContainerProps } from \"./types.js\";\n\ninterface ThemedScatterChartProps extends ChartContainerProps {\n children: ReactNode;\n grid?: boolean;\n /**\n * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed ScatterChart.\n * Auto-assigns palette fill colors to Scatter children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const ScatterChart = ({\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedScatterChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis, CartesianGrid });\n if (themedAxis) return themedAxis;\n\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} borderVariant={borderVariant}>\n <RechartsScatterChart margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" />}\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 XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n CartesianGrid,\n} from \"recharts\";\nimport { ChartContainer, getSeriesColor } from \"./ChartContainer.js\";\nimport { themeAxisChild, type ChartBorderVariant } 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 * Border variant for axis lines and tick marks.\n * - \"default\" — uses --color-border-primary (stronger)\n * - \"secondary\" — uses --color-border-secondary (subtler)\n */\n borderVariant?: ChartBorderVariant;\n}\n\n/**\n * Themed ComposedChart.\n * Auto-assigns palette colors to Line, Bar, and Area children and\n * applies themed axis styles to XAxis/YAxis children.\n */\nexport const ComposedChart = ({\n data,\n height,\n colorPalette,\n className,\n style,\n grid = true,\n borderVariant = \"default\",\n children,\n}: ThemedComposedChartProps) => {\n let seriesIndex = 0;\n\n const themedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n\n const themedAxis = themeAxisChild({ child: child as React.ReactElement<any>, variant: borderVariant, XAxis: RechartsXAxis, YAxis: RechartsYAxis, CartesianGrid });\n if (themedAxis) return themedAxis;\n\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} borderVariant={borderVariant}>\n <RechartsComposedChart data={data} margin={{ top: 5, right: 20, bottom: 5, left: 0 }}>\n {grid && <CartesianGrid strokeDasharray=\"3 3\" />}\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// Theme utilities for raw Recharts usage and advanced customization\nexport {\n type ChartBorderVariant,\n getCSSVar,\n getGridColor,\n getAxisStyle,\n getTooltipStyle,\n getLegendStyle,\n} from \"./theme.js\";\n\n// Types\nexport type { ChartContainerProps } from \"./types.js\";\nexport { DEFAULT_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;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":["XAxis","YAxis","CartesianGrid","jsx","Children","cloneElement","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","jsx","jsxs","Children","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","cloneElement","Children","cloneElement","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","jsx","jsxs","Children","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","cloneElement","Children","cloneElement","isValidElement","jsx","Children","isValidElement","cloneElement","Children","cloneElement","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","jsx","jsxs","Children","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","cloneElement","Children","cloneElement","isValidElement","jsx","Children","isValidElement","cloneElement","Children","cloneElement","isValidElement","RechartsLine","RechartsBar","RechartsArea","RechartsXAxis","RechartsYAxis","CartesianGrid","jsx","jsxs","Children","isValidElement","RechartsXAxis","RechartsYAxis","CartesianGrid","RechartsLine","cloneElement","RechartsBar","RechartsArea","jsx","Cell","CartesianGrid","ResponsiveContainer"]}
package/dist/index.js CHANGED
@@ -1489,19 +1489,19 @@ function ToggleGroupOption(_props) {
1489
1489
  import { useState as useState5 } from "react";
1490
1490
  import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
1491
1491
  var outlineColorClasses = {
1492
- info: "border-bdr-secondary text-txt-primary",
1492
+ info: "border-bdr-info text-txt-info",
1493
1493
  danger: "border-bdr-danger text-txt-danger",
1494
1494
  success: "border-bdr-success text-txt-success",
1495
1495
  warning: "border-bdr-warning text-txt-warning"
1496
1496
  };
1497
1497
  var softColorClasses = {
1498
- info: "bg-bg-secondary border-bdr-secondary text-txt-primary",
1498
+ info: "bg-bg-info border-bdr-info text-txt-info",
1499
1499
  danger: "bg-bg-danger border-bdr-danger text-txt-danger",
1500
1500
  success: "bg-bg-success border-bdr-success text-txt-success",
1501
1501
  warning: "bg-bg-warning border-bdr-warning text-txt-warning"
1502
1502
  };
1503
1503
  var solidColorClasses = {
1504
- info: "bg-bg-tertiary text-txt-primary border-transparent",
1504
+ info: "bg-bg-info text-txt-info border-transparent",
1505
1505
  danger: "bg-bg-danger text-txt-danger border-transparent",
1506
1506
  success: "bg-bg-success text-txt-success border-transparent",
1507
1507
  warning: "bg-bg-warning text-txt-warning border-transparent"