import * as React from "react" import { type registryItemSchema } from "shadcn/schema" import { type z } from "zod" import { highlightCode } from "@/lib/highlight-code" import { getRegistryItem } from "@/lib/registry" import { cn } from "@/lib/utils" import { ChartIframe } from "@/components/chart-iframe" import { ChartToolbar } from "@/components/chart-toolbar" import { type Style } from "@/registry/_legacy-styles" export type Chart = z.infer & { highlightedCode: string } export function ChartDisplay({ chart, style, className, }: { chart: Chart style: string } & React.ComponentProps<"div">) { return (
) } // Exported for parallel prefetching in page components. export const getCachedRegistryItem = React.cache( async (name: string, styleName: Style["name"]) => { return await getRegistryItem(name, styleName) } ) export const getChartHighlightedCode = React.cache(async (content: string) => { return await highlightCode(content) })