@burdenoff/microfe-store 2026.625.2 → 2026.625.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -642,7 +642,7 @@ var Se = (e, t) => ({
642
642
  count: J.oneStar,
643
643
  percentage: Q > 0 ? J.oneStar / Q * 100 : 0
644
644
  }
645
- ] : [], at = Z.requiredPermissions || [], ot = Z.integrationDeps || [], st = () => Z.pricingModel === "FREE" ? "Free" : Z.pricingModel === "SUBSCRIPTION" ? `${r(Z.price, Z.currency)}/mo` : r(Z.price, Z.currency), $ = Z.pricingModel === "FREE" || Z.price === 0;
645
+ ] : [], at = (Z.requiredPermissions || []).filter((e) => e && e !== "[object Object]"), ot = Z.integrationDeps || [], st = () => Z.pricingModel === "FREE" ? "Free" : Z.pricingModel === "SUBSCRIPTION" ? `${r(Z.price, Z.currency)}/mo` : r(Z.price, Z.currency), $ = Z.pricingModel === "FREE" || Z.price === 0;
646
646
  return /* @__PURE__ */ f("div", {
647
647
  className: "h-full overflow-y-auto bg-bg-base",
648
648
  children: [
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDetailPage.js","names":[],"sources":["../../src/pages/ProductDetailPage.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useState, useCallback, useEffect, useRef, useMemo } from 'react';\nimport { useParams, useNavigate, useLocation } from 'react-router-dom';\nimport { useEventBus } from '@burdenoff/fe-libs/shared/events';\nimport {\n ArrowLeft,\n Star,\n ShieldCheck,\n Check,\n ThumbsUp,\n Package,\n AlertCircle,\n ShoppingCart,\n Loader2,\n} from 'lucide-react';\nimport { useStore } from '../providers/StoreProvider';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../utils/nativeBridge';\nimport {\n useCreateReview,\n useDeleteReview,\n useMarkReviewHelpful,\n useStoreProductDetails,\n useUpdateReview,\n} from '../hooks/useStoreGraphQL';\nimport { useCart } from '../hooks/useCart';\nimport { useInstallations } from '../hooks/useInstallations';\nimport { formatNumber, formatPrice } from '../utils';\nimport { InstallAppModal } from '../components/InstallAppModal';\nimport type {\n Product,\n ItemType,\n ProductType,\n PricingModel as CartPricingModel,\n ProductStatus,\n} from '../types';\n\n// ============================================================================\n// Type Definitions for GraphQL Response\n// ============================================================================\n\ninterface Publisher {\n id: string;\n userId?: string;\n name: string;\n email?: string;\n websiteUrl?: string;\n logoUrl?: string;\n bio?: string;\n isVerified: boolean;\n totalSales?: number;\n totalEarnings?: number;\n createdAt?: string;\n}\n\ninterface ProductReview {\n id: string;\n productId: string;\n userId: string;\n rating: number;\n title?: string;\n comment?: string;\n status: string;\n helpful: number;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface RelatedProduct {\n id: string;\n name: string;\n slug?: string;\n icon?: string;\n type: string;\n price: number;\n pricingModel: string;\n rating?: number;\n reviewCount?: number;\n downloads: number;\n publisher?: {\n id: string;\n name: string;\n isVerified: boolean;\n };\n}\n\ninterface RatingDistribution {\n fiveStars: number;\n fourStars: number;\n threeStars: number;\n twoStars: number;\n oneStar: number;\n}\n\ninterface UserEntitlement {\n id: string;\n status: string;\n licenseKey?: string;\n expiresAt?: string;\n}\n\ninterface StoreProduct {\n id: string;\n name: string;\n slug?: string;\n type: string;\n nature: string;\n status: string;\n description?: string;\n longDescription?: string;\n pricingModel: string;\n price: number;\n currency: string;\n icon?: string;\n screenshots: string[];\n videoUrls?: string[];\n documentationUrl?: string;\n repositoryUrl?: string;\n category?: string;\n tags?: string[];\n featured: boolean;\n zipFileUrl?: string;\n downloads: number;\n viewCount?: number;\n rating?: number;\n reviewCount: number;\n publishedAt?: string;\n createdAt: string;\n updatedAt: string;\n // Manifest fields\n subType?: string;\n manifestVersion?: string;\n authorName?: string;\n license?: string;\n minPlatformVersion?: string;\n compatibleProducts?: string[];\n requiredPermissions?: string[];\n integrationDeps?: string[];\n // Physical product fields\n sku?: string;\n stockQuantity?: number;\n trackInventory?: boolean;\n requiresShipping?: boolean;\n weight?: number;\n weightUnit?: string;\n brand?: string;\n manifest?: Record<string, unknown>;\n publisher?: Publisher;\n}\n\ninterface StoreProductDetailsResponse {\n product: StoreProduct;\n publisher: Publisher;\n reviews: ProductReview[];\n reviewsCount: number;\n relatedProducts: RelatedProduct[];\n userReview?: ProductReview;\n isPurchased: boolean;\n userEntitlement?: UserEntitlement;\n ratingDistribution?: RatingDistribution;\n}\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\n/**\n * Convert StoreProduct (GraphQL) to Product (Cart) type\n */\nconst convertToCartProduct = (storeProduct: StoreProduct, publisher?: Publisher): Product => {\n // Map GraphQL pricing model to cart pricing model\n const mapPricingModel = (model: string): CartPricingModel => {\n const mapping: Record<string, CartPricingModel> = {\n FREE: 'FREE',\n PAID_ONETIME: 'ONE_TIME',\n SUBSCRIPTION: 'SUBSCRIPTION',\n USAGE_BASED: 'USAGE_BASED',\n FREEMIUM: 'FREEMIUM',\n };\n return mapping[model] || 'ONE_TIME';\n };\n\n // Map product type\n const mapProductType = (type: string): ProductType => {\n const mapping: Record<string, ProductType> = {\n APP: 'STANDALONE_APP',\n BOTAPP: 'STANDALONE_APP',\n AGENT: 'STANDALONE_APP',\n WORKFLOW: 'WORKFLOW_TEMPLATE',\n TEMPLATE: 'WORKFLOW_TEMPLATE',\n INTEGRATION: 'API_INTEGRATION',\n EXTENSION: 'BROWSER_EXTENSION',\n THEME: 'UI_THEME',\n PLUGIN: 'WORKSPACE_MODULE',\n COMPONENT: 'WORKSPACE_MODULE',\n WIDGET: 'WORKSPACE_MODULE',\n VIBEMODULE: 'WORKSPACE_MODULE',\n CONSOLE: 'STANDALONE_APP',\n NODE: 'WORKSPACE_MODULE',\n };\n return mapping[type] || 'STANDALONE_APP';\n };\n\n // Map item type\n const mapItemType = (nature: string, type: string): ItemType => {\n if (nature === 'PHYSICAL') return 'PHYSICAL';\n const typeMapping: Record<string, ItemType> = {\n APP: 'APP',\n BOTAPP: 'APP',\n AGENT: 'APP',\n WORKFLOW: 'WORKFLOW',\n TEMPLATE: 'TEMPLATE',\n INTEGRATION: 'INTEGRATION',\n EXTENSION: 'EXTENSION',\n THEME: 'THEME',\n };\n return typeMapping[type] || 'APP';\n };\n\n return {\n id: storeProduct.id,\n publisherId: publisher?.id || '',\n publisher: {\n id: publisher?.id || '',\n name: publisher?.name || storeProduct.authorName || 'Unknown',\n displayName: publisher?.name || storeProduct.authorName || 'Unknown',\n email: publisher?.email || '',\n verified: publisher?.isVerified || false,\n totalProducts: 0,\n totalDownloads: 0,\n averageRating: 0,\n joinedAt: publisher?.createdAt || storeProduct.createdAt,\n website: publisher?.websiteUrl,\n logoUrl: publisher?.logoUrl,\n },\n name: storeProduct.name,\n slug: storeProduct.slug || storeProduct.id,\n displayName: storeProduct.name,\n description: storeProduct.longDescription || storeProduct.description || '',\n shortDescription: storeProduct.description || '',\n iconUrl: storeProduct.icon,\n screenshotUrls: storeProduct.screenshots || [],\n videoUrls: storeProduct.videoUrls || [],\n itemType: mapItemType(storeProduct.nature, storeProduct.type),\n type: mapProductType(storeProduct.type),\n tags: storeProduct.tags || [],\n pricingModel: mapPricingModel(storeProduct.pricingModel),\n basePrice: storeProduct.price,\n currency: storeProduct.currency || 'USD',\n variants: [],\n status: (storeProduct.status as ProductStatus) || 'PUBLISHED',\n featured: storeProduct.featured,\n verified: publisher?.isVerified || false,\n downloadCount: storeProduct.downloads,\n installCount: storeProduct.downloads,\n orderCount: 0,\n averageRating: storeProduct.rating || 0,\n reviewCount: storeProduct.reviewCount,\n createdAt: storeProduct.createdAt,\n updatedAt: storeProduct.updatedAt,\n publishedAt: storeProduct.publishedAt,\n };\n};\n\n// ============================================================================\n// Helper Components\n// ============================================================================\n\n/**\n * Rating bar component for rating distribution\n */\nconst RatingBar: FC<{ stars: number; percentage: number; count: number }> = ({\n stars,\n percentage,\n count,\n}) => (\n <div className=\"flex items-center gap-2\">\n <span className=\"w-3 text-xs text-text-muted\">{stars}</span>\n <div className=\"h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken\">\n <div\n className=\"h-full rounded-full bg-status-warning-bg-subtle\"\n style={{ width: `${percentage}%` }}\n />\n </div>\n <span className=\"w-12 text-right text-xs text-text-muted\">{formatNumber(count)}</span>\n </div>\n);\n\n/**\n * Review card component\n */\nconst ReviewCard: FC<{\n review: ProductReview;\n onMarkHelpful: (reviewId: string) => void;\n markingHelpful: boolean;\n}> = ({ review, onMarkHelpful, markingHelpful }) => {\n const formatDate = (dateString: string) => {\n try {\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n });\n } catch {\n return dateString;\n }\n };\n\n return (\n <div className=\"rounded-lg border border-border-default bg-bg-surface p-4\">\n <div className=\"mb-3 flex items-start justify-between\">\n <div className=\"flex items-center gap-3\">\n <div className=\"flex size-10 items-center justify-center rounded-full bg-bg-sunken text-text-muted\">\n {review.userId.charAt(0).toUpperCase()}\n </div>\n <div>\n <p className=\"font-medium text-text-primary\">User {review.userId.slice(0, 8)}</p>\n <div className=\"flex items-center gap-2\">\n <div className=\"flex gap-0.5\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Star\n key={star}\n className={`size-3 ${\n star <= review.rating\n ? 'fill-current text-status-warning-text'\n : 'text-text-muted'\n }`}\n />\n ))}\n </div>\n <span className=\"text-xs text-text-muted\">{formatDate(review.createdAt)}</span>\n </div>\n </div>\n </div>\n </div>\n {review.title && <h4 className=\"mb-2 font-medium text-text-primary\">{review.title}</h4>}\n {review.comment && <p className=\"mb-3 text-sm text-text-muted\">{review.comment}</p>}\n <div className=\"flex items-center justify-between\">\n <button\n type=\"button\"\n onClick={() => onMarkHelpful(review.id)}\n disabled={markingHelpful}\n aria-label={`Mark review from ${review.userId} as helpful`}\n className=\"flex items-center gap-1 text-xs text-text-muted transition-colors hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-60\"\n >\n <ThumbsUp className=\"size-3.5\" />\n <span>{markingHelpful ? 'Updating…' : `Helpful (${review.helpful})`}</span>\n </button>\n </div>\n </div>\n );\n};\n\n/**\n * Loading skeleton component - comprehensive skeleton matching full page layout\n */\nconst LoadingSkeleton: FC = () => (\n <div className=\"h-full overflow-y-auto\">\n {/* Header Skeleton */}\n <div className=\"sticky top-0 z-10 border-b border-border-default bg-bg-surface px-6 py-4\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-10 animate-pulse rounded-lg bg-bg-sunken\" />\n <div className=\"h-6 w-48 flex-1 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"flex gap-2\">\n <div className=\"size-10 animate-pulse rounded-lg bg-bg-sunken\" />\n <div className=\"size-10 animate-pulse rounded-lg bg-bg-sunken\" />\n </div>\n </div>\n </div>\n\n <div className=\"mx-auto max-w-6xl p-6\">\n {/* App Header Section Skeleton */}\n <div className=\"mb-8 flex flex-col gap-6 md:flex-row\">\n {/* App Icon & Basic Info */}\n <div className=\"flex gap-4 md:w-1/2\">\n <div className=\"size-28 animate-pulse rounded-2xl bg-bg-sunken\" />\n <div className=\"flex flex-1 flex-col justify-center gap-2\">\n <div className=\"h-8 w-3/4 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"flex items-center gap-2\">\n <div className=\"h-4 w-32 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"size-4 animate-pulse rounded-full bg-bg-sunken\" />\n </div>\n <div className=\"flex gap-3\">\n <div className=\"h-5 w-16 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-5 w-24 animate-pulse rounded bg-bg-sunken\" />\n </div>\n </div>\n </div>\n\n {/* Rating & Install Skeleton */}\n <div className=\"flex flex-col gap-4 md:w-1/2 md:items-end\">\n <div className=\"flex items-center gap-4\">\n <div className=\"text-center\">\n <div className=\"h-10 w-16 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-3 w-20 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"h-12 w-px bg-border-default\" />\n <div className=\"text-center\">\n <div className=\"h-8 w-16 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-3 w-16 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"h-12 w-px bg-border-default\" />\n <div className=\"text-center\">\n <div className=\"h-8 w-20 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-3 w-12 animate-pulse rounded bg-bg-sunken\" />\n </div>\n </div>\n <div className=\"flex gap-3\">\n <div className=\"h-12 w-40 animate-pulse rounded-lg bg-bg-sunken\" />\n <div className=\"size-12 animate-pulse rounded-lg bg-bg-sunken\" />\n </div>\n </div>\n </div>\n\n {/* Screenshots Skeleton */}\n <section className=\"mb-8\">\n <div className=\"aspect-video animate-pulse rounded-lg bg-bg-sunken\" />\n <div className=\"mt-4 flex gap-4\">\n {[...Array(4)].map((_, i) => (\n <div key={i} className=\"h-20 w-36 animate-pulse rounded-lg bg-bg-sunken\" />\n ))}\n </div>\n </section>\n\n {/* About Section Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center gap-2\">\n <div className=\"size-5 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-6 w-32 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4\">\n <div className=\"space-y-2\">\n <div className=\"h-4 w-full rounded bg-bg-sunken\" />\n <div className=\"h-4 w-full rounded bg-bg-sunken\" />\n <div className=\"h-4 w-3/4 rounded bg-bg-sunken\" />\n <div className=\"h-4 w-5/6 rounded bg-bg-sunken\" />\n </div>\n <div className=\"mt-4 flex gap-2\">\n {[...Array(4)].map((_, i) => (\n <div key={i} className=\"h-6 w-16 rounded-full bg-bg-sunken\" />\n ))}\n </div>\n </div>\n </section>\n\n {/* Ratings & Reviews Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <div className=\"size-5 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-6 w-40 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"h-4 w-16 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"mb-6 flex flex-col gap-6 md:flex-row\">\n <div className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4 md:w-64\">\n <div className=\"flex items-center gap-6\">\n <div className=\"text-center\">\n <div className=\"h-12 w-16 rounded bg-bg-sunken\" />\n <div className=\"my-1 flex justify-center gap-0.5\">\n {[...Array(5)].map((_, i) => (\n <div key={i} className=\"size-4 rounded bg-bg-sunken\" />\n ))}\n </div>\n <div className=\"h-3 w-20 rounded bg-bg-sunken\" />\n </div>\n <div className=\"flex-1 space-y-1\">\n {[...Array(5)].map((_, i) => (\n <div key={i} className=\"flex items-center gap-2\">\n <div className=\"h-2 w-3 rounded bg-bg-sunken\" />\n <div className=\"h-2 flex-1 rounded-full bg-bg-sunken\" />\n <div className=\"h-2 w-8 rounded bg-bg-sunken\" />\n </div>\n ))}\n </div>\n </div>\n </div>\n <div className=\"h-12 w-32 animate-pulse rounded-lg bg-bg-sunken\" />\n </div>\n {/* Review Cards Skeleton */}\n <div className=\"space-y-4\">\n {[...Array(2)].map((_, i) => (\n <div\n key={i}\n className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4\"\n >\n <div className=\"mb-3 flex items-start gap-3\">\n <div className=\"size-10 rounded-full bg-bg-sunken\" />\n <div className=\"flex-1\">\n <div className=\"h-4 w-32 rounded bg-bg-sunken\" />\n <div className=\"mt-1 flex items-center gap-2\">\n <div className=\"flex gap-0.5\">\n {[...Array(5)].map((_, j) => (\n <div key={j} className=\"size-3 rounded bg-bg-sunken\" />\n ))}\n </div>\n <div className=\"h-3 w-20 rounded bg-bg-sunken\" />\n </div>\n </div>\n </div>\n <div className=\"space-y-2\">\n <div className=\"h-4 w-full rounded bg-bg-sunken\" />\n <div className=\"h-4 w-2/3 rounded bg-bg-sunken\" />\n </div>\n </div>\n ))}\n </div>\n </section>\n\n {/* Additional Info Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center gap-2\">\n <div className=\"size-5 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-6 w-48 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4\">\n <div className=\"grid gap-4 md:grid-cols-2\">\n {[...Array(6)].map((_, i) => (\n <div key={i}>\n <div className=\"h-3 w-16 rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-5 w-24 rounded bg-bg-sunken\" />\n </div>\n ))}\n </div>\n </div>\n </section>\n\n {/* Related Products Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <div className=\"size-5 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-6 w-40 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"h-4 w-16 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"grid gap-4 md:grid-cols-4\">\n {[...Array(4)].map((_, i) => (\n <div\n key={i}\n className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-3\"\n >\n <div className=\"flex items-center gap-3\">\n <div className=\"size-14 rounded-xl bg-bg-sunken\" />\n <div className=\"flex-1\">\n <div className=\"h-4 w-24 rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-3 w-16 rounded bg-bg-sunken\" />\n <div className=\"mt-1 flex items-center gap-2\">\n <div className=\"h-3 w-8 rounded bg-bg-sunken\" />\n <div className=\"h-3 w-12 rounded bg-bg-sunken\" />\n </div>\n </div>\n </div>\n </div>\n ))}\n </div>\n </section>\n\n {/* Publisher Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 h-6 w-36 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-12 rounded-lg bg-bg-sunken\" />\n <div>\n <div className=\"flex items-center gap-2\">\n <div className=\"h-5 w-32 rounded bg-bg-sunken\" />\n <div className=\"size-4 rounded-full bg-bg-sunken\" />\n </div>\n <div className=\"mt-1 h-4 w-40 rounded bg-bg-sunken\" />\n </div>\n </div>\n <div className=\"mt-3 space-y-2\">\n <div className=\"h-4 w-full rounded bg-bg-sunken\" />\n <div className=\"h-4 w-2/3 rounded bg-bg-sunken\" />\n </div>\n </div>\n </section>\n </div>\n </div>\n);\n\n/**\n * Error display component\n */\nconst ErrorDisplay: FC<{ error: Error; onRetry: () => void; onBack: () => void }> = ({\n error,\n onRetry,\n onBack,\n}) => (\n <div className=\"flex h-full items-center justify-center\">\n <div className=\"text-center\">\n <AlertCircle className=\"mx-auto mb-4 size-12 text-status-error-text\" />\n <h2 className=\"mb-2 text-xl font-semibold text-text-primary\">Failed to load product</h2>\n <p className=\"mb-4 text-text-muted\">\n {error.message || 'An error occurred while loading the product details.'}\n </p>\n <div className=\"flex justify-center gap-3\">\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90\"\n >\n Try Again\n </button>\n <button\n type=\"button\"\n onClick={onBack}\n className=\"rounded-lg border border-border-default px-4 py-2 text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n Go Back\n </button>\n </div>\n </div>\n </div>\n);\n\n// ============================================================================\n// Main Component\n// ============================================================================\n\n/**\n * Product Detail Page Component\n *\n * Displays comprehensive product details using real GraphQL data\n */\nexport const ProductDetailPage: FC = () => {\n const { productId } = useParams<{ productId: string }>();\n const navigate = useNavigate();\n const location = useLocation();\n const { basePath, workspaceId } = useStore();\n const { addProduct, cartItems, addingToCart, createOrder, checkingOut } = useCart();\n const installationsFilter = useMemo(\n () => (productId && workspaceId ? { productId, workspaceId } : undefined),\n [productId, workspaceId]\n );\n const { installations: myInstallations, refetch: refetchInstallations } = useInstallations({\n filter: installationsFilter,\n limit: 1,\n });\n const isInstalledInCurrentWorkspace = myInstallations.some(\n (i) => i.productId === productId && i.workspaceId === workspaceId && i.status === 'ACTIVE'\n );\n const { createReview, loading: creatingReview } = useCreateReview();\n const { updateReview, loading: updatingReview } = useUpdateReview();\n const { deleteReview, loading: deletingReview } = useDeleteReview();\n const { markHelpful, loading: markingHelpful } = useMarkReviewHelpful();\n const bus = useEventBus();\n\n const [showFullDescription, setShowFullDescription] = useState(false);\n const [showAllReviews, setShowAllReviews] = useState(false);\n const [buyingNow, setBuyingNow] = useState(false);\n const [actionError, setActionError] = useState<string | null>(null);\n const [reviewNotice, setReviewNotice] = useState<string | null>(null);\n const [reviewNoticeTone, setReviewNoticeTone] = useState<'success' | 'error'>('success');\n const [isReviewFormOpen, setIsReviewFormOpen] = useState(false);\n const [reviewTitle, setReviewTitle] = useState('');\n const [reviewComment, setReviewComment] = useState('');\n const [reviewRating, setReviewRating] = useState(5);\n const [helpfulReviewId, setHelpfulReviewId] = useState<string | null>(null);\n\n // Install modal state\n const [isInstallModalOpen, setIsInstallModalOpen] = useState(false);\n\n // Fetch product details using GraphQL\n const { data, loading, error, refetch } = useStoreProductDetails({\n id: productId,\n slug: productId, // Also try as slug\n includeReviews: true,\n reviewsLimit: 10,\n includeRelated: true,\n relatedLimit: 4,\n includeVersions: true,\n });\n\n // Cast data to typed response\n const productDetails = data as StoreProductDetailsResponse | null;\n const product = productDetails?.product;\n const publisher = productDetails?.publisher;\n\n // Check if product is already in cart (must be before any early returns)\n const isInCart = cartItems.some((item) => item.productId === product?.id);\n\n // Handle Add to Cart (must be before any early returns)\n const handleAddToCart = useCallback(async () => {\n if (!product) return;\n\n setActionError(null);\n\n if (isInCart) {\n navigate(`${basePath}/cart`);\n return;\n }\n\n try {\n const cartProduct = convertToCartProduct(product, publisher);\n // Add to backend cart via GraphQL API call\n // This will make a mutation to global-public-gateway:4004 → tenantmodule-store-svc:4017\n await addProduct(cartProduct, undefined, 1);\n // Cart drawer will open automatically after adding\n } catch (error) {\n console.error('Failed to add product to cart:', error);\n setActionError('Failed to add this product to cart. Please try again.');\n }\n }, [product, publisher, addProduct, isInCart, navigate, basePath]);\n\n // Handle Buy Now - creates an order and immediately proceeds to checkout\n const handleBuyNow = useCallback(async () => {\n if (!product) return;\n\n setActionError(null);\n setBuyingNow(true);\n\n try {\n // Get product price\n const price = product.price || 0;\n\n // Build line item for this product\n const lineItem = {\n productId: product.id,\n name: product.name,\n quantity: 1,\n unitPrice: price,\n subtotal: price,\n itemType: product.nature?.toLowerCase() || 'digital',\n pricingModel: product.pricingModel || 'PAID_ONETIME',\n };\n\n // Create order input\n const orderInput = {\n total: price,\n lineItems: [lineItem],\n billingAccountId: '', // Will be set on billing page\n };\n\n // Call createStoreOrder mutation to create PENDING order\n const order = await createOrder(orderInput);\n\n if (order?.id) {\n // Navigate to billing page, preserving org/workspace/tenant context params\n navigate(`/billing/checkout/store/${order.id}${location.search}`);\n } else {\n console.error('Failed to create order');\n setActionError('Failed to create order. Please try again.');\n setBuyingNow(false);\n }\n } catch (error) {\n console.error('Buy Now error:', error);\n const message = error instanceof Error ? error.message : 'Failed to start checkout';\n setActionError(message);\n setBuyingNow(false);\n }\n }, [product, createOrder, navigate]);\n\n // Handle Install Free - Open modal for workspace selection (must be before any early returns)\n const handleInstallFree = useCallback(() => {\n if (!product) return;\n setIsInstallModalOpen(true);\n }, [product]);\n\n // Emit product.viewed event once product data loads. Read product via ref so\n // we only emit on id transitions, not on every field change.\n const productRef = useRef(product);\n productRef.current = product;\n const busRef = useRef(bus);\n busRef.current = bus;\n useEffect(() => {\n const p = productRef.current;\n if (!p) return;\n (busRef.current as unknown as { emit: (name: string, payload: unknown) => void }).emit(\n 'store.product.viewed',\n {\n productId: p.id,\n productSlug: p.slug,\n productType: p.type,\n pricingModel: p.pricingModel,\n }\n );\n }, [product?.id]);\n\n // Handle successful installation (must be before any early returns)\n const handleInstallSuccess = useCallback(\n (workspaceId: string, workspaceName: string) => {\n if (!product) return;\n (bus as unknown as { emit: (name: string, payload: unknown) => void }).emit(\n 'store.product.installed',\n {\n productId: product.id,\n workspaceId,\n }\n );\n console.log(\n `Successfully installed ${product.name} to workspace ${workspaceName} (${workspaceId})`\n );\n void refetchInstallations();\n },\n [product, bus, refetchInstallations]\n );\n\n // Handle installation error (must be before any early returns)\n const handleInstallError = useCallback((error: Error) => {\n console.error('Installation failed:', error.message);\n // Error is shown in the modal\n }, []);\n\n const openReviewForm = useCallback(() => {\n setReviewTitle(productDetails?.userReview?.title ?? '');\n setReviewComment(productDetails?.userReview?.comment ?? '');\n setReviewRating(productDetails?.userReview?.rating ?? 5);\n setReviewNotice(null);\n setReviewNoticeTone('success');\n setIsReviewFormOpen(true);\n }, [productDetails?.userReview]);\n\n const handleSubmitReview = useCallback(async () => {\n if (!product) {\n return;\n }\n\n if (reviewRating < 1 || reviewRating > 5) {\n setReviewNoticeTone('error');\n setReviewNotice('Choose a rating from 1 to 5 stars.');\n return;\n }\n\n const payload = {\n productId: product.id,\n rating: reviewRating,\n title: reviewTitle.trim() || undefined,\n comment: reviewComment.trim() || undefined,\n };\n\n const result = productDetails?.userReview\n ? await updateReview(productDetails.userReview.id, {\n rating: payload.rating,\n title: payload.title,\n comment: payload.comment,\n })\n : await createReview(payload);\n\n if (!result) {\n setReviewNoticeTone('error');\n setReviewNotice('We could not save your review. Please try again.');\n return;\n }\n\n setReviewNoticeTone('success');\n setReviewNotice(\n productDetails?.userReview ? 'Your review was updated.' : 'Your review was submitted.'\n );\n setIsReviewFormOpen(false);\n (bus as unknown as { emit: (name: string, payload: unknown) => void }).emit(\n 'store.review.submitted',\n {\n productId: product.id,\n rating: reviewRating,\n }\n );\n await refetch();\n }, [\n bus,\n createReview,\n product,\n productDetails?.userReview,\n refetch,\n reviewComment,\n reviewRating,\n reviewTitle,\n updateReview,\n ]);\n\n const handleDeleteReview = useCallback(async () => {\n if (!productDetails?.userReview) {\n return;\n }\n void nativeImpact('medium');\n const confirmed = await nativeConfirm({\n title: 'Delete review',\n message: 'Are you sure you want to remove your review?',\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n if (confirmed === false) {\n return;\n }\n\n const deleted = await deleteReview(productDetails.userReview.id);\n if (!deleted) {\n setReviewNoticeTone('error');\n setReviewNotice('We could not remove your review. Please try again.');\n void nativeNotify('error');\n return;\n }\n\n setReviewNoticeTone('success');\n setReviewNotice('Your review was removed.');\n setIsReviewFormOpen(false);\n setReviewTitle('');\n setReviewComment('');\n setReviewRating(5);\n void nativeNotify('success');\n await refetch();\n }, [deleteReview, productDetails?.userReview, refetch]);\n\n const handleMarkHelpful = useCallback(\n async (reviewId: string) => {\n setHelpfulReviewId(reviewId);\n const result = await markHelpful(reviewId);\n if (result) {\n await refetch();\n }\n setHelpfulReviewId(null);\n },\n [markHelpful, refetch]\n );\n\n // Handle loading state\n if (loading) {\n return <LoadingSkeleton />;\n }\n\n // Handle error state\n if (error) {\n return (\n <ErrorDisplay\n error={error}\n onRetry={refetch}\n onBack={() => navigate(`${basePath}/marketplace`)}\n />\n );\n }\n\n // Handle not found state\n if (!productDetails?.product) {\n return (\n <div className=\"flex h-full items-center justify-center\">\n <div className=\"text-center\">\n <h2 className=\"mb-2 text-xl font-semibold text-text-primary\">Product not found</h2>\n <p className=\"mb-4 text-text-muted\">\n The product you are looking for does not exist or has been removed.\n </p>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/marketplace`)}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90\"\n >\n Back to Marketplace\n </button>\n </div>\n </div>\n );\n }\n\n const {\n reviews,\n reviewsCount,\n relatedProducts,\n ratingDistribution,\n isPurchased,\n userEntitlement,\n } = productDetails;\n\n // Type assertion: we know product is defined because we checked !productDetails?.product above\n const safeProduct = product!;\n\n // Calculate rating distribution percentages\n const totalRatings = ratingDistribution\n ? ratingDistribution.fiveStars +\n ratingDistribution.fourStars +\n ratingDistribution.threeStars +\n ratingDistribution.twoStars +\n ratingDistribution.oneStar\n : 0;\n\n const ratingDistributionData = ratingDistribution\n ? [\n {\n stars: 5,\n count: ratingDistribution.fiveStars,\n percentage: totalRatings > 0 ? (ratingDistribution.fiveStars / totalRatings) * 100 : 0,\n },\n {\n stars: 4,\n count: ratingDistribution.fourStars,\n percentage: totalRatings > 0 ? (ratingDistribution.fourStars / totalRatings) * 100 : 0,\n },\n {\n stars: 3,\n count: ratingDistribution.threeStars,\n percentage: totalRatings > 0 ? (ratingDistribution.threeStars / totalRatings) * 100 : 0,\n },\n {\n stars: 2,\n count: ratingDistribution.twoStars,\n percentage: totalRatings > 0 ? (ratingDistribution.twoStars / totalRatings) * 100 : 0,\n },\n {\n stars: 1,\n count: ratingDistribution.oneStar,\n percentage: totalRatings > 0 ? (ratingDistribution.oneStar / totalRatings) * 100 : 0,\n },\n ]\n : [];\n\n // Parse permissions from manifest or requiredPermissions\n const permissions = safeProduct.requiredPermissions || [];\n\n // Parse integrations from integrationDeps\n const integrations = safeProduct.integrationDeps || [];\n\n // Pricing display\n const getPriceDisplay = () => {\n if (safeProduct.pricingModel === 'FREE') return 'Free';\n if (safeProduct.pricingModel === 'SUBSCRIPTION') {\n return `${formatPrice(safeProduct.price, safeProduct.currency)}/mo`;\n }\n return formatPrice(safeProduct.price, safeProduct.currency);\n };\n\n // Check if product is free\n const isFree = safeProduct.pricingModel === 'FREE' || safeProduct.price === 0;\n\n return (\n <div className=\"h-full overflow-y-auto bg-bg-base\">\n {/* Hero Section - Two Column Layout */}\n <div className=\"relative bg-bg-surface\">\n <div className=\"mx-auto max-w-7xl\">\n <div className=\"flex flex-col lg:flex-row\">\n {/* Left Column - Product Info */}\n <div className=\"flex-1 px-6 py-8 lg:max-w-xl lg:py-12\">\n {/* Back Button */}\n <button\n type=\"button\"\n onClick={() => navigate(-1)}\n className=\"mb-6 cursor-pointer inline-flex items-center gap-2 text-sm text-text-muted transition-colors hover:text-text-primary\"\n >\n <ArrowLeft className=\"size-4\" />\n Back\n </button>\n\n {/* App Title - Large Typography */}\n <h1 className=\"mb-4 text-4xl font-normal leading-tight text-text-primary lg:text-5xl\">\n {safeProduct.name}\n </h1>\n\n {/* Publisher */}\n <div className=\"mb-2\">\n {publisher?.websiteUrl ? (\n <a\n href={publisher.websiteUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"text-base font-medium text-text-link hover:underline\"\n >\n {publisher.name}\n </a>\n ) : (\n <span className=\"text-base font-medium text-text-primary\">\n {publisher?.name || safeProduct.authorName || 'Unknown Publisher'}\n </span>\n )}\n {publisher?.isVerified && (\n <ShieldCheck className=\"ml-1.5 inline size-4 text-status-success-text\" />\n )}\n </div>\n\n {/* Metadata */}\n <p className=\"mb-6 text-sm text-text-muted\">\n {safeProduct.category && <span>{safeProduct.category}</span>}\n {safeProduct.category && ' · '}\n {formatNumber(safeProduct.downloads)}+ downloads\n </p>\n\n {/* Stats Row */}\n <div className=\"mb-6 flex items-center gap-4\">\n {/* App Icon Badge */}\n <div className=\"flex size-12 items-center justify-center overflow-hidden rounded-xl bg-bg-sunken\">\n {safeProduct.icon ? (\n <img src={safeProduct.icon} alt=\"\" className=\"size-full object-cover\" />\n ) : (\n <span className=\"text-lg font-bold text-text-muted\">\n {safeProduct.name.charAt(0)}\n </span>\n )}\n </div>\n\n {/* Rating */}\n <div className=\"flex items-center gap-1 border-l border-border-default pl-4\">\n <span className=\"text-sm font-medium text-text-primary\">\n {(safeProduct.rating || 0).toFixed(1)}\n </span>\n <Star className=\"size-4 fill-current text-status-warning-text\" />\n <span className=\"ml-1 text-xs text-text-muted\">\n {formatNumber(reviewsCount || safeProduct.reviewCount)} reviews\n </span>\n </div>\n\n {/* Downloads */}\n <div className=\"border-l border-border-default pl-4\">\n <span className=\"text-sm font-medium text-text-primary\">\n {formatNumber(safeProduct.downloads)}+\n </span>\n <p className=\"text-xs text-text-muted\">Downloads</p>\n </div>\n\n {/* Type Badge */}\n <div className=\"border-l border-border-default pl-4\">\n <span className=\"rounded bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary\">\n {safeProduct.type}\n </span>\n <p className=\"mt-0.5 text-xs text-text-muted\">Type</p>\n </div>\n </div>\n\n {/* Action Buttons Row */}\n {actionError && (\n <div\n role=\"alert\"\n className=\"mb-4 rounded-lg border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text\"\n >\n {actionError}\n </div>\n )}\n\n <div className=\"mb-6 flex items-center gap-3\">\n {isInstalledInCurrentWorkspace ? (\n <button\n type=\"button\"\n disabled\n className=\"flex items-center gap-2 rounded-full bg-status-success-bg-subtle px-8 py-3 font-medium text-status-success-text cursor-default\"\n >\n <svg\n className=\"size-4\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"2,8 6,12 14,4\" />\n </svg>\n Installed\n </button>\n ) : isPurchased && !isFree ? (\n <button\n type=\"button\"\n onClick={handleInstallFree}\n className=\"cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90\"\n >\n Install to Workspace\n </button>\n ) : isFree ? (\n <button\n type=\"button\"\n onClick={handleInstallFree}\n className=\"cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90\"\n >\n Install\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={handleBuyNow}\n disabled={buyingNow || checkingOut}\n className=\"cursor-pointer flex items-center gap-2 rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-70\"\n >\n {buyingNow || checkingOut ? (\n <>\n <Loader2 className=\"size-4 animate-spin\" />\n Processing…\n </>\n ) : (\n `Buy ${getPriceDisplay()}`\n )}\n </button>\n )}\n\n {/* Add to Cart / Wishlist */}\n {!isFree && !isPurchased && (\n <button\n type=\"button\"\n onClick={handleAddToCart}\n disabled={addingToCart}\n className=\"cursor-pointer flex items-center gap-2 rounded-full border border-border-default px-4 py-3 text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50\"\n >\n {addingToCart ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : isInCart ? (\n <Check className=\"size-4 text-status-success-text\" />\n ) : (\n <ShoppingCart className=\"size-4\" />\n )}\n {isInCart ? 'In Cart' : 'Add to Cart'}\n </button>\n )}\n </div>\n\n {/* Info Text */}\n <p className=\"flex items-center gap-2 text-xs text-text-muted\">\n <Package className=\"size-4\" />\n This app is available for your workspace\n </p>\n\n {/* License Status */}\n {userEntitlement && (\n <p className=\"mt-2 flex items-center gap-2 text-xs text-text-muted\">\n <ShieldCheck className=\"size-4 text-status-success-text\" />\n License: {userEntitlement.status}\n {userEntitlement.expiresAt &&\n ` (Expires: ${new Date(userEntitlement.expiresAt).toLocaleDateString()})`}\n </p>\n )}\n </div>\n\n {/* Right Column - Hero Screenshot */}\n <div className=\"relative flex-1 bg-bg-sunken lg:min-h-[500px]\">\n {safeProduct.screenshots && safeProduct.screenshots.length > 0 ? (\n <img\n src={safeProduct.screenshots[0]}\n alt={`${safeProduct.name} screenshot`}\n className=\"size-full object-cover\"\n />\n ) : (\n <div className=\"flex h-full min-h-[300px] items-center justify-center\">\n <div className=\"text-center\">\n <div className=\"mx-auto mb-4 flex size-24 items-center justify-center rounded-2xl bg-bg-surface text-4xl font-bold text-text-muted\">\n {safeProduct.name.charAt(0)}\n </div>\n <p className=\"text-sm text-text-muted\">No preview available</p>\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n\n {/* Main Content Area */}\n <main className=\"mx-auto max-w-7xl px-6 py-8\">\n <div className=\"flex flex-col gap-8 lg:flex-row\">\n {/* Left Content */}\n <div className=\"flex-1 lg:max-w-3xl\">\n {/* Screenshots Gallery */}\n {safeProduct.screenshots && safeProduct.screenshots.length > 1 && (\n <section className=\"mb-8\">\n <div className=\"flex gap-4 overflow-x-auto pb-4\">\n {safeProduct.screenshots.map((screenshot, index) => (\n <div\n key={index}\n className=\"relative h-64 w-96 flex-shrink-0 overflow-hidden rounded-xl bg-bg-sunken\"\n >\n <img\n src={screenshot}\n alt={`Screenshot ${index + 1}`}\n className=\"size-full object-cover\"\n />\n </div>\n ))}\n </div>\n </section>\n )}\n\n {/* About this app */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center justify-between text-left\">\n <h2 className=\"text-lg font-medium text-text-primary\">About this app</h2>\n </div>\n <div className=\"text-sm leading-relaxed text-text-secondary\">\n <p className={!showFullDescription ? 'line-clamp-4' : ''}>\n {safeProduct.longDescription ||\n safeProduct.description ||\n 'No description available.'}\n </p>\n {((safeProduct.longDescription || safeProduct.description)?.length ?? 0) > 200 && (\n <button\n type=\"button\"\n onClick={() => setShowFullDescription(!showFullDescription)}\n className=\"cursor-pointer mt-3 text-sm font-medium text-text-link\"\n >\n {showFullDescription ? 'Show less' : 'Show more'}\n </button>\n )}\n </div>\n {/* Tags */}\n {safeProduct.tags && safeProduct.tags.length > 0 && (\n <div className=\"mt-4 flex flex-wrap gap-2\">\n {safeProduct.tags.map((tag) => (\n <span\n key={tag}\n className=\"rounded-full border border-border-default px-3 py-1.5 text-xs text-text-muted transition-colors hover:bg-bg-sunken\"\n >\n {tag}\n </span>\n ))}\n </div>\n )}\n </section>\n\n {/* Ratings & Reviews */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center justify-between text-left\">\n <h2 className=\"text-lg font-medium text-text-primary\">Ratings & Reviews</h2>\n </div>\n\n <div className=\"rounded-xl border border-border-default bg-bg-surface p-5\">\n {reviews && reviews.length > 0 ? (\n <div className=\"flex items-start gap-8\">\n {/* Rating Score */}\n <div className=\"text-center\">\n <p className=\"text-5xl font-light text-text-primary\">\n {(safeProduct.rating || 0).toFixed(1)}\n </p>\n <div className=\"my-2 flex justify-center gap-0.5\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Star\n key={star}\n className={`size-4 ${\n star <= Math.round(safeProduct.rating || 0)\n ? 'fill-current text-status-warning-text'\n : 'text-text-muted'\n }`}\n />\n ))}\n </div>\n <p className=\"text-sm text-text-muted\">\n {formatNumber(reviewsCount || safeProduct.reviewCount)} reviews\n </p>\n </div>\n\n {/* Rating Distribution */}\n {ratingDistributionData.length > 0 && (\n <div className=\"flex-1 space-y-1.5\">\n {ratingDistributionData.map((item) => (\n <RatingBar key={item.stars} {...item} />\n ))}\n </div>\n )}\n </div>\n ) : (\n <div className=\"flex flex-col items-center justify-center py-6 text-center\">\n <div className=\"mb-3 flex gap-0.5\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Star key={star} className=\"size-5 text-border-default\" />\n ))}\n </div>\n <p className=\"font-medium text-text-primary\">No reviews yet</p>\n <p className=\"mt-1 text-sm text-text-muted\">\n Be the first to share your experience with this app.\n </p>\n </div>\n )}\n\n {/* Write Review */}\n <div className=\"mt-6 border-t border-border-default pt-4\">\n {reviewNotice && (\n <p\n role={reviewNoticeTone === 'success' ? 'status' : 'alert'}\n className={`mb-3 rounded-lg px-3 py-2 text-sm ${\n reviewNoticeTone === 'success'\n ? 'bg-status-success-bg-subtle text-status-success-text'\n : 'bg-status-error-bg-subtle text-status-error-text'\n }`}\n >\n {reviewNotice}\n </p>\n )}\n {isPurchased || productDetails?.userReview ? (\n <div className=\"space-y-4\">\n <button\n type=\"button\"\n onClick={() =>\n isReviewFormOpen ? setIsReviewFormOpen(false) : openReviewForm()\n }\n className=\"w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link\"\n >\n {productDetails?.userReview\n ? isReviewFormOpen\n ? 'Cancel review editing'\n : 'Edit your review'\n : isReviewFormOpen\n ? 'Cancel review'\n : 'Write a Review'}\n </button>\n\n {isReviewFormOpen && (\n <div className=\"rounded-xl border border-border-default bg-bg-sunken p-4\">\n <div>\n <p className=\"text-sm font-medium text-text-primary\">Your rating</p>\n <div className=\"mt-2 flex flex-wrap gap-2\">\n {[1, 2, 3, 4, 5].map((star) => (\n <button\n key={star}\n type=\"button\"\n onClick={() => setReviewRating(star)}\n className={`cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${\n reviewRating === star\n ? 'border-action-primary-border bg-action-primary-bg text-action-primary-text'\n : 'border-border-default bg-bg-surface text-text-primary hover:bg-bg-surface'\n }`}\n >\n {star} ★\n </button>\n ))}\n </div>\n </div>\n\n <label className=\"mt-4 block text-sm font-medium text-text-primary\">\n Title\n <input\n aria-label=\"Review title\"\n value={reviewTitle}\n onChange={(event) => setReviewTitle(event.target.value)}\n className=\"mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border\"\n placeholder=\"Summarize your experience\"\n />\n </label>\n\n <label className=\"mt-4 block text-sm font-medium text-text-primary\">\n Review\n <textarea\n aria-label=\"Review body\"\n value={reviewComment}\n onChange={(event) => setReviewComment(event.target.value)}\n rows={4}\n required\n aria-required=\"true\"\n className=\"mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border\"\n placeholder=\"What worked well? What should improve?\"\n />\n </label>\n\n <div className=\"mt-4 flex flex-wrap gap-3\">\n <button\n type=\"button\"\n onClick={handleSubmitReview}\n disabled={creatingReview || updatingReview}\n className=\"cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60\"\n >\n {creatingReview || updatingReview\n ? 'Saving...'\n : productDetails?.userReview\n ? 'Update Review'\n : 'Submit Review'}\n </button>\n {productDetails?.userReview && (\n <button\n type=\"button\"\n onClick={handleDeleteReview}\n disabled={deletingReview}\n className=\"cursor-pointer rounded-lg border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-60\"\n >\n {deletingReview ? 'Removing...' : 'Delete Review'}\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n ) : (\n <p className=\"text-center text-sm text-text-muted\">\n Purchase this app to submit a review.\n </p>\n )}\n </div>\n </div>\n\n {/* Reviews List */}\n {reviews && reviews.length > 0 && (\n <div className=\"mt-4 space-y-3\">\n <ul className=\"space-y-3\">\n {(showAllReviews ? reviews : reviews.slice(0, 2)).map((review) => (\n <li key={review.id}>\n <ReviewCard\n review={review}\n onMarkHelpful={handleMarkHelpful}\n markingHelpful={markingHelpful && helpfulReviewId === review.id}\n />\n </li>\n ))}\n </ul>\n {reviews.length > 2 && (\n <button\n type=\"button\"\n onClick={() => setShowAllReviews(!showAllReviews)}\n className=\"cursor-pointer text-sm font-medium text-text-link\"\n >\n {showAllReviews ? 'Show less' : `Show all ${reviews.length} reviews`}\n </button>\n )}\n </div>\n )}\n {(!reviews || reviews.length === 0) && (\n <p className=\"mt-4 text-sm text-text-muted\">\n No reviews yet. Be the first to review!\n </p>\n )}\n </section>\n\n {/* Permissions */}\n {permissions.length > 0 && (\n <section className=\"mb-8\">\n <h2 className=\"mb-4 text-lg font-medium text-text-primary\">Required Permissions</h2>\n <div className=\"space-y-2\">\n {permissions.map((permission) => (\n <div\n key={permission}\n className=\"flex items-center gap-3 rounded-lg bg-bg-surface px-4 py-3\"\n >\n <ShieldCheck className=\"size-5 text-status-success-text\" />\n <span className=\"text-sm text-text-primary\">{permission}</span>\n </div>\n ))}\n </div>\n </section>\n )}\n\n {/* Integrations */}\n {integrations.length > 0 && (\n <section className=\"mb-8\">\n <h2 className=\"mb-4 text-lg font-medium text-text-primary\">Integrations</h2>\n <div className=\"flex flex-wrap gap-2\">\n {integrations.map((integration) => (\n <span\n key={integration}\n className=\"rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary\"\n >\n {integration}\n </span>\n ))}\n </div>\n </section>\n )}\n\n {/* Additional Information */}\n <section className=\"mb-8\">\n <h2 className=\"mb-4 text-lg font-medium text-text-primary\">Additional Information</h2>\n <div className=\"grid grid-cols-2 gap-6 md:grid-cols-3\">\n {safeProduct.manifestVersion && (\n <div>\n <p className=\"text-xs text-text-muted\">Version</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {safeProduct.manifestVersion}\n </p>\n </div>\n )}\n <div>\n <p className=\"text-xs text-text-muted\">Type</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">{safeProduct.type}</p>\n </div>\n {safeProduct.publishedAt && (\n <div>\n <p className=\"text-xs text-text-muted\">Published</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {new Date(safeProduct.publishedAt).toLocaleDateString()}\n </p>\n </div>\n )}\n <div>\n <p className=\"text-xs text-text-muted\">Updated</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {new Date(safeProduct.updatedAt).toLocaleDateString()}\n </p>\n </div>\n {safeProduct.license && (\n <div>\n <p className=\"text-xs text-text-muted\">License</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {safeProduct.license}\n </p>\n </div>\n )}\n {safeProduct.minPlatformVersion && (\n <div>\n <p className=\"text-xs text-text-muted\">Min Platform Version</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {safeProduct.minPlatformVersion}\n </p>\n </div>\n )}\n </div>\n </section>\n </div>\n\n {/* Right Sidebar */}\n <div className=\"w-full lg:w-80\">\n {/* App Support */}\n {(safeProduct.documentationUrl || safeProduct.repositoryUrl || publisher?.email) && (\n <div className=\"mb-6 rounded-xl border border-border-default bg-bg-surface p-4\">\n <h3 className=\"font-medium text-text-primary\">App support</h3>\n <div className=\"mt-3 space-y-2 text-sm\">\n {safeProduct.documentationUrl && (\n <a\n href={safeProduct.documentationUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"block text-text-link hover:underline\"\n >\n Documentation\n </a>\n )}\n {safeProduct.repositoryUrl && (\n <a\n href={safeProduct.repositoryUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"block text-text-link hover:underline\"\n >\n Source repository\n </a>\n )}\n {publisher?.email && (\n <a\n href={`mailto:${publisher.email}`}\n className=\"block text-text-link hover:underline\"\n >\n Contact publisher\n </a>\n )}\n </div>\n </div>\n )}\n\n {/* More by Publisher */}\n {publisher && (\n <div className=\"mb-6 rounded-xl border border-border-default bg-bg-surface p-4\">\n <h3 className=\"font-medium text-text-primary\">Publisher</h3>\n <p className=\"mt-2 text-sm text-text-primary\">{publisher.name}</p>\n {publisher.bio && <p className=\"mt-2 text-sm text-text-muted\">{publisher.bio}</p>}\n {publisher.websiteUrl && (\n <a\n href={publisher.websiteUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"mt-3 inline-block text-sm text-text-link hover:underline\"\n >\n Visit publisher website\n </a>\n )}\n </div>\n )}\n\n {/* Similar Apps */}\n {relatedProducts && relatedProducts.length > 0 && (\n <div>\n <div className=\"mb-4 flex items-center justify-between text-left\">\n <span className=\"font-medium text-text-primary\">Similar apps</span>\n </div>\n <div className=\"space-y-3\">\n {relatedProducts.slice(0, 4).map((related) => (\n <button\n type=\"button\"\n key={related.id}\n onClick={() => navigate(`${basePath}/marketplace/product/${related.id}`)}\n className=\"flex w-full cursor-pointer items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-bg-sunken\"\n >\n {related.icon ? (\n <img\n src={related.icon}\n alt={related.name}\n className=\"size-12 rounded-xl object-cover\"\n />\n ) : (\n <div className=\"flex size-12 items-center justify-center rounded-xl bg-bg-sunken text-lg font-bold text-text-muted\">\n {related.name.charAt(0)}\n </div>\n )}\n <div className=\"flex-1 overflow-hidden\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {related.name}\n </p>\n <p className=\"text-xs text-text-muted\">{publisher?.name || 'Unknown'}</p>\n {(related.reviewCount ?? 0) > 0 && (\n <div className=\"flex items-center gap-1\">\n <span className=\"text-xs text-text-muted\">\n {(related.rating || 0).toFixed(1)}\n </span>\n <Star className=\"size-3 fill-current text-status-warning-text\" />\n </div>\n )}\n </div>\n </button>\n ))}\n </div>\n </div>\n )}\n </div>\n </div>\n </main>\n\n {/* Install App Modal */}\n {safeProduct && (\n <InstallAppModal\n isOpen={isInstallModalOpen}\n onClose={() => setIsInstallModalOpen(false)}\n app={{\n id: safeProduct.id,\n name: safeProduct.name,\n slug: safeProduct.slug,\n icon: safeProduct.icon,\n type: safeProduct.type,\n version: safeProduct.manifestVersion,\n }}\n purchaseState={isPurchased && !isFree ? 'purchased' : 'free'}\n onInstallSuccess={handleInstallSuccess}\n onInstallError={handleInstallError}\n />\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAwKA,IAAM,MAAwB,GAA4B,OAkDjD;CACL,IAAI,EAAa;CACjB,aAAa,GAAW,MAAM;CAC9B,WAAW;EACT,IAAI,GAAW,MAAM;EACrB,MAAM,GAAW,QAAQ,EAAa,cAAc;EACpD,aAAa,GAAW,QAAQ,EAAa,cAAc;EAC3D,OAAO,GAAW,SAAS;EAC3B,UAAU,GAAW,cAAc;EACnC,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,UAAU,GAAW,aAAa,EAAa;EAC/C,SAAS,GAAW;EACpB,SAAS,GAAW;EACrB;CACD,MAAM,EAAa;CACnB,MAAM,EAAa,QAAQ,EAAa;CACxC,aAAa,EAAa;CAC1B,aAAa,EAAa,mBAAmB,EAAa,eAAe;CACzE,kBAAkB,EAAa,eAAe;CAC9C,SAAS,EAAa;CACtB,gBAAgB,EAAa,eAAe,EAAE;CAC9C,WAAW,EAAa,aAAa,EAAE;CACvC,YAvCmB,GAAgB,MAC/B,MAAW,aAAmB,aACY;EAC5C,KAAK;EACL,QAAQ;EACR,OAAO;EACP,UAAU;EACV,UAAU;EACV,aAAa;EACb,WAAW;EACX,OAAO;EACR,CACkB,MAAS,OA2BN,EAAa,QAAQ,EAAa,KAAK;CAC7D,QA7DsB,OACuB;EAC3C,KAAK;EACL,QAAQ;EACR,OAAO;EACP,UAAU;EACV,UAAU;EACV,aAAa;EACb,WAAW;EACX,OAAO;EACP,QAAQ;EACR,WAAW;EACX,QAAQ;EACR,YAAY;EACZ,SAAS;EACT,MAAM;EACP,EACc,MAAS,kBA4CH,EAAa,KAAK;CACvC,MAAM,EAAa,QAAQ,EAAE;CAC7B,gBA3EuB,OAC2B;EAChD,MAAM;EACN,cAAc;EAC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OAAD;UACE,KAAK,EAAQ;UACb,KAAK,EAAQ;UACb,WAAU;UACV,CAAA,GAEF,kBAAC,OAAD;UAAK,WAAU;oBACZ,EAAQ,KAAK,OAAO,EAAE;UACnB,CAAA,EAER,kBAAC,OAAD;UAAK,WAAU;oBAAf;WACE,kBAAC,KAAD;YAAG,WAAU;sBACV,EAAQ;YACP,CAAA;WACJ,kBAAC,KAAD;YAAG,WAAU;sBAA2B,GAAW,QAAQ;YAAc,CAAA;YACvE,EAAQ,eAAe,KAAK,KAC5B,kBAAC,OAAD;YAAK,WAAU;sBAAf,CACE,kBAAC,QAAD;aAAM,WAAU;wBACZ,EAAQ,UAAU,GAAG,QAAQ,EAAE;aAC5B,CAAA,EACP,kBAAC,GAAD,EAAM,WAAU,gDAAiD,CAAA,CAC7D;;WAEJ;YACC;WA7BF,EAAQ,GA6BN,CACT;QACE,CAAA,CACF,EAAA,CAAA;OAEJ;QACF;;IACD,CAAA;GAGN,KACC,kBAAC,IAAD;IACE,QAAQ;IACR,eAAe,EAAsB,GAAM;IAC3C,KAAK;KACH,IAAI,EAAY;KAChB,MAAM,EAAY;KAClB,MAAM,EAAY;KAClB,MAAM,EAAY;KAClB,MAAM,EAAY;KAClB,SAAS,EAAY;KACtB;IACD,eAAe,KAAe,CAAC,IAAS,cAAc;IACtD,kBAAkB;IAClB,gBAAgB;IAChB,CAAA;GAEA"}
1
+ {"version":3,"file":"ProductDetailPage.js","names":[],"sources":["../../src/pages/ProductDetailPage.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useState, useCallback, useEffect, useRef, useMemo } from 'react';\nimport { useParams, useNavigate, useLocation } from 'react-router-dom';\nimport { useEventBus } from '@burdenoff/fe-libs/shared/events';\nimport {\n ArrowLeft,\n Star,\n ShieldCheck,\n Check,\n ThumbsUp,\n Package,\n AlertCircle,\n ShoppingCart,\n Loader2,\n} from 'lucide-react';\nimport { useStore } from '../providers/StoreProvider';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../utils/nativeBridge';\nimport {\n useCreateReview,\n useDeleteReview,\n useMarkReviewHelpful,\n useStoreProductDetails,\n useUpdateReview,\n} from '../hooks/useStoreGraphQL';\nimport { useCart } from '../hooks/useCart';\nimport { useInstallations } from '../hooks/useInstallations';\nimport { formatNumber, formatPrice } from '../utils';\nimport { InstallAppModal } from '../components/InstallAppModal';\nimport type {\n Product,\n ItemType,\n ProductType,\n PricingModel as CartPricingModel,\n ProductStatus,\n} from '../types';\n\n// ============================================================================\n// Type Definitions for GraphQL Response\n// ============================================================================\n\ninterface Publisher {\n id: string;\n userId?: string;\n name: string;\n email?: string;\n websiteUrl?: string;\n logoUrl?: string;\n bio?: string;\n isVerified: boolean;\n totalSales?: number;\n totalEarnings?: number;\n createdAt?: string;\n}\n\ninterface ProductReview {\n id: string;\n productId: string;\n userId: string;\n rating: number;\n title?: string;\n comment?: string;\n status: string;\n helpful: number;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface RelatedProduct {\n id: string;\n name: string;\n slug?: string;\n icon?: string;\n type: string;\n price: number;\n pricingModel: string;\n rating?: number;\n reviewCount?: number;\n downloads: number;\n publisher?: {\n id: string;\n name: string;\n isVerified: boolean;\n };\n}\n\ninterface RatingDistribution {\n fiveStars: number;\n fourStars: number;\n threeStars: number;\n twoStars: number;\n oneStar: number;\n}\n\ninterface UserEntitlement {\n id: string;\n status: string;\n licenseKey?: string;\n expiresAt?: string;\n}\n\ninterface StoreProduct {\n id: string;\n name: string;\n slug?: string;\n type: string;\n nature: string;\n status: string;\n description?: string;\n longDescription?: string;\n pricingModel: string;\n price: number;\n currency: string;\n icon?: string;\n screenshots: string[];\n videoUrls?: string[];\n documentationUrl?: string;\n repositoryUrl?: string;\n category?: string;\n tags?: string[];\n featured: boolean;\n zipFileUrl?: string;\n downloads: number;\n viewCount?: number;\n rating?: number;\n reviewCount: number;\n publishedAt?: string;\n createdAt: string;\n updatedAt: string;\n // Manifest fields\n subType?: string;\n manifestVersion?: string;\n authorName?: string;\n license?: string;\n minPlatformVersion?: string;\n compatibleProducts?: string[];\n requiredPermissions?: string[];\n integrationDeps?: string[];\n // Physical product fields\n sku?: string;\n stockQuantity?: number;\n trackInventory?: boolean;\n requiresShipping?: boolean;\n weight?: number;\n weightUnit?: string;\n brand?: string;\n manifest?: Record<string, unknown>;\n publisher?: Publisher;\n}\n\ninterface StoreProductDetailsResponse {\n product: StoreProduct;\n publisher: Publisher;\n reviews: ProductReview[];\n reviewsCount: number;\n relatedProducts: RelatedProduct[];\n userReview?: ProductReview;\n isPurchased: boolean;\n userEntitlement?: UserEntitlement;\n ratingDistribution?: RatingDistribution;\n}\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\n/**\n * Convert StoreProduct (GraphQL) to Product (Cart) type\n */\nconst convertToCartProduct = (storeProduct: StoreProduct, publisher?: Publisher): Product => {\n // Map GraphQL pricing model to cart pricing model\n const mapPricingModel = (model: string): CartPricingModel => {\n const mapping: Record<string, CartPricingModel> = {\n FREE: 'FREE',\n PAID_ONETIME: 'ONE_TIME',\n SUBSCRIPTION: 'SUBSCRIPTION',\n USAGE_BASED: 'USAGE_BASED',\n FREEMIUM: 'FREEMIUM',\n };\n return mapping[model] || 'ONE_TIME';\n };\n\n // Map product type\n const mapProductType = (type: string): ProductType => {\n const mapping: Record<string, ProductType> = {\n APP: 'STANDALONE_APP',\n BOTAPP: 'STANDALONE_APP',\n AGENT: 'STANDALONE_APP',\n WORKFLOW: 'WORKFLOW_TEMPLATE',\n TEMPLATE: 'WORKFLOW_TEMPLATE',\n INTEGRATION: 'API_INTEGRATION',\n EXTENSION: 'BROWSER_EXTENSION',\n THEME: 'UI_THEME',\n PLUGIN: 'WORKSPACE_MODULE',\n COMPONENT: 'WORKSPACE_MODULE',\n WIDGET: 'WORKSPACE_MODULE',\n VIBEMODULE: 'WORKSPACE_MODULE',\n CONSOLE: 'STANDALONE_APP',\n NODE: 'WORKSPACE_MODULE',\n };\n return mapping[type] || 'STANDALONE_APP';\n };\n\n // Map item type\n const mapItemType = (nature: string, type: string): ItemType => {\n if (nature === 'PHYSICAL') return 'PHYSICAL';\n const typeMapping: Record<string, ItemType> = {\n APP: 'APP',\n BOTAPP: 'APP',\n AGENT: 'APP',\n WORKFLOW: 'WORKFLOW',\n TEMPLATE: 'TEMPLATE',\n INTEGRATION: 'INTEGRATION',\n EXTENSION: 'EXTENSION',\n THEME: 'THEME',\n };\n return typeMapping[type] || 'APP';\n };\n\n return {\n id: storeProduct.id,\n publisherId: publisher?.id || '',\n publisher: {\n id: publisher?.id || '',\n name: publisher?.name || storeProduct.authorName || 'Unknown',\n displayName: publisher?.name || storeProduct.authorName || 'Unknown',\n email: publisher?.email || '',\n verified: publisher?.isVerified || false,\n totalProducts: 0,\n totalDownloads: 0,\n averageRating: 0,\n joinedAt: publisher?.createdAt || storeProduct.createdAt,\n website: publisher?.websiteUrl,\n logoUrl: publisher?.logoUrl,\n },\n name: storeProduct.name,\n slug: storeProduct.slug || storeProduct.id,\n displayName: storeProduct.name,\n description: storeProduct.longDescription || storeProduct.description || '',\n shortDescription: storeProduct.description || '',\n iconUrl: storeProduct.icon,\n screenshotUrls: storeProduct.screenshots || [],\n videoUrls: storeProduct.videoUrls || [],\n itemType: mapItemType(storeProduct.nature, storeProduct.type),\n type: mapProductType(storeProduct.type),\n tags: storeProduct.tags || [],\n pricingModel: mapPricingModel(storeProduct.pricingModel),\n basePrice: storeProduct.price,\n currency: storeProduct.currency || 'USD',\n variants: [],\n status: (storeProduct.status as ProductStatus) || 'PUBLISHED',\n featured: storeProduct.featured,\n verified: publisher?.isVerified || false,\n downloadCount: storeProduct.downloads,\n installCount: storeProduct.downloads,\n orderCount: 0,\n averageRating: storeProduct.rating || 0,\n reviewCount: storeProduct.reviewCount,\n createdAt: storeProduct.createdAt,\n updatedAt: storeProduct.updatedAt,\n publishedAt: storeProduct.publishedAt,\n };\n};\n\n// ============================================================================\n// Helper Components\n// ============================================================================\n\n/**\n * Rating bar component for rating distribution\n */\nconst RatingBar: FC<{ stars: number; percentage: number; count: number }> = ({\n stars,\n percentage,\n count,\n}) => (\n <div className=\"flex items-center gap-2\">\n <span className=\"w-3 text-xs text-text-muted\">{stars}</span>\n <div className=\"h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken\">\n <div\n className=\"h-full rounded-full bg-status-warning-bg-subtle\"\n style={{ width: `${percentage}%` }}\n />\n </div>\n <span className=\"w-12 text-right text-xs text-text-muted\">{formatNumber(count)}</span>\n </div>\n);\n\n/**\n * Review card component\n */\nconst ReviewCard: FC<{\n review: ProductReview;\n onMarkHelpful: (reviewId: string) => void;\n markingHelpful: boolean;\n}> = ({ review, onMarkHelpful, markingHelpful }) => {\n const formatDate = (dateString: string) => {\n try {\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n });\n } catch {\n return dateString;\n }\n };\n\n return (\n <div className=\"rounded-lg border border-border-default bg-bg-surface p-4\">\n <div className=\"mb-3 flex items-start justify-between\">\n <div className=\"flex items-center gap-3\">\n <div className=\"flex size-10 items-center justify-center rounded-full bg-bg-sunken text-text-muted\">\n {review.userId.charAt(0).toUpperCase()}\n </div>\n <div>\n <p className=\"font-medium text-text-primary\">User {review.userId.slice(0, 8)}</p>\n <div className=\"flex items-center gap-2\">\n <div className=\"flex gap-0.5\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Star\n key={star}\n className={`size-3 ${\n star <= review.rating\n ? 'fill-current text-status-warning-text'\n : 'text-text-muted'\n }`}\n />\n ))}\n </div>\n <span className=\"text-xs text-text-muted\">{formatDate(review.createdAt)}</span>\n </div>\n </div>\n </div>\n </div>\n {review.title && <h4 className=\"mb-2 font-medium text-text-primary\">{review.title}</h4>}\n {review.comment && <p className=\"mb-3 text-sm text-text-muted\">{review.comment}</p>}\n <div className=\"flex items-center justify-between\">\n <button\n type=\"button\"\n onClick={() => onMarkHelpful(review.id)}\n disabled={markingHelpful}\n aria-label={`Mark review from ${review.userId} as helpful`}\n className=\"flex items-center gap-1 text-xs text-text-muted transition-colors hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-60\"\n >\n <ThumbsUp className=\"size-3.5\" />\n <span>{markingHelpful ? 'Updating…' : `Helpful (${review.helpful})`}</span>\n </button>\n </div>\n </div>\n );\n};\n\n/**\n * Loading skeleton component - comprehensive skeleton matching full page layout\n */\nconst LoadingSkeleton: FC = () => (\n <div className=\"h-full overflow-y-auto\">\n {/* Header Skeleton */}\n <div className=\"sticky top-0 z-10 border-b border-border-default bg-bg-surface px-6 py-4\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-10 animate-pulse rounded-lg bg-bg-sunken\" />\n <div className=\"h-6 w-48 flex-1 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"flex gap-2\">\n <div className=\"size-10 animate-pulse rounded-lg bg-bg-sunken\" />\n <div className=\"size-10 animate-pulse rounded-lg bg-bg-sunken\" />\n </div>\n </div>\n </div>\n\n <div className=\"mx-auto max-w-6xl p-6\">\n {/* App Header Section Skeleton */}\n <div className=\"mb-8 flex flex-col gap-6 md:flex-row\">\n {/* App Icon & Basic Info */}\n <div className=\"flex gap-4 md:w-1/2\">\n <div className=\"size-28 animate-pulse rounded-2xl bg-bg-sunken\" />\n <div className=\"flex flex-1 flex-col justify-center gap-2\">\n <div className=\"h-8 w-3/4 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"flex items-center gap-2\">\n <div className=\"h-4 w-32 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"size-4 animate-pulse rounded-full bg-bg-sunken\" />\n </div>\n <div className=\"flex gap-3\">\n <div className=\"h-5 w-16 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-5 w-24 animate-pulse rounded bg-bg-sunken\" />\n </div>\n </div>\n </div>\n\n {/* Rating & Install Skeleton */}\n <div className=\"flex flex-col gap-4 md:w-1/2 md:items-end\">\n <div className=\"flex items-center gap-4\">\n <div className=\"text-center\">\n <div className=\"h-10 w-16 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-3 w-20 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"h-12 w-px bg-border-default\" />\n <div className=\"text-center\">\n <div className=\"h-8 w-16 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-3 w-16 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"h-12 w-px bg-border-default\" />\n <div className=\"text-center\">\n <div className=\"h-8 w-20 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-3 w-12 animate-pulse rounded bg-bg-sunken\" />\n </div>\n </div>\n <div className=\"flex gap-3\">\n <div className=\"h-12 w-40 animate-pulse rounded-lg bg-bg-sunken\" />\n <div className=\"size-12 animate-pulse rounded-lg bg-bg-sunken\" />\n </div>\n </div>\n </div>\n\n {/* Screenshots Skeleton */}\n <section className=\"mb-8\">\n <div className=\"aspect-video animate-pulse rounded-lg bg-bg-sunken\" />\n <div className=\"mt-4 flex gap-4\">\n {[...Array(4)].map((_, i) => (\n <div key={i} className=\"h-20 w-36 animate-pulse rounded-lg bg-bg-sunken\" />\n ))}\n </div>\n </section>\n\n {/* About Section Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center gap-2\">\n <div className=\"size-5 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-6 w-32 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4\">\n <div className=\"space-y-2\">\n <div className=\"h-4 w-full rounded bg-bg-sunken\" />\n <div className=\"h-4 w-full rounded bg-bg-sunken\" />\n <div className=\"h-4 w-3/4 rounded bg-bg-sunken\" />\n <div className=\"h-4 w-5/6 rounded bg-bg-sunken\" />\n </div>\n <div className=\"mt-4 flex gap-2\">\n {[...Array(4)].map((_, i) => (\n <div key={i} className=\"h-6 w-16 rounded-full bg-bg-sunken\" />\n ))}\n </div>\n </div>\n </section>\n\n {/* Ratings & Reviews Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <div className=\"size-5 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-6 w-40 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"h-4 w-16 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"mb-6 flex flex-col gap-6 md:flex-row\">\n <div className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4 md:w-64\">\n <div className=\"flex items-center gap-6\">\n <div className=\"text-center\">\n <div className=\"h-12 w-16 rounded bg-bg-sunken\" />\n <div className=\"my-1 flex justify-center gap-0.5\">\n {[...Array(5)].map((_, i) => (\n <div key={i} className=\"size-4 rounded bg-bg-sunken\" />\n ))}\n </div>\n <div className=\"h-3 w-20 rounded bg-bg-sunken\" />\n </div>\n <div className=\"flex-1 space-y-1\">\n {[...Array(5)].map((_, i) => (\n <div key={i} className=\"flex items-center gap-2\">\n <div className=\"h-2 w-3 rounded bg-bg-sunken\" />\n <div className=\"h-2 flex-1 rounded-full bg-bg-sunken\" />\n <div className=\"h-2 w-8 rounded bg-bg-sunken\" />\n </div>\n ))}\n </div>\n </div>\n </div>\n <div className=\"h-12 w-32 animate-pulse rounded-lg bg-bg-sunken\" />\n </div>\n {/* Review Cards Skeleton */}\n <div className=\"space-y-4\">\n {[...Array(2)].map((_, i) => (\n <div\n key={i}\n className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4\"\n >\n <div className=\"mb-3 flex items-start gap-3\">\n <div className=\"size-10 rounded-full bg-bg-sunken\" />\n <div className=\"flex-1\">\n <div className=\"h-4 w-32 rounded bg-bg-sunken\" />\n <div className=\"mt-1 flex items-center gap-2\">\n <div className=\"flex gap-0.5\">\n {[...Array(5)].map((_, j) => (\n <div key={j} className=\"size-3 rounded bg-bg-sunken\" />\n ))}\n </div>\n <div className=\"h-3 w-20 rounded bg-bg-sunken\" />\n </div>\n </div>\n </div>\n <div className=\"space-y-2\">\n <div className=\"h-4 w-full rounded bg-bg-sunken\" />\n <div className=\"h-4 w-2/3 rounded bg-bg-sunken\" />\n </div>\n </div>\n ))}\n </div>\n </section>\n\n {/* Additional Info Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center gap-2\">\n <div className=\"size-5 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-6 w-48 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4\">\n <div className=\"grid gap-4 md:grid-cols-2\">\n {[...Array(6)].map((_, i) => (\n <div key={i}>\n <div className=\"h-3 w-16 rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-5 w-24 rounded bg-bg-sunken\" />\n </div>\n ))}\n </div>\n </div>\n </section>\n\n {/* Related Products Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <div className=\"size-5 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"h-6 w-40 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"h-4 w-16 animate-pulse rounded bg-bg-sunken\" />\n </div>\n <div className=\"grid gap-4 md:grid-cols-4\">\n {[...Array(4)].map((_, i) => (\n <div\n key={i}\n className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-3\"\n >\n <div className=\"flex items-center gap-3\">\n <div className=\"size-14 rounded-xl bg-bg-sunken\" />\n <div className=\"flex-1\">\n <div className=\"h-4 w-24 rounded bg-bg-sunken\" />\n <div className=\"mt-1 h-3 w-16 rounded bg-bg-sunken\" />\n <div className=\"mt-1 flex items-center gap-2\">\n <div className=\"h-3 w-8 rounded bg-bg-sunken\" />\n <div className=\"h-3 w-12 rounded bg-bg-sunken\" />\n </div>\n </div>\n </div>\n </div>\n ))}\n </div>\n </section>\n\n {/* Publisher Skeleton */}\n <section className=\"mb-8\">\n <div className=\"mb-4 h-6 w-36 animate-pulse rounded bg-bg-sunken\" />\n <div className=\"animate-pulse rounded-lg border border-border-default bg-bg-surface p-4\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-12 rounded-lg bg-bg-sunken\" />\n <div>\n <div className=\"flex items-center gap-2\">\n <div className=\"h-5 w-32 rounded bg-bg-sunken\" />\n <div className=\"size-4 rounded-full bg-bg-sunken\" />\n </div>\n <div className=\"mt-1 h-4 w-40 rounded bg-bg-sunken\" />\n </div>\n </div>\n <div className=\"mt-3 space-y-2\">\n <div className=\"h-4 w-full rounded bg-bg-sunken\" />\n <div className=\"h-4 w-2/3 rounded bg-bg-sunken\" />\n </div>\n </div>\n </section>\n </div>\n </div>\n);\n\n/**\n * Error display component\n */\nconst ErrorDisplay: FC<{ error: Error; onRetry: () => void; onBack: () => void }> = ({\n error,\n onRetry,\n onBack,\n}) => (\n <div className=\"flex h-full items-center justify-center\">\n <div className=\"text-center\">\n <AlertCircle className=\"mx-auto mb-4 size-12 text-status-error-text\" />\n <h2 className=\"mb-2 text-xl font-semibold text-text-primary\">Failed to load product</h2>\n <p className=\"mb-4 text-text-muted\">\n {error.message || 'An error occurred while loading the product details.'}\n </p>\n <div className=\"flex justify-center gap-3\">\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90\"\n >\n Try Again\n </button>\n <button\n type=\"button\"\n onClick={onBack}\n className=\"rounded-lg border border-border-default px-4 py-2 text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n Go Back\n </button>\n </div>\n </div>\n </div>\n);\n\n// ============================================================================\n// Main Component\n// ============================================================================\n\n/**\n * Product Detail Page Component\n *\n * Displays comprehensive product details using real GraphQL data\n */\nexport const ProductDetailPage: FC = () => {\n const { productId } = useParams<{ productId: string }>();\n const navigate = useNavigate();\n const location = useLocation();\n const { basePath, workspaceId } = useStore();\n const { addProduct, cartItems, addingToCart, createOrder, checkingOut } = useCart();\n const installationsFilter = useMemo(\n () => (productId && workspaceId ? { productId, workspaceId } : undefined),\n [productId, workspaceId]\n );\n const { installations: myInstallations, refetch: refetchInstallations } = useInstallations({\n filter: installationsFilter,\n limit: 1,\n });\n const isInstalledInCurrentWorkspace = myInstallations.some(\n (i) => i.productId === productId && i.workspaceId === workspaceId && i.status === 'ACTIVE'\n );\n const { createReview, loading: creatingReview } = useCreateReview();\n const { updateReview, loading: updatingReview } = useUpdateReview();\n const { deleteReview, loading: deletingReview } = useDeleteReview();\n const { markHelpful, loading: markingHelpful } = useMarkReviewHelpful();\n const bus = useEventBus();\n\n const [showFullDescription, setShowFullDescription] = useState(false);\n const [showAllReviews, setShowAllReviews] = useState(false);\n const [buyingNow, setBuyingNow] = useState(false);\n const [actionError, setActionError] = useState<string | null>(null);\n const [reviewNotice, setReviewNotice] = useState<string | null>(null);\n const [reviewNoticeTone, setReviewNoticeTone] = useState<'success' | 'error'>('success');\n const [isReviewFormOpen, setIsReviewFormOpen] = useState(false);\n const [reviewTitle, setReviewTitle] = useState('');\n const [reviewComment, setReviewComment] = useState('');\n const [reviewRating, setReviewRating] = useState(5);\n const [helpfulReviewId, setHelpfulReviewId] = useState<string | null>(null);\n\n // Install modal state\n const [isInstallModalOpen, setIsInstallModalOpen] = useState(false);\n\n // Fetch product details using GraphQL\n const { data, loading, error, refetch } = useStoreProductDetails({\n id: productId,\n slug: productId, // Also try as slug\n includeReviews: true,\n reviewsLimit: 10,\n includeRelated: true,\n relatedLimit: 4,\n includeVersions: true,\n });\n\n // Cast data to typed response\n const productDetails = data as StoreProductDetailsResponse | null;\n const product = productDetails?.product;\n const publisher = productDetails?.publisher;\n\n // Check if product is already in cart (must be before any early returns)\n const isInCart = cartItems.some((item) => item.productId === product?.id);\n\n // Handle Add to Cart (must be before any early returns)\n const handleAddToCart = useCallback(async () => {\n if (!product) return;\n\n setActionError(null);\n\n if (isInCart) {\n navigate(`${basePath}/cart`);\n return;\n }\n\n try {\n const cartProduct = convertToCartProduct(product, publisher);\n // Add to backend cart via GraphQL API call\n // This will make a mutation to global-public-gateway:4004 → tenantmodule-store-svc:4017\n await addProduct(cartProduct, undefined, 1);\n // Cart drawer will open automatically after adding\n } catch (error) {\n console.error('Failed to add product to cart:', error);\n setActionError('Failed to add this product to cart. Please try again.');\n }\n }, [product, publisher, addProduct, isInCart, navigate, basePath]);\n\n // Handle Buy Now - creates an order and immediately proceeds to checkout\n const handleBuyNow = useCallback(async () => {\n if (!product) return;\n\n setActionError(null);\n setBuyingNow(true);\n\n try {\n // Get product price\n const price = product.price || 0;\n\n // Build line item for this product\n const lineItem = {\n productId: product.id,\n name: product.name,\n quantity: 1,\n unitPrice: price,\n subtotal: price,\n itemType: product.nature?.toLowerCase() || 'digital',\n pricingModel: product.pricingModel || 'PAID_ONETIME',\n };\n\n // Create order input\n const orderInput = {\n total: price,\n lineItems: [lineItem],\n billingAccountId: '', // Will be set on billing page\n };\n\n // Call createStoreOrder mutation to create PENDING order\n const order = await createOrder(orderInput);\n\n if (order?.id) {\n // Navigate to billing page, preserving org/workspace/tenant context params\n navigate(`/billing/checkout/store/${order.id}${location.search}`);\n } else {\n console.error('Failed to create order');\n setActionError('Failed to create order. Please try again.');\n setBuyingNow(false);\n }\n } catch (error) {\n console.error('Buy Now error:', error);\n const message = error instanceof Error ? error.message : 'Failed to start checkout';\n setActionError(message);\n setBuyingNow(false);\n }\n }, [product, createOrder, navigate]);\n\n // Handle Install Free - Open modal for workspace selection (must be before any early returns)\n const handleInstallFree = useCallback(() => {\n if (!product) return;\n setIsInstallModalOpen(true);\n }, [product]);\n\n // Emit product.viewed event once product data loads. Read product via ref so\n // we only emit on id transitions, not on every field change.\n const productRef = useRef(product);\n productRef.current = product;\n const busRef = useRef(bus);\n busRef.current = bus;\n useEffect(() => {\n const p = productRef.current;\n if (!p) return;\n (busRef.current as unknown as { emit: (name: string, payload: unknown) => void }).emit(\n 'store.product.viewed',\n {\n productId: p.id,\n productSlug: p.slug,\n productType: p.type,\n pricingModel: p.pricingModel,\n }\n );\n }, [product?.id]);\n\n // Handle successful installation (must be before any early returns)\n const handleInstallSuccess = useCallback(\n (workspaceId: string, workspaceName: string) => {\n if (!product) return;\n (bus as unknown as { emit: (name: string, payload: unknown) => void }).emit(\n 'store.product.installed',\n {\n productId: product.id,\n workspaceId,\n }\n );\n console.log(\n `Successfully installed ${product.name} to workspace ${workspaceName} (${workspaceId})`\n );\n void refetchInstallations();\n },\n [product, bus, refetchInstallations]\n );\n\n // Handle installation error (must be before any early returns)\n const handleInstallError = useCallback((error: Error) => {\n console.error('Installation failed:', error.message);\n // Error is shown in the modal\n }, []);\n\n const openReviewForm = useCallback(() => {\n setReviewTitle(productDetails?.userReview?.title ?? '');\n setReviewComment(productDetails?.userReview?.comment ?? '');\n setReviewRating(productDetails?.userReview?.rating ?? 5);\n setReviewNotice(null);\n setReviewNoticeTone('success');\n setIsReviewFormOpen(true);\n }, [productDetails?.userReview]);\n\n const handleSubmitReview = useCallback(async () => {\n if (!product) {\n return;\n }\n\n if (reviewRating < 1 || reviewRating > 5) {\n setReviewNoticeTone('error');\n setReviewNotice('Choose a rating from 1 to 5 stars.');\n return;\n }\n\n const payload = {\n productId: product.id,\n rating: reviewRating,\n title: reviewTitle.trim() || undefined,\n comment: reviewComment.trim() || undefined,\n };\n\n const result = productDetails?.userReview\n ? await updateReview(productDetails.userReview.id, {\n rating: payload.rating,\n title: payload.title,\n comment: payload.comment,\n })\n : await createReview(payload);\n\n if (!result) {\n setReviewNoticeTone('error');\n setReviewNotice('We could not save your review. Please try again.');\n return;\n }\n\n setReviewNoticeTone('success');\n setReviewNotice(\n productDetails?.userReview ? 'Your review was updated.' : 'Your review was submitted.'\n );\n setIsReviewFormOpen(false);\n (bus as unknown as { emit: (name: string, payload: unknown) => void }).emit(\n 'store.review.submitted',\n {\n productId: product.id,\n rating: reviewRating,\n }\n );\n await refetch();\n }, [\n bus,\n createReview,\n product,\n productDetails?.userReview,\n refetch,\n reviewComment,\n reviewRating,\n reviewTitle,\n updateReview,\n ]);\n\n const handleDeleteReview = useCallback(async () => {\n if (!productDetails?.userReview) {\n return;\n }\n void nativeImpact('medium');\n const confirmed = await nativeConfirm({\n title: 'Delete review',\n message: 'Are you sure you want to remove your review?',\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n if (confirmed === false) {\n return;\n }\n\n const deleted = await deleteReview(productDetails.userReview.id);\n if (!deleted) {\n setReviewNoticeTone('error');\n setReviewNotice('We could not remove your review. Please try again.');\n void nativeNotify('error');\n return;\n }\n\n setReviewNoticeTone('success');\n setReviewNotice('Your review was removed.');\n setIsReviewFormOpen(false);\n setReviewTitle('');\n setReviewComment('');\n setReviewRating(5);\n void nativeNotify('success');\n await refetch();\n }, [deleteReview, productDetails?.userReview, refetch]);\n\n const handleMarkHelpful = useCallback(\n async (reviewId: string) => {\n setHelpfulReviewId(reviewId);\n const result = await markHelpful(reviewId);\n if (result) {\n await refetch();\n }\n setHelpfulReviewId(null);\n },\n [markHelpful, refetch]\n );\n\n // Handle loading state\n if (loading) {\n return <LoadingSkeleton />;\n }\n\n // Handle error state\n if (error) {\n return (\n <ErrorDisplay\n error={error}\n onRetry={refetch}\n onBack={() => navigate(`${basePath}/marketplace`)}\n />\n );\n }\n\n // Handle not found state\n if (!productDetails?.product) {\n return (\n <div className=\"flex h-full items-center justify-center\">\n <div className=\"text-center\">\n <h2 className=\"mb-2 text-xl font-semibold text-text-primary\">Product not found</h2>\n <p className=\"mb-4 text-text-muted\">\n The product you are looking for does not exist or has been removed.\n </p>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/marketplace`)}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90\"\n >\n Back to Marketplace\n </button>\n </div>\n </div>\n );\n }\n\n const {\n reviews,\n reviewsCount,\n relatedProducts,\n ratingDistribution,\n isPurchased,\n userEntitlement,\n } = productDetails;\n\n // Type assertion: we know product is defined because we checked !productDetails?.product above\n const safeProduct = product!;\n\n // Calculate rating distribution percentages\n const totalRatings = ratingDistribution\n ? ratingDistribution.fiveStars +\n ratingDistribution.fourStars +\n ratingDistribution.threeStars +\n ratingDistribution.twoStars +\n ratingDistribution.oneStar\n : 0;\n\n const ratingDistributionData = ratingDistribution\n ? [\n {\n stars: 5,\n count: ratingDistribution.fiveStars,\n percentage: totalRatings > 0 ? (ratingDistribution.fiveStars / totalRatings) * 100 : 0,\n },\n {\n stars: 4,\n count: ratingDistribution.fourStars,\n percentage: totalRatings > 0 ? (ratingDistribution.fourStars / totalRatings) * 100 : 0,\n },\n {\n stars: 3,\n count: ratingDistribution.threeStars,\n percentage: totalRatings > 0 ? (ratingDistribution.threeStars / totalRatings) * 100 : 0,\n },\n {\n stars: 2,\n count: ratingDistribution.twoStars,\n percentage: totalRatings > 0 ? (ratingDistribution.twoStars / totalRatings) * 100 : 0,\n },\n {\n stars: 1,\n count: ratingDistribution.oneStar,\n percentage: totalRatings > 0 ? (ratingDistribution.oneStar / totalRatings) * 100 : 0,\n },\n ]\n : [];\n\n // Parse permissions from manifest or requiredPermissions\n // Filter out mis-serialized \"[object Object]\" strings that can occur if\n // the publish pipeline stores permission objects before they are stringified.\n const permissions = (safeProduct.requiredPermissions || []).filter(\n (p) => p && p !== '[object Object]',\n );\n\n // Parse integrations from integrationDeps\n const integrations = safeProduct.integrationDeps || [];\n\n // Pricing display\n const getPriceDisplay = () => {\n if (safeProduct.pricingModel === 'FREE') return 'Free';\n if (safeProduct.pricingModel === 'SUBSCRIPTION') {\n return `${formatPrice(safeProduct.price, safeProduct.currency)}/mo`;\n }\n return formatPrice(safeProduct.price, safeProduct.currency);\n };\n\n // Check if product is free\n const isFree = safeProduct.pricingModel === 'FREE' || safeProduct.price === 0;\n\n return (\n <div className=\"h-full overflow-y-auto bg-bg-base\">\n {/* Hero Section - Two Column Layout */}\n <div className=\"relative bg-bg-surface\">\n <div className=\"mx-auto max-w-7xl\">\n <div className=\"flex flex-col lg:flex-row\">\n {/* Left Column - Product Info */}\n <div className=\"flex-1 px-6 py-8 lg:max-w-xl lg:py-12\">\n {/* Back Button */}\n <button\n type=\"button\"\n onClick={() => navigate(-1)}\n className=\"mb-6 cursor-pointer inline-flex items-center gap-2 text-sm text-text-muted transition-colors hover:text-text-primary\"\n >\n <ArrowLeft className=\"size-4\" />\n Back\n </button>\n\n {/* App Title - Large Typography */}\n <h1 className=\"mb-4 text-4xl font-normal leading-tight text-text-primary lg:text-5xl\">\n {safeProduct.name}\n </h1>\n\n {/* Publisher */}\n <div className=\"mb-2\">\n {publisher?.websiteUrl ? (\n <a\n href={publisher.websiteUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"text-base font-medium text-text-link hover:underline\"\n >\n {publisher.name}\n </a>\n ) : (\n <span className=\"text-base font-medium text-text-primary\">\n {publisher?.name || safeProduct.authorName || 'Unknown Publisher'}\n </span>\n )}\n {publisher?.isVerified && (\n <ShieldCheck className=\"ml-1.5 inline size-4 text-status-success-text\" />\n )}\n </div>\n\n {/* Metadata */}\n <p className=\"mb-6 text-sm text-text-muted\">\n {safeProduct.category && <span>{safeProduct.category}</span>}\n {safeProduct.category && ' · '}\n {formatNumber(safeProduct.downloads)}+ downloads\n </p>\n\n {/* Stats Row */}\n <div className=\"mb-6 flex items-center gap-4\">\n {/* App Icon Badge */}\n <div className=\"flex size-12 items-center justify-center overflow-hidden rounded-xl bg-bg-sunken\">\n {safeProduct.icon ? (\n <img src={safeProduct.icon} alt=\"\" className=\"size-full object-cover\" />\n ) : (\n <span className=\"text-lg font-bold text-text-muted\">\n {safeProduct.name.charAt(0)}\n </span>\n )}\n </div>\n\n {/* Rating */}\n <div className=\"flex items-center gap-1 border-l border-border-default pl-4\">\n <span className=\"text-sm font-medium text-text-primary\">\n {(safeProduct.rating || 0).toFixed(1)}\n </span>\n <Star className=\"size-4 fill-current text-status-warning-text\" />\n <span className=\"ml-1 text-xs text-text-muted\">\n {formatNumber(reviewsCount || safeProduct.reviewCount)} reviews\n </span>\n </div>\n\n {/* Downloads */}\n <div className=\"border-l border-border-default pl-4\">\n <span className=\"text-sm font-medium text-text-primary\">\n {formatNumber(safeProduct.downloads)}+\n </span>\n <p className=\"text-xs text-text-muted\">Downloads</p>\n </div>\n\n {/* Type Badge */}\n <div className=\"border-l border-border-default pl-4\">\n <span className=\"rounded bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary\">\n {safeProduct.type}\n </span>\n <p className=\"mt-0.5 text-xs text-text-muted\">Type</p>\n </div>\n </div>\n\n {/* Action Buttons Row */}\n {actionError && (\n <div\n role=\"alert\"\n className=\"mb-4 rounded-lg border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text\"\n >\n {actionError}\n </div>\n )}\n\n <div className=\"mb-6 flex items-center gap-3\">\n {isInstalledInCurrentWorkspace ? (\n <button\n type=\"button\"\n disabled\n className=\"flex items-center gap-2 rounded-full bg-status-success-bg-subtle px-8 py-3 font-medium text-status-success-text cursor-default\"\n >\n <svg\n className=\"size-4\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"2,8 6,12 14,4\" />\n </svg>\n Installed\n </button>\n ) : isPurchased && !isFree ? (\n <button\n type=\"button\"\n onClick={handleInstallFree}\n className=\"cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90\"\n >\n Install to Workspace\n </button>\n ) : isFree ? (\n <button\n type=\"button\"\n onClick={handleInstallFree}\n className=\"cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90\"\n >\n Install\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={handleBuyNow}\n disabled={buyingNow || checkingOut}\n className=\"cursor-pointer flex items-center gap-2 rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-70\"\n >\n {buyingNow || checkingOut ? (\n <>\n <Loader2 className=\"size-4 animate-spin\" />\n Processing…\n </>\n ) : (\n `Buy ${getPriceDisplay()}`\n )}\n </button>\n )}\n\n {/* Add to Cart / Wishlist */}\n {!isFree && !isPurchased && (\n <button\n type=\"button\"\n onClick={handleAddToCart}\n disabled={addingToCart}\n className=\"cursor-pointer flex items-center gap-2 rounded-full border border-border-default px-4 py-3 text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50\"\n >\n {addingToCart ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : isInCart ? (\n <Check className=\"size-4 text-status-success-text\" />\n ) : (\n <ShoppingCart className=\"size-4\" />\n )}\n {isInCart ? 'In Cart' : 'Add to Cart'}\n </button>\n )}\n </div>\n\n {/* Info Text */}\n <p className=\"flex items-center gap-2 text-xs text-text-muted\">\n <Package className=\"size-4\" />\n This app is available for your workspace\n </p>\n\n {/* License Status */}\n {userEntitlement && (\n <p className=\"mt-2 flex items-center gap-2 text-xs text-text-muted\">\n <ShieldCheck className=\"size-4 text-status-success-text\" />\n License: {userEntitlement.status}\n {userEntitlement.expiresAt &&\n ` (Expires: ${new Date(userEntitlement.expiresAt).toLocaleDateString()})`}\n </p>\n )}\n </div>\n\n {/* Right Column - Hero Screenshot */}\n <div className=\"relative flex-1 bg-bg-sunken lg:min-h-[500px]\">\n {safeProduct.screenshots && safeProduct.screenshots.length > 0 ? (\n <img\n src={safeProduct.screenshots[0]}\n alt={`${safeProduct.name} screenshot`}\n className=\"size-full object-cover\"\n />\n ) : (\n <div className=\"flex h-full min-h-[300px] items-center justify-center\">\n <div className=\"text-center\">\n <div className=\"mx-auto mb-4 flex size-24 items-center justify-center rounded-2xl bg-bg-surface text-4xl font-bold text-text-muted\">\n {safeProduct.name.charAt(0)}\n </div>\n <p className=\"text-sm text-text-muted\">No preview available</p>\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n\n {/* Main Content Area */}\n <main className=\"mx-auto max-w-7xl px-6 py-8\">\n <div className=\"flex flex-col gap-8 lg:flex-row\">\n {/* Left Content */}\n <div className=\"flex-1 lg:max-w-3xl\">\n {/* Screenshots Gallery */}\n {safeProduct.screenshots && safeProduct.screenshots.length > 1 && (\n <section className=\"mb-8\">\n <div className=\"flex gap-4 overflow-x-auto pb-4\">\n {safeProduct.screenshots.map((screenshot, index) => (\n <div\n key={index}\n className=\"relative h-64 w-96 flex-shrink-0 overflow-hidden rounded-xl bg-bg-sunken\"\n >\n <img\n src={screenshot}\n alt={`Screenshot ${index + 1}`}\n className=\"size-full object-cover\"\n />\n </div>\n ))}\n </div>\n </section>\n )}\n\n {/* About this app */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center justify-between text-left\">\n <h2 className=\"text-lg font-medium text-text-primary\">About this app</h2>\n </div>\n <div className=\"text-sm leading-relaxed text-text-secondary\">\n <p className={!showFullDescription ? 'line-clamp-4' : ''}>\n {safeProduct.longDescription ||\n safeProduct.description ||\n 'No description available.'}\n </p>\n {((safeProduct.longDescription || safeProduct.description)?.length ?? 0) > 200 && (\n <button\n type=\"button\"\n onClick={() => setShowFullDescription(!showFullDescription)}\n className=\"cursor-pointer mt-3 text-sm font-medium text-text-link\"\n >\n {showFullDescription ? 'Show less' : 'Show more'}\n </button>\n )}\n </div>\n {/* Tags */}\n {safeProduct.tags && safeProduct.tags.length > 0 && (\n <div className=\"mt-4 flex flex-wrap gap-2\">\n {safeProduct.tags.map((tag) => (\n <span\n key={tag}\n className=\"rounded-full border border-border-default px-3 py-1.5 text-xs text-text-muted transition-colors hover:bg-bg-sunken\"\n >\n {tag}\n </span>\n ))}\n </div>\n )}\n </section>\n\n {/* Ratings & Reviews */}\n <section className=\"mb-8\">\n <div className=\"mb-4 flex items-center justify-between text-left\">\n <h2 className=\"text-lg font-medium text-text-primary\">Ratings & Reviews</h2>\n </div>\n\n <div className=\"rounded-xl border border-border-default bg-bg-surface p-5\">\n {reviews && reviews.length > 0 ? (\n <div className=\"flex items-start gap-8\">\n {/* Rating Score */}\n <div className=\"text-center\">\n <p className=\"text-5xl font-light text-text-primary\">\n {(safeProduct.rating || 0).toFixed(1)}\n </p>\n <div className=\"my-2 flex justify-center gap-0.5\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Star\n key={star}\n className={`size-4 ${\n star <= Math.round(safeProduct.rating || 0)\n ? 'fill-current text-status-warning-text'\n : 'text-text-muted'\n }`}\n />\n ))}\n </div>\n <p className=\"text-sm text-text-muted\">\n {formatNumber(reviewsCount || safeProduct.reviewCount)} reviews\n </p>\n </div>\n\n {/* Rating Distribution */}\n {ratingDistributionData.length > 0 && (\n <div className=\"flex-1 space-y-1.5\">\n {ratingDistributionData.map((item) => (\n <RatingBar key={item.stars} {...item} />\n ))}\n </div>\n )}\n </div>\n ) : (\n <div className=\"flex flex-col items-center justify-center py-6 text-center\">\n <div className=\"mb-3 flex gap-0.5\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Star key={star} className=\"size-5 text-border-default\" />\n ))}\n </div>\n <p className=\"font-medium text-text-primary\">No reviews yet</p>\n <p className=\"mt-1 text-sm text-text-muted\">\n Be the first to share your experience with this app.\n </p>\n </div>\n )}\n\n {/* Write Review */}\n <div className=\"mt-6 border-t border-border-default pt-4\">\n {reviewNotice && (\n <p\n role={reviewNoticeTone === 'success' ? 'status' : 'alert'}\n className={`mb-3 rounded-lg px-3 py-2 text-sm ${\n reviewNoticeTone === 'success'\n ? 'bg-status-success-bg-subtle text-status-success-text'\n : 'bg-status-error-bg-subtle text-status-error-text'\n }`}\n >\n {reviewNotice}\n </p>\n )}\n {isPurchased || productDetails?.userReview ? (\n <div className=\"space-y-4\">\n <button\n type=\"button\"\n onClick={() =>\n isReviewFormOpen ? setIsReviewFormOpen(false) : openReviewForm()\n }\n className=\"w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link\"\n >\n {productDetails?.userReview\n ? isReviewFormOpen\n ? 'Cancel review editing'\n : 'Edit your review'\n : isReviewFormOpen\n ? 'Cancel review'\n : 'Write a Review'}\n </button>\n\n {isReviewFormOpen && (\n <div className=\"rounded-xl border border-border-default bg-bg-sunken p-4\">\n <div>\n <p className=\"text-sm font-medium text-text-primary\">Your rating</p>\n <div className=\"mt-2 flex flex-wrap gap-2\">\n {[1, 2, 3, 4, 5].map((star) => (\n <button\n key={star}\n type=\"button\"\n onClick={() => setReviewRating(star)}\n className={`cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${\n reviewRating === star\n ? 'border-action-primary-border bg-action-primary-bg text-action-primary-text'\n : 'border-border-default bg-bg-surface text-text-primary hover:bg-bg-surface'\n }`}\n >\n {star} ★\n </button>\n ))}\n </div>\n </div>\n\n <label className=\"mt-4 block text-sm font-medium text-text-primary\">\n Title\n <input\n aria-label=\"Review title\"\n value={reviewTitle}\n onChange={(event) => setReviewTitle(event.target.value)}\n className=\"mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border\"\n placeholder=\"Summarize your experience\"\n />\n </label>\n\n <label className=\"mt-4 block text-sm font-medium text-text-primary\">\n Review\n <textarea\n aria-label=\"Review body\"\n value={reviewComment}\n onChange={(event) => setReviewComment(event.target.value)}\n rows={4}\n required\n aria-required=\"true\"\n className=\"mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border\"\n placeholder=\"What worked well? What should improve?\"\n />\n </label>\n\n <div className=\"mt-4 flex flex-wrap gap-3\">\n <button\n type=\"button\"\n onClick={handleSubmitReview}\n disabled={creatingReview || updatingReview}\n className=\"cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60\"\n >\n {creatingReview || updatingReview\n ? 'Saving...'\n : productDetails?.userReview\n ? 'Update Review'\n : 'Submit Review'}\n </button>\n {productDetails?.userReview && (\n <button\n type=\"button\"\n onClick={handleDeleteReview}\n disabled={deletingReview}\n className=\"cursor-pointer rounded-lg border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-60\"\n >\n {deletingReview ? 'Removing...' : 'Delete Review'}\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n ) : (\n <p className=\"text-center text-sm text-text-muted\">\n Purchase this app to submit a review.\n </p>\n )}\n </div>\n </div>\n\n {/* Reviews List */}\n {reviews && reviews.length > 0 && (\n <div className=\"mt-4 space-y-3\">\n <ul className=\"space-y-3\">\n {(showAllReviews ? reviews : reviews.slice(0, 2)).map((review) => (\n <li key={review.id}>\n <ReviewCard\n review={review}\n onMarkHelpful={handleMarkHelpful}\n markingHelpful={markingHelpful && helpfulReviewId === review.id}\n />\n </li>\n ))}\n </ul>\n {reviews.length > 2 && (\n <button\n type=\"button\"\n onClick={() => setShowAllReviews(!showAllReviews)}\n className=\"cursor-pointer text-sm font-medium text-text-link\"\n >\n {showAllReviews ? 'Show less' : `Show all ${reviews.length} reviews`}\n </button>\n )}\n </div>\n )}\n {(!reviews || reviews.length === 0) && (\n <p className=\"mt-4 text-sm text-text-muted\">\n No reviews yet. Be the first to review!\n </p>\n )}\n </section>\n\n {/* Permissions */}\n {permissions.length > 0 && (\n <section className=\"mb-8\">\n <h2 className=\"mb-4 text-lg font-medium text-text-primary\">Required Permissions</h2>\n <div className=\"space-y-2\">\n {permissions.map((permission) => (\n <div\n key={permission}\n className=\"flex items-center gap-3 rounded-lg bg-bg-surface px-4 py-3\"\n >\n <ShieldCheck className=\"size-5 text-status-success-text\" />\n <span className=\"text-sm text-text-primary\">{permission}</span>\n </div>\n ))}\n </div>\n </section>\n )}\n\n {/* Integrations */}\n {integrations.length > 0 && (\n <section className=\"mb-8\">\n <h2 className=\"mb-4 text-lg font-medium text-text-primary\">Integrations</h2>\n <div className=\"flex flex-wrap gap-2\">\n {integrations.map((integration) => (\n <span\n key={integration}\n className=\"rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary\"\n >\n {integration}\n </span>\n ))}\n </div>\n </section>\n )}\n\n {/* Additional Information */}\n <section className=\"mb-8\">\n <h2 className=\"mb-4 text-lg font-medium text-text-primary\">Additional Information</h2>\n <div className=\"grid grid-cols-2 gap-6 md:grid-cols-3\">\n {safeProduct.manifestVersion && (\n <div>\n <p className=\"text-xs text-text-muted\">Version</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {safeProduct.manifestVersion}\n </p>\n </div>\n )}\n <div>\n <p className=\"text-xs text-text-muted\">Type</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">{safeProduct.type}</p>\n </div>\n {safeProduct.publishedAt && (\n <div>\n <p className=\"text-xs text-text-muted\">Published</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {new Date(safeProduct.publishedAt).toLocaleDateString()}\n </p>\n </div>\n )}\n <div>\n <p className=\"text-xs text-text-muted\">Updated</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {new Date(safeProduct.updatedAt).toLocaleDateString()}\n </p>\n </div>\n {safeProduct.license && (\n <div>\n <p className=\"text-xs text-text-muted\">License</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {safeProduct.license}\n </p>\n </div>\n )}\n {safeProduct.minPlatformVersion && (\n <div>\n <p className=\"text-xs text-text-muted\">Min Platform Version</p>\n <p className=\"mt-1 text-sm font-medium text-text-primary\">\n {safeProduct.minPlatformVersion}\n </p>\n </div>\n )}\n </div>\n </section>\n </div>\n\n {/* Right Sidebar */}\n <div className=\"w-full lg:w-80\">\n {/* App Support */}\n {(safeProduct.documentationUrl || safeProduct.repositoryUrl || publisher?.email) && (\n <div className=\"mb-6 rounded-xl border border-border-default bg-bg-surface p-4\">\n <h3 className=\"font-medium text-text-primary\">App support</h3>\n <div className=\"mt-3 space-y-2 text-sm\">\n {safeProduct.documentationUrl && (\n <a\n href={safeProduct.documentationUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"block text-text-link hover:underline\"\n >\n Documentation\n </a>\n )}\n {safeProduct.repositoryUrl && (\n <a\n href={safeProduct.repositoryUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"block text-text-link hover:underline\"\n >\n Source repository\n </a>\n )}\n {publisher?.email && (\n <a\n href={`mailto:${publisher.email}`}\n className=\"block text-text-link hover:underline\"\n >\n Contact publisher\n </a>\n )}\n </div>\n </div>\n )}\n\n {/* More by Publisher */}\n {publisher && (\n <div className=\"mb-6 rounded-xl border border-border-default bg-bg-surface p-4\">\n <h3 className=\"font-medium text-text-primary\">Publisher</h3>\n <p className=\"mt-2 text-sm text-text-primary\">{publisher.name}</p>\n {publisher.bio && <p className=\"mt-2 text-sm text-text-muted\">{publisher.bio}</p>}\n {publisher.websiteUrl && (\n <a\n href={publisher.websiteUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"mt-3 inline-block text-sm text-text-link hover:underline\"\n >\n Visit publisher website\n </a>\n )}\n </div>\n )}\n\n {/* Similar Apps */}\n {relatedProducts && relatedProducts.length > 0 && (\n <div>\n <div className=\"mb-4 flex items-center justify-between text-left\">\n <span className=\"font-medium text-text-primary\">Similar apps</span>\n </div>\n <div className=\"space-y-3\">\n {relatedProducts.slice(0, 4).map((related) => (\n <button\n type=\"button\"\n key={related.id}\n onClick={() => navigate(`${basePath}/marketplace/product/${related.id}`)}\n className=\"flex w-full cursor-pointer items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-bg-sunken\"\n >\n {related.icon ? (\n <img\n src={related.icon}\n alt={related.name}\n className=\"size-12 rounded-xl object-cover\"\n />\n ) : (\n <div className=\"flex size-12 items-center justify-center rounded-xl bg-bg-sunken text-lg font-bold text-text-muted\">\n {related.name.charAt(0)}\n </div>\n )}\n <div className=\"flex-1 overflow-hidden\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {related.name}\n </p>\n <p className=\"text-xs text-text-muted\">{publisher?.name || 'Unknown'}</p>\n {(related.reviewCount ?? 0) > 0 && (\n <div className=\"flex items-center gap-1\">\n <span className=\"text-xs text-text-muted\">\n {(related.rating || 0).toFixed(1)}\n </span>\n <Star className=\"size-3 fill-current text-status-warning-text\" />\n </div>\n )}\n </div>\n </button>\n ))}\n </div>\n </div>\n )}\n </div>\n </div>\n </main>\n\n {/* Install App Modal */}\n {safeProduct && (\n <InstallAppModal\n isOpen={isInstallModalOpen}\n onClose={() => setIsInstallModalOpen(false)}\n app={{\n id: safeProduct.id,\n name: safeProduct.name,\n slug: safeProduct.slug,\n icon: safeProduct.icon,\n type: safeProduct.type,\n version: safeProduct.manifestVersion,\n }}\n purchaseState={isPurchased && !isFree ? 'purchased' : 'free'}\n onInstallSuccess={handleInstallSuccess}\n onInstallError={handleInstallError}\n />\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAwKA,IAAM,MAAwB,GAA4B,OAkDjD;CACL,IAAI,EAAa;CACjB,aAAa,GAAW,MAAM;CAC9B,WAAW;EACT,IAAI,GAAW,MAAM;EACrB,MAAM,GAAW,QAAQ,EAAa,cAAc;EACpD,aAAa,GAAW,QAAQ,EAAa,cAAc;EAC3D,OAAO,GAAW,SAAS;EAC3B,UAAU,GAAW,cAAc;EACnC,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,UAAU,GAAW,aAAa,EAAa;EAC/C,SAAS,GAAW;EACpB,SAAS,GAAW;EACrB;CACD,MAAM,EAAa;CACnB,MAAM,EAAa,QAAQ,EAAa;CACxC,aAAa,EAAa;CAC1B,aAAa,EAAa,mBAAmB,EAAa,eAAe;CACzE,kBAAkB,EAAa,eAAe;CAC9C,SAAS,EAAa;CACtB,gBAAgB,EAAa,eAAe,EAAE;CAC9C,WAAW,EAAa,aAAa,EAAE;CACvC,YAvCmB,GAAgB,MAC/B,MAAW,aAAmB,aACY;EAC5C,KAAK;EACL,QAAQ;EACR,OAAO;EACP,UAAU;EACV,UAAU;EACV,aAAa;EACb,WAAW;EACX,OAAO;EACR,CACkB,MAAS,OA2BN,EAAa,QAAQ,EAAa,KAAK;CAC7D,QA7DsB,OACuB;EAC3C,KA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"version": "2026.625.2",
3
+ "version": "2026.625.4",
4
4
  "description": "Store microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [