import type React from "react" import { cn } from "../../utils/cn" import { UnifiedSkeleton, TextSkeleton, MediaSkeleton, InteractiveSkeleton } from "./unified-skeleton" import { CardSkeletonGrid } from "./card-skeleton" interface PageLayoutSkeletonProps { className?: string } /** * Announcement bar skeleton that matches the AnnouncementBar component */ export function AnnouncementBarSkeleton() { return (
{/* Logo skeleton */}
{/* Text content skeleton */}
{/* Close button skeleton */}
) } /** * Header skeleton that matches the ClientOnlyHeader placeholder but with proper animations */ export function HeaderSkeleton() { return (
{/* Left: Logo skeleton */}
{/* Center: Navigation skeleton - hidden on mobile, visible on desktop */} {/* Right: Actions skeleton */}
{/* Mobile: Show hamburger skeleton */}
{/* Desktop: Show action buttons skeletons */}
) } /** * Hero section skeleton for static content areas */ export function HeroSkeleton() { return (
{/* Title skeleton */} {/* Subtitle skeleton */}
{/* CTA Button skeleton */}
) } /** * Search container skeleton with filters */ export function SearchContainerSkeleton({ className, showFilters = true }: PageLayoutSkeletonProps & { showFilters?: boolean }) { return (
{/* Search input and button */}
{/* Filter chips */} {showFilters && (
)}
) } /** * Category sidebar skeleton for filtering pages */ export function CategorySidebarSkeleton({ className }: PageLayoutSkeletonProps) { // Matches the actual MultiLevelNavigation sidebar with folder/file icons, README badges, and chevrons const items = [ { type: 'file', width: 'w-20', hasBadge: false }, { type: 'folder', width: 'w-24', hasBadge: true }, { type: 'folder', width: 'w-20', hasBadge: true }, { type: 'folder', width: 'w-24', hasBadge: true }, { type: 'folder', width: 'w-16', hasBadge: true }, { type: 'folder', width: 'w-20', hasBadge: true }, { type: 'folder', width: 'w-28', hasBadge: true }, { type: 'folder', width: 'w-16', hasBadge: true }, { type: 'folder', width: 'w-24', hasBadge: true }, { type: 'file', width: 'w-28' }, { type: 'file', width: 'w-36' }, ] return (
{/* DATA ROOM label */} {/* Navigation items — each has card background matching actual MultiLevelNavigation */}
{items.map((item, index) => (
{item.hasBadge && } {item.type === 'folder' && }
))}
) } /** * Breadcrumb navigation skeleton */ export function BreadcrumbSkeleton({ className }: PageLayoutSkeletonProps) { return (
) } /** * Results header skeleton with count and sorting */ export function ResultsHeaderSkeleton({ className }: PageLayoutSkeletonProps) { return (
{/* */}
) } /** * Two-column layout skeleton (sidebar + main content) */ export function TwoColumnLayoutSkeleton({ className, sidebarContent, mainContent, sidebarPosition = 'left' }: PageLayoutSkeletonProps & { sidebarContent?: React.ReactNode mainContent?: React.ReactNode sidebarPosition?: 'left' | 'right' }) { const sidebar = sidebarContent || const main = mainContent || return (
{sidebarPosition === 'left' ? ( <>
{main}
) : ( <>
{main}
)}
) } /** * Article/blog post layout skeleton */ export function ArticleLayoutSkeleton({ className }: PageLayoutSkeletonProps) { return (
{/* Article header */}
{/* Category/tags */}
{/* Title */}
{/* Metadata */}
{/* Featured image */}
{/* Article content */}
{/* Paragraphs */} {Array.from({ length: 12 }).map((_, index) => (
))} {/* Subheading in content */}
) } /** * Vendor Detail Layout Skeleton - Complete vendor detail page structure * Matches the refactored vendor detail page with proper platform colors and responsive layout */ export function VendorDetailLayoutSkeleton({ className }: PageLayoutSkeletonProps) { return (
{/* Breadcrumb */} {/* Main Layout Container */}
{/* Left Content Area */}
{/* Vendor Hero Section */}
{/* Header - Logo and Title Side by Side */}
{/* Large title skeleton */}
{/* Category text */}
{/* Pricing tags */}
{/* Vendor Image Display Skeleton */}
{/* Mobile Sidebar - Show on mobile only, positioned after title */}
{/* Deploy Button */}
{/* Voting Buttons */}
{/* GitHub Score Section */}
{/* Header */}
{/* Stats */}
{Array.from({ length: 4 }).map((_, i) => (
))}
{/* Action Buttons */}
{/* Alternatives Container */}
{/* Open Source Alternatives */}
{Array.from({ length: 6 }).map((_, i) => (
))}
{/* Commercial Alternatives */}
{Array.from({ length: 4 }).map((_, i) => (
))}
{/* About Section */}
{/* Key Features Section */}
{Array.from({ length: 6 }).map((_, i) => (
))}
{/* Pros and Cons Section */}
{/* Pros Column */}
{Array.from({ length: 3 }).map((_, i) => (
))}
{/* Cons Column */}
{Array.from({ length: 3 }).map((_, i) => (
))}
{/* Alternatives Section */}
{Array.from({ length: 6 }).map((_, i) => (
{/* Header */}
{/* Description */}
{/* Footer */}
))}
{/* Show All Button */}
{/* Comments Section */}
{/* Comment Form Skeleton */}
{/* Title Section */}
{/* Description Section */}
{/* Send Button */}
{/* Sample Comment Cards */}
{Array.from({ length: 3 }).map((_, i) => (
{/* Comment Header */}
{/* User Info */}
{/* Timestamp */}
{/* Comment Content */}
))}
{/* Right Sidebar - Desktop Only */}
{/* Deploy Button */}
{/* Voting Buttons */}
{/* GitHub Score Section */}
{/* Header */}
{/* Stats */}
{Array.from({ length: 4 }).map((_, i) => (
))}
{/* Action Buttons */}
) } /** * Stats/features section skeleton for homepage */ export function StatsSectionSkeleton({ className, columns = 3 }: PageLayoutSkeletonProps & { columns?: number }) { return (
{Array.from({ length: columns }).map((_, i) => (
))}
) } /** * Blog Card Grid Skeleton - Always displays exactly 4 blog card skeletons * Used for consistent blog page layout with predictable height */ export function BlogCardGridSkeleton({ className }: PageLayoutSkeletonProps) { return (
) } /** * Vendor Grid Skeleton - Always displays exactly 12 vendor card skeletons * Used for consistent vendor page layout with predictable height */ export function VendorGridSkeleton({ className }: PageLayoutSkeletonProps) { return (
) } /** * Slack Community Section Skeleton * Matches SlackCommunity component structure with title, channel list, and chat interface */ export function SlackCommunitySkeleton() { return (
{/* Frame 651 Container */}
{/* Title Skeleton */}
{/* Content Area - Channel List + Chat Interface */}
{/* Channel List Skeleton */}
{/* Header */}
{/* Channels */}
{Array.from({ length: 5 }).map((_, i) => (
))}
{/* Stats */}
{/* Chat Interface Skeleton */}
{/* Header */}
{/* Messages */}
{Array.from({ length: 6 }).map((_, i) => (
))}
{/* Input Area */}
); }