{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "repository-header-glass", "type": "registry:block", "title": "Repository Header Glass", "description": "Repository Header Glass component with glass effects", "dependencies": [ "lucide-react", "react" ], "registryDependencies": [ "cn" ], "files": [ { "path": "components/glass/composite/repository-header-glass.tsx", "type": "registry:component", "content": "// ========================================\n// REPOSITORY HEADER GLASS - COMPOSITE COMPONENT\n// Repository name with status indicator and stars\n// Level 3: Composite (extracted from RepositoryCardGlass)\n// ========================================\n\nimport { forwardRef, type HTMLAttributes, type CSSProperties } from 'react';\nimport { Star, ChevronDown, ChevronUp } from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { StatusIndicatorGlass } from '../specialized/status-indicator-glass';\nimport '@/glass-theme.css';\n\nexport type RepositoryFlagType = 'green' | 'yellow' | 'red';\n\nexport interface RepositoryHeaderGlassProps extends HTMLAttributes {\n /** Repository name */\n readonly name: string;\n /** Flag/status type */\n readonly flagType?: RepositoryFlagType;\n /** Star count */\n readonly stars?: number;\n /** Is expanded state */\n readonly expanded?: boolean;\n /** Abbreviated star count for mobile (1.2k instead of 1234) */\n readonly abbreviatedStars?: boolean;\n}\n\nexport const RepositoryHeaderGlass = forwardRef<\n HTMLDivElement,\n RepositoryHeaderGlassProps\n>(\n (\n {\n name,\n flagType = 'green',\n stars = 0,\n expanded = false,\n abbreviatedStars = false,\n className,\n ...props\n },\n ref\n ) => {\n const titleStyles: CSSProperties = {\n color: 'var(--text-primary)',\n };\n\n const starStyles: CSSProperties = {\n color: 'var(--status-away)',\n };\n\n const mutedStyles: CSSProperties = {\n color: 'var(--text-muted)',\n };\n\n const formatStars = (count: number): string => {\n if (!abbreviatedStars) return String(count);\n if (count >= 1000000) return `${(count / 1000000).toFixed(1)}M`;\n if (count >= 1000) return `${(count / 1000).toFixed(1)}k`;\n return String(count);\n };\n\n return (\n \n
\n \n {name}\n \n \n
\n
\n {stars > 0 && (\n \n \n {formatStars(stars)}\n \n )}\n {expanded ? (\n \n ) : (\n \n )}\n
\n \n );\n }\n);\n\nRepositoryHeaderGlass.displayName = 'RepositoryHeaderGlass';\n" } ], "categories": [ "composite" ] }