import { Archive, ArrowRight, Bell, BookOpen, Camera, ChevronRight, Clock3, Coins, Copy, Crown, House, MessageCircle, Pencil, Search, Settings, Sparkles, Ticket, UserPlus, UserRound, } from 'lucide-react'; import { type ComponentType, useMemo } from 'react'; import type { CustomWorldGalleryCard, CustomWorldLibraryEntry, ProfileDashboardCardKey, ProfileDashboardSummary, ProfileSaveArchiveSummary, } from '../../../packages/shared/src/contracts/runtime'; import type { HydratedSavedGameSnapshot } from '../../persistence/runtimeSnapshotTypes'; import type { AuthUser } from '../../services/authService'; import type { PlatformBrowseHistoryEntry } from '../../services/platformBrowseHistory'; import type { CustomWorldProfile } from '../../types'; import { useResolvedAssetReadUrl } from '../../hooks/useResolvedAssetReadUrl'; import { useAuthUi } from '../auth/AuthUiContext'; import { ResolvedAssetImage } from '../ResolvedAssetImage'; import { PlatformBrandLogo } from './PlatformBrandLogo'; import { buildPlatformWorldTags, describePlatformThemeLabel, formatPlatformWorldTime, type PlatformWorldCardLike, resolvePlatformWorldCoverImage, resolvePlatformWorldLeadPortrait, } from './platformWorldPresentation'; export type PlatformHomeTab = 'home' | 'create' | 'saves' | 'profile'; const PANEL_SURFACE_CLASS = 'platform-surface platform-surface--soft'; const HERO_SURFACE_CLASS = 'platform-surface platform-surface--hero platform-interactive-card'; const MOBILE_PAGE_STAGE_CLASS = 'platform-page-stage platform-remap-surface space-y-4 pb-2'; const DESKTOP_PAGE_STAGE_CLASS = 'platform-page-stage platform-remap-surface space-y-5 pb-4'; function ResolvedAssetBackdrop({ src, alt, className, ariaHidden = false, }: { src?: string | null; alt: string; className: string; ariaHidden?: boolean; }) { const { resolvedUrl, shouldResolve } = useResolvedAssetReadUrl(src); // 私有 OSS 封面在签名地址返回前保持现有底色层,避免浏览器直接访问旧 generated-* 路径。 const displaySrc = resolvedUrl || (!shouldResolve ? src?.trim() ?? '' : ''); if (!displaySrc) { return null; } return ( {alt} ); } function SectionHeader({ title, detail }: { title: string; detail: string }) { return (
{detail}
{title}
); } function EmptyShelf({ text }: { text: string }) { return (
{text}
); } function SaveArchivePreview({ entry, label, className, }: { entry: ProfileSaveArchiveSummary; label: string; className: string; }) { return (