|
| 1 | +/** |
| 2 | + * Maps component names to their React component + category. |
| 3 | + * Used by the MCP server to look up components for rendering. |
| 4 | + */ |
| 5 | +import type { ComponentType } from "react" |
| 6 | + |
| 7 | +import { LineChart } from "../src/components/charts/xy/LineChart" |
| 8 | +import { AreaChart } from "../src/components/charts/xy/AreaChart" |
| 9 | +import { StackedAreaChart } from "../src/components/charts/xy/StackedAreaChart" |
| 10 | +import { Scatterplot } from "../src/components/charts/xy/Scatterplot" |
| 11 | +import { BubbleChart } from "../src/components/charts/xy/BubbleChart" |
| 12 | +import { Heatmap } from "../src/components/charts/xy/Heatmap" |
| 13 | + |
| 14 | +import { BarChart } from "../src/components/charts/ordinal/BarChart" |
| 15 | +import { StackedBarChart } from "../src/components/charts/ordinal/StackedBarChart" |
| 16 | +import { GroupedBarChart } from "../src/components/charts/ordinal/GroupedBarChart" |
| 17 | +import { SwarmPlot } from "../src/components/charts/ordinal/SwarmPlot" |
| 18 | +import { BoxPlot } from "../src/components/charts/ordinal/BoxPlot" |
| 19 | +import { DotPlot } from "../src/components/charts/ordinal/DotPlot" |
| 20 | +import { PieChart } from "../src/components/charts/ordinal/PieChart" |
| 21 | +import { DonutChart } from "../src/components/charts/ordinal/DonutChart" |
| 22 | + |
| 23 | +import { ForceDirectedGraph } from "../src/components/charts/network/ForceDirectedGraph" |
| 24 | +import { ChordDiagram } from "../src/components/charts/network/ChordDiagram" |
| 25 | +import { SankeyDiagram } from "../src/components/charts/network/SankeyDiagram" |
| 26 | +import { TreeDiagram } from "../src/components/charts/network/TreeDiagram" |
| 27 | +import { Treemap } from "../src/components/charts/network/Treemap" |
| 28 | +import { CirclePack } from "../src/components/charts/network/CirclePack" |
| 29 | + |
| 30 | +export interface RegistryEntry { |
| 31 | + component: ComponentType<any> |
| 32 | + category: "xy" | "ordinal" | "network" |
| 33 | +} |
| 34 | + |
| 35 | +export const COMPONENT_REGISTRY: Record<string, RegistryEntry> = { |
| 36 | + LineChart: { component: LineChart, category: "xy" }, |
| 37 | + AreaChart: { component: AreaChart, category: "xy" }, |
| 38 | + StackedAreaChart: { component: StackedAreaChart, category: "xy" }, |
| 39 | + Scatterplot: { component: Scatterplot, category: "xy" }, |
| 40 | + BubbleChart: { component: BubbleChart, category: "xy" }, |
| 41 | + Heatmap: { component: Heatmap, category: "xy" }, |
| 42 | + |
| 43 | + BarChart: { component: BarChart, category: "ordinal" }, |
| 44 | + StackedBarChart: { component: StackedBarChart, category: "ordinal" }, |
| 45 | + GroupedBarChart: { component: GroupedBarChart, category: "ordinal" }, |
| 46 | + SwarmPlot: { component: SwarmPlot, category: "ordinal" }, |
| 47 | + BoxPlot: { component: BoxPlot, category: "ordinal" }, |
| 48 | + DotPlot: { component: DotPlot, category: "ordinal" }, |
| 49 | + PieChart: { component: PieChart, category: "ordinal" }, |
| 50 | + DonutChart: { component: DonutChart, category: "ordinal" }, |
| 51 | + |
| 52 | + ForceDirectedGraph: { component: ForceDirectedGraph, category: "network" }, |
| 53 | + ChordDiagram: { component: ChordDiagram, category: "network" }, |
| 54 | + SankeyDiagram: { component: SankeyDiagram, category: "network" }, |
| 55 | + TreeDiagram: { component: TreeDiagram, category: "network" }, |
| 56 | + Treemap: { component: Treemap, category: "network" }, |
| 57 | + CirclePack: { component: CirclePack, category: "network" }, |
| 58 | +} |
0 commit comments