"use client"; import * as React from "react"; import { Link, useLocation } from "react-router"; import { Button } from "@/components/ui/button"; import { ComponentDocImportSection, ComponentDocSpecSections, DesignSystemDocArticle, } from "@/components/design-system/component-doc-shell"; import { ComponentDocDetails } from "@/components/design-system/component-doc-details"; import { designSystemHasLivePreview } from "@/components/design-system/design-system-preview-meta"; import { resolveComponentDocSpec } from "@/lib/design-system/component-doc-resolve"; import { designSystemPreviewIsWide } from "@/lib/design-system/component-doc-shell"; import { loadComponentDocSpec } from "@/lib/design-system/component-docs"; import { getDesignSystemChildEntries, getDesignSystemEntry, type DesignSystemRegistryEntry, } from "@/lib/design-system/registry"; import { DS_DOC_BODY, DS_DOC_BODY_EMPHASIS, } from "@/lib/design-system/doc-typography"; import { cn } from "@/lib/utils"; import { useProductDashboardHref } from "@/contexts/product-route-sync"; const FallbackPreviewSections = React.lazy(() => import("@/components/design-system/design-system-previews").then((mod) => ({ default: mod.DesignSystemPreviewSections, })), ); const PREVIEW_FALLBACK = (
); function PreviewPlaceholder({ entry }: { entry: DesignSystemRegistryEntry }) { return (