chart-code-viewer.tsx — ui Source File
Architecture documentation for chart-code-viewer.tsx, a tsx file in the ui codebase. 10 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 20704409_1542_142b_25f9_8e62704c64f7["chart-code-viewer.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 20704409_1542_142b_25f9_8e62704c64f7 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 20704409_1542_142b_25f9_8e62704c64f7 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 5b9fe790_07fa_d673_2d62_394a21141145["use-media-query"] 20704409_1542_142b_25f9_8e62704c64f7 --> 5b9fe790_07fa_d673_2d62_394a21141145 68e596e7_6979_4afc_6ab2_5388e7fb2914["chart-copy-button"] 20704409_1542_142b_25f9_8e62704c64f7 --> 68e596e7_6979_4afc_6ab2_5388e7fb2914 732e465a_ced3_b1a5_d804_02cfa6f4300b["chart-display"] 20704409_1542_142b_25f9_8e62704c64f7 --> 732e465a_ced3_b1a5_d804_02cfa6f4300b aae3c3f1_230a_9c11_a663_8bbc3f0ad054["icons"] 20704409_1542_142b_25f9_8e62704c64f7 --> aae3c3f1_230a_9c11_a663_8bbc3f0ad054 d2b27478_fb6c_53f0_59ff_30c5a904c9c4["open-in-v0-button"] 20704409_1542_142b_25f9_8e62704c64f7 --> d2b27478_fb6c_53f0_59ff_30c5a904c9c4 57e86e45_ac6e_7278_be08_9092724e8401["button"] 20704409_1542_142b_25f9_8e62704c64f7 --> 57e86e45_ac6e_7278_be08_9092724e8401 538a1992_2e44_c995_0fe9_493e88eb6ea5["drawer"] 20704409_1542_142b_25f9_8e62704c64f7 --> 538a1992_2e44_c995_0fe9_493e88eb6ea5 58ac4ad9_4dcc_824e_b958_15469e530779["sheet"] 20704409_1542_142b_25f9_8e62704c64f7 --> 58ac4ad9_4dcc_824e_b958_15469e530779 style 20704409_1542_142b_25f9_8e62704c64f7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as React from "react"
import { cn } from "@/lib/utils"
import { useMediaQuery } from "@/hooks/use-media-query"
import { ChartCopyButton } from "@/components/chart-copy-button"
import { type Chart } from "@/components/chart-display"
import { getIconForLanguageExtension } from "@/components/icons"
import { OpenInV0Button } from "@/components/open-in-v0-button"
import { Button } from "@/registry/new-york-v4/ui/button"
import {
Drawer,
DrawerContent,
DrawerDescription,
DrawerHeader,
DrawerTitle,
DrawerTrigger,
} from "@/registry/new-york-v4/ui/drawer"
import {
Sheet,
SheetContent,
SheetDescription,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "@/registry/new-york-v4/ui/sheet"
export function ChartCodeViewer({
chart,
className,
children,
}: {
chart: Chart
} & React.ComponentProps<"div">) {
const isDesktop = useMediaQuery("(min-width: 768px)")
const button = (
<Button
size="sm"
variant="outline"
className="text-foreground hover:bg-muted dark:text-foreground h-6 rounded-[6px] border bg-transparent px-2 text-xs shadow-none"
>
View Code
</Button>
)
const content = (
<div className="flex min-h-0 flex-1 flex-col gap-0">
<div className="chart-wrapper theme-container hidden sm:block [&_[data-chart]]:mx-auto [&_[data-chart]]:max-h-[35vh] [&>div]:rounded-none [&>div]:border-0 [&>div]:border-b [&>div]:shadow-none">
{children}
</div>
<div className="flex min-w-0 flex-1 flex-col overflow-hidden p-4">
<figure
data-rehype-pretty-code-figure=""
className="mt-0 flex h-auto min-w-0 flex-1 flex-col overflow-hidden"
>
<figcaption
className="text-foreground [&>svg]:text-foreground flex h-12 shrink-0 items-center gap-2 border-b py-2 pr-2 pl-4 [&>svg]:size-4 [&>svg]:opacity-70"
data-language="tsx"
>
{getIconForLanguageExtension("tsx")}
// ... (61 more lines)
Domain
Subdomains
Functions
Dependencies
- button
- chart-copy-button
- chart-display
- drawer
- icons
- open-in-v0-button
- react
- sheet
- use-media-query
- utils
Source
Frequently Asked Questions
What does chart-code-viewer.tsx do?
chart-code-viewer.tsx is a source file in the ui codebase, written in tsx. It belongs to the Internationalization domain, RTLLayout subdomain.
What functions are defined in chart-code-viewer.tsx?
chart-code-viewer.tsx defines 1 function(s): ChartCodeViewer.
What does chart-code-viewer.tsx depend on?
chart-code-viewer.tsx imports 10 module(s): button, chart-copy-button, chart-display, drawer, icons, open-in-v0-button, react, sheet, and 2 more.
Where is chart-code-viewer.tsx in the architecture?
chart-code-viewer.tsx is located at apps/v4/components/chart-code-viewer.tsx (domain: Internationalization, subdomain: RTLLayout, directory: apps/v4/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free