{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "data-product-card",
  "title": "Data Product Card",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/data-product-card/DataProductCard.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport {\n  Activity,\n  Check,\n  ChevronRight,\n  Copy,\n  Database,\n  HardDrive,\n  KeyRound,\n  Layers,\n  Radio,\n  Server,\n  ShieldCheck,\n  Award,\n  Users,\n  Zap,\n} from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Avatar, AvatarFallback } from '@/components/ui/avatar'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader } from '@/components/ui/card'\nimport { Progress } from '@/components/ui/progress'\nimport { Separator } from '@/components/ui/separator'\n\nexport interface OutputPort {\n  id: string\n  name: string\n  type: 'snowflake' | 'kafka' | 'graphql' | 's3' | 'postgres'\n  typeLabel: string\n  uri: string\n  latency: string\n  status: 'online' | 'degraded' | 'syncing'\n}\n\nexport interface DataProductData {\n  id: string\n  name: string\n  version: string\n  domain: string\n  tier: 'Gold Tier 1' | 'Silver Tier 2' | 'Bronze Tier 3'\n  description: string\n  slaCompliance: number\n  freshness: string\n  completenessPct: number\n  activeConsumersCount: number\n  owner: {\n    name: string\n    role: string\n    team: string\n    avatar?: string\n    fallback: string\n  }\n  outputPorts: OutputPort[]\n  tags: string[]\n  certifiedCompliance: string\n  lastUpdated: string\n}\n\nexport const DEFAULT_DATA_PRODUCT: DataProductData = {\n  id: 'dp-cust-360',\n  name: 'dp_customer_360_profile',\n  version: 'v3.2.0',\n  domain: 'Customer Intelligence & Growth',\n  tier: 'Gold Tier 1',\n  description:\n    'Unified customer identity graph consolidating CRM accounts, Stripe transaction volumes, and behavioral product telemetry into clean semantic marts.',\n  slaCompliance: 99.8,\n  freshness: 'Updated 8m ago · Hourly sync',\n  completenessPct: 99.4,\n  activeConsumersCount: 14,\n  owner: {\n    name: 'Marcus Vance',\n    role: 'Staff Data Architect',\n    team: 'Data Platform Squad',\n    fallback: 'MV',\n  },\n  outputPorts: [\n    {\n      id: 'port-snow',\n      name: 'analytics.gold_customer_360',\n      type: 'snowflake',\n      typeLabel: 'Snowflake Table',\n      uri: 'snowflake://analytics_prod.dw/analytics.gold_customer_360',\n      latency: '< 1h Batch SLA',\n      status: 'online',\n    },\n    {\n      id: 'port-kafka',\n      name: 'events.customer.updates.v2',\n      type: 'kafka',\n      typeLabel: 'Kafka Stream',\n      uri: 'kafka://events.kafka.internal:9092/events.customer.updates.v2',\n      latency: '< 100ms Event Time',\n      status: 'online',\n    },\n    {\n      id: 'port-gql',\n      name: 'GraphQL Query Port',\n      type: 'graphql',\n      typeLabel: 'GraphQL API',\n      uri: 'https://api.uipkge.dev/graphql?query=customer360',\n      latency: '< 45ms p99',\n      status: 'online',\n    },\n    {\n      id: 'port-s3',\n      name: 'Parquet Lake Export',\n      type: 's3',\n      typeLabel: 'Parquet S3 Lake',\n      uri: 's3://lakehouse-gold/customer_360/snapshot_latest.parquet',\n      latency: '24h Partitioned',\n      status: 'online',\n    },\n  ],\n  tags: ['#customer360', '#revenue', '#identity', '#gold_marts', '#dbt_certified'],\n  certifiedCompliance: 'SOC2 Type II & GDPR Art. 15 Compliant',\n  lastUpdated: 'Aug 21, 2026',\n}\n\nexport interface DataProductCardProps {\n  product?: DataProductData\n  variant?: 'full' | 'compact' | 'minimal'\n  className?: string\n}\n\nexport function DataProductCard({ product = DEFAULT_DATA_PRODUCT, variant = 'full', className }: DataProductCardProps) {\n  const [copiedPortId, setCopiedPortId] = React.useState<string | null>(null)\n  const [accessRequested, setAccessRequested] = React.useState(false)\n  const [isQueryingPort, setIsQueryingPort] = React.useState(false)\n  const [selectedPortId, setSelectedPortId] = React.useState<string>(product.outputPorts[0]?.id || 'port-snow')\n\n  const selectedPort = product.outputPorts.find((p) => p.id === selectedPortId) || product.outputPorts[0]\n\n  function copyUri(port: OutputPort) {\n    if (typeof navigator !== 'undefined' && navigator.clipboard) {\n      navigator.clipboard.writeText(port.uri)\n      setCopiedPortId(port.id)\n      setTimeout(() => {\n        setCopiedPortId(null)\n      }, 2000)\n    }\n  }\n\n  function handleRequestAccess() {\n    setAccessRequested(true)\n    setTimeout(() => {\n      setAccessRequested(false)\n    }, 4000)\n  }\n\n  function handleQueryPort() {\n    setIsQueryingPort(true)\n    setTimeout(() => {\n      setIsQueryingPort(false)\n    }, 1200)\n  }\n\n  return (\n    <div data-slot=\"data-product-card\" className={cn('w-full', className)}>\n      <Card className=\"border-border bg-card text-card-foreground hover:border-primary/40 relative flex flex-col overflow-hidden shadow-xs transition-colors duration-200 hover:shadow-sm\">\n        <CardHeader className=\"space-y-3 p-5 pb-3\">\n          {/* Badges & Governance Ribbon */}\n          <div className=\"flex flex-wrap items-center justify-between gap-2\">\n            <div className=\"flex flex-wrap items-center gap-1.5\">\n              {/* Domain Tag */}\n              <Badge\n                wrap\n                variant=\"outline\"\n                className=\"border-border bg-muted/30 text-muted-foreground gap-1 text-xs font-normal\"\n              >\n                <Layers className=\"text-primary size-3\" aria-hidden=\"true\" />\n                <span>{product.domain}</span>\n              </Badge>\n\n              {/* Tier Tag */}\n              <Badge\n                wrap\n                variant=\"secondary\"\n                className=\"border-success/30 bg-success/10 text-success font-mono text-xs font-semibold\"\n              >\n                <Award className=\"size-3\" aria-hidden=\"true\" />\n                {product.tier}\n              </Badge>\n            </div>\n\n            {/* Compliance Seal */}\n            <div className=\"text-muted-foreground flex items-center gap-1 text-xs\">\n              <ShieldCheck className=\"text-success size-3.5\" aria-hidden=\"true\" />\n              <span className=\"hidden font-medium sm:inline\">{product.certifiedCompliance}</span>\n              <span className=\"font-medium sm:hidden\">SOC2 Certified</span>\n            </div>\n          </div>\n\n          {/* Title & Version Lockup */}\n          <div className=\"space-y-1\">\n            <div className=\"flex flex-wrap items-center justify-between gap-2\">\n              <div className=\"flex items-baseline gap-2\">\n                <h3 className=\"text-foreground font-mono text-base font-bold tracking-tight break-all sm:text-lg\">\n                  {product.name}\n                </h3>\n                <span className=\"text-muted-foreground font-mono text-xs font-medium\">{product.version}</span>\n              </div>\n\n              <Badge wrap variant=\"outline\" className=\"text-muted-foreground gap-1 text-xs font-normal\">\n                <Activity className=\"text-success size-3 animate-pulse\" aria-hidden=\"true\" />\n                <span className=\"font-mono tabular-nums\">{product.slaCompliance}% SLA</span>\n              </Badge>\n            </div>\n\n            {/* Business Value Description */}\n            <CardDescription className=\"text-muted-foreground text-xs leading-relaxed sm:text-sm\">\n              {product.description}\n            </CardDescription>\n          </div>\n        </CardHeader>\n\n        <CardContent className=\"flex-1 space-y-4 p-5 pt-0\">\n          {/* 4 Key Telemetry Metrics Strip */}\n          <div className=\"border-border/80 bg-muted/20 grid grid-cols-2 gap-2 rounded-lg border p-2.5 text-xs sm:grid-cols-4 sm:p-3\">\n            <div className=\"space-y-0.5\">\n              <span className=\"text-muted-foreground block\">SLA Compliance</span>\n              <div className=\"flex items-center gap-1.5\">\n                <span className=\"text-success text-success font-mono text-sm font-bold tabular-nums\">\n                  {product.slaCompliance}%\n                </span>\n                <span className=\"text-success font-semibold\">✓</span>\n              </div>\n              <Progress value={product.slaCompliance} className=\"bg-muted h-1.5\" />\n            </div>\n\n            <div className=\"space-y-0.5\">\n              <span className=\"text-muted-foreground block\">Data Freshness</span>\n              <span\n                className=\"text-foreground block truncate font-mono text-xs font-semibold\"\n                title={product.freshness}\n              >\n                {product.freshness}\n              </span>\n              <span className=\"text-muted-foreground text-xs\">SLA: &lt; 1h Target</span>\n            </div>\n\n            <div className=\"space-y-0.5\">\n              <span className=\"text-muted-foreground block\">Completeness</span>\n              <span className=\"text-foreground block font-mono text-sm font-bold tabular-nums\">\n                {product.completenessPct}%\n              </span>\n              <span className=\"text-muted-foreground text-xs\">0.6% Max Nulls</span>\n            </div>\n\n            <div className=\"space-y-0.5\">\n              <span className=\"text-muted-foreground block\">Active Consumers</span>\n              <div className=\"flex items-center gap-1\">\n                <Users className=\"text-primary size-3.5\" aria-hidden=\"true\" />\n                <span className=\"text-foreground font-mono text-sm font-bold tabular-nums\">\n                  {product.activeConsumersCount} Apps\n                </span>\n              </div>\n              <span className=\"text-muted-foreground text-xs\">Certified Live Ports</span>\n            </div>\n          </div>\n\n          {/* Multi-Modal Output Ports Selector */}\n          <div className=\"space-y-2\">\n            <div className=\"flex items-center justify-between\">\n              <span className=\"text-foreground text-xs font-semibold tracking-wide uppercase\">\n                Certified Multi-Modal Output Ports ({product.outputPorts.length})\n              </span>\n              <span className=\"text-muted-foreground text-xs\">Click port to inspect URI</span>\n            </div>\n\n            <div className=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n              {product.outputPorts.map((port) => (\n                <button\n                  key={port.id}\n                  type=\"button\"\n                  className={cn(\n                    'group flex items-start justify-between rounded-lg border p-2.5 text-left transition-[colors,transform] duration-150 active:scale-[0.98]',\n                    selectedPortId === port.id\n                      ? 'border-primary/50 bg-primary/5 ring-primary/30 ring-1'\n                      : 'border-border bg-card hover:border-primary/25 hover:bg-muted/40',\n                  )}\n                  onClick={() => setSelectedPortId(port.id)}\n                >\n                  <div className=\"flex min-w-0 items-start gap-2.5\">\n                    <div className=\"bg-muted text-foreground mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-md\">\n                      {port.type === 'snowflake' && <Database className=\"text-info size-3.5\" aria-hidden=\"true\" />}\n                      {port.type === 'kafka' && <Radio className=\"text-warning size-3.5\" aria-hidden=\"true\" />}\n                      {port.type === 'graphql' && <Server className=\"text-chart-1 size-3.5\" aria-hidden=\"true\" />}\n                      {port.type !== 'snowflake' && port.type !== 'kafka' && port.type !== 'graphql' && (\n                        <HardDrive className=\"text-success size-3.5\" aria-hidden=\"true\" />\n                      )}\n                    </div>\n                    <div className=\"min-w-0 space-y-0.5\">\n                      <div className=\"flex items-center gap-1.5\">\n                        <span className=\"text-foreground truncate text-xs font-semibold\">{port.typeLabel}</span>\n                        <span className=\"bg-success size-1.5 shrink-0 rounded-full\" aria-hidden=\"true\" />\n                      </div>\n                      <p className=\"text-muted-foreground truncate font-mono text-xs\">{port.name}</p>\n                      <p className=\"text-muted-foreground text-xs font-normal\">{port.latency}</p>\n                    </div>\n                  </div>\n\n                  <div className=\"shrink-0 pt-0.5 pl-1\">\n                    {selectedPortId === port.id ? (\n                      <span className=\"bg-primary text-primary-foreground flex size-4 items-center justify-center rounded-full text-xs font-bold\">\n                        ✓\n                      </span>\n                    ) : (\n                      <ChevronRight\n                        className=\"text-muted-foreground/40 group-hover:text-foreground size-4\"\n                        aria-hidden=\"true\"\n                      />\n                    )}\n                  </div>\n                </button>\n              ))}\n            </div>\n          </div>\n\n          {/* Active Selected Port URI Inspector Box */}\n          <div className=\"border-border bg-muted/40 flex flex-col gap-2 rounded-lg border p-3 text-xs sm:flex-row sm:items-center sm:justify-between\">\n            <div className=\"min-w-0 space-y-0.5\">\n              <span className=\"text-muted-foreground text-xs font-medium\">Selected Endpoint URI:</span>\n              <p className=\"text-foreground truncate font-mono text-xs font-medium select-all\">{selectedPort?.uri}</p>\n            </div>\n\n            <div className=\"flex shrink-0 items-center gap-1.5 pt-1 sm:pt-0\">\n              <Button\n                variant=\"outline\"\n                size=\"sm\"\n                className=\"h-7 gap-1 px-2 text-xs transition-transform duration-150 active:scale-95\"\n                onClick={() => selectedPort && copyUri(selectedPort)}\n              >\n                {copiedPortId === selectedPort?.id ? (\n                  <Check className=\"text-success size-3\" aria-hidden=\"true\" />\n                ) : (\n                  <Copy className=\"size-3\" aria-hidden=\"true\" />\n                )}\n                <span>{copiedPortId === selectedPort?.id ? 'Copied' : 'Copy URI'}</span>\n              </Button>\n            </div>\n          </div>\n\n          {/* Product Owner & Tags Bar */}\n          <div className=\"flex flex-wrap items-center justify-between gap-3 pt-1\">\n            {/* Owner Profile */}\n            <div className=\"flex items-center gap-2\">\n              <Avatar className=\"border-border size-7 border\">\n                <AvatarFallback className=\"bg-primary/10 text-primary text-xs font-semibold\">\n                  {product.owner.fallback}\n                </AvatarFallback>\n              </Avatar>\n              <div>\n                <p className=\"text-foreground text-xs leading-none font-medium\">{product.owner.name}</p>\n                <p className=\"text-muted-foreground text-xs\">{product.owner.team}</p>\n              </div>\n            </div>\n\n            {/* Tags */}\n            <div className=\"flex flex-wrap items-center gap-1\">\n              {product.tags.slice(0, 3).map((tag) => (\n                <Badge\n                  wrap\n                  key={tag}\n                  variant=\"outline\"\n                  className=\"text-muted-foreground border-border/70 text-xs font-normal\"\n                >\n                  {tag}\n                </Badge>\n              ))}\n            </div>\n          </div>\n        </CardContent>\n\n        <Separator />\n\n        {/* Footer Action Controls */}\n        <CardFooter className=\"flex flex-wrap items-center justify-between gap-2 p-4 sm:px-5\">\n          <div className=\"text-muted-foreground text-xs\">\n            Last contract verified: <span className=\"text-foreground font-medium\">{product.lastUpdated}</span>\n          </div>\n\n          <div className=\"flex items-center gap-2\">\n            <Button\n              variant=\"outline\"\n              size=\"sm\"\n              className=\"h-8 gap-1.5 text-xs font-medium active:scale-[0.98]\"\n              disabled={isQueryingPort}\n              onClick={handleQueryPort}\n            >\n              {!isQueryingPort && <Zap className=\"text-warning size-3.5\" aria-hidden=\"true\" />}\n              {isQueryingPort ? <span>Running Test Query...</span> : <span>Query Port</span>}\n            </Button>\n\n            <Button\n              size=\"sm\"\n              className=\"h-8 gap-1.5 text-xs font-semibold shadow-xs active:scale-[0.98]\"\n              disabled={accessRequested}\n              onClick={handleRequestAccess}\n            >\n              <KeyRound className=\"size-3.5\" aria-hidden=\"true\" />\n              <span>{accessRequested ? 'Access Requested ✓' : 'Request Access'}</span>\n            </Button>\n          </div>\n        </CardFooter>\n      </Card>\n    </div>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/DataProductCard.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/avatar.json",
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/card.json",
    "https://uipkge.dev/r/react/progress.json",
    "https://uipkge.dev/r/react/separator.json"
  ],
  "description": "Data Mesh architectural Data Product Card (DPC) featuring SLA compliance health, multi-modal output ports (Snowflake, Kafka, GraphQL, Parquet S3), domain ownership, consumer counts, and access request triggers.",
  "categories": [
    "devops",
    "app",
    "data",
    "analytics"
  ]
}