{
  "$schema": "https://uipkge.dev/schema/registry-item.json",
  "name": "data-contract-governance",
  "title": "Data Contract Governance",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-angular/blocks/data-contract-governance/data-contract-governance.component.ts",
      "content": "import { Component, DestroyRef, Input, computed, inject, signal, ChangeDetectionStrategy } from '@angular/core'\nimport {\n  Activity,\n  AlertCircle,\n  AlertTriangle,\n  Check,\n  CheckCircle2,\n  Code2,\n  Copy,\n  Download,\n  FileCode,\n  FileCode2,\n  FileJson,\n  HardDrive,\n  Key,\n  Link2,\n  Loader2,\n  Lock,\n  LucideAngularModule,\n  Play,\n  Radio,\n  RefreshCw,\n  Search,\n  Server,\n  ShieldCheck,\n  Table2,\n  Tag,\n  Terminal,\n  Users,\n  WrapText,\n  Zap,\n} from 'lucide-angular'\nimport { cn } from '@/lib/utils'\nimport { UiBadgeComponent } from '@/ui/badge/badge.component'\nimport { UiButtonComponent } from '@/ui/button/button.component'\nimport { UiCardComponent } from '@/ui/card/card.component'\nimport { UiInputComponent } from '@/ui/input/input.component'\nimport { UiSeparatorComponent } from '@/ui/separator/separator.component'\nimport {\n  UiTableBodyComponent,\n  UiTableCellComponent,\n  UiTableComponent,\n  UiTableHeadComponent,\n  UiTableHeaderComponent,\n  UiTableRowComponent,\n} from '@/ui/table/table.component'\nimport {\n  UiTabsComponent,\n  UiTabsContentComponent,\n  UiTabsListComponent,\n  UiTabsTriggerComponent,\n} from '@/ui/tabs/tabs.component'\n\nexport interface SchemaField {\n  name: string\n  dataType: string\n  format?: string\n  nullable: boolean\n  isPrimaryKey?: boolean\n  isForeignKey?: boolean\n  foreignKeyRef?: string\n  isPii?: boolean\n  maskingStrategy?: string\n  constraints?: string\n  description: string\n}\n\nexport interface LintTestRule {\n  id: string\n  name: string\n  category: 'breaking' | 'compatibility' | 'compliance'\n  categoryLabel: string\n  status: 'pass' | 'warn' | 'fail'\n  ruleDefinition: string\n  assertionPath: string\n  executionDuration: string\n  evaluatedAt: string\n}\n\nexport interface ConsumerService {\n  id: string\n  name: string\n  team: string\n  versionSubscribed: string\n  versionStatus: 'current' | 'minor-lag' | 'major-lag'\n  status: 'compliant' | 'warning' | 'deprecated'\n  throughput: string\n  latencyP99: string\n  slaStatus: string\n  compatibility: string\n  lastEventReceived: string\n  contact: string\n}\n\nconst rawYamlContract = `apiVersion: datacontract.com/v3.0.1\nkind: DataContract\nid: urn:datacontract:checkout:orders_placed\ninfo:\n  title: orders_placed\n  version: 3.2.0\n  status: enforced\n  owner: Checkout Core Engineering Squad\n  contact: #checkout-eng-alerts\n  description: Canonical production data contract for completed checkout orders across global storefronts.\n\nservers:\n  production:\n    type: kafka\n    topic: events.orders.placed\n    format: json_schema\n    cluster: prd-us-east-kafka.internal:9092\n  lakehouse:\n    type: iceberg\n    location: s3://lakehouse-analytics/tables/checkout/orders_placed_v3\n    format: parquet\n\nservicelevels:\n  availability:\n    percentage: 99.99%\n    description: 30-day rolling cluster uptime\n  latency:\n    threshold: 100ms\n    percentile: p99\n  freshness:\n    maxDelay: 5s\n    source: cdc_debezium_postgres\n  retention:\n    period: 365d\n    tier: hot_kafka_7d_warm_iceberg_365d\n\nschema:\n  type: object\n  required:\n    - order_id\n    - customer_id\n    - order_timestamp\n    - total_amount_cents\n    - currency_code\n    - payment_method\n    - customer_email_encrypted\n    - shipping_country\n    - line_items_count\n  properties:\n    order_id:\n      type: string\n      format: uuid\n      nullable: false\n      description: Unique primary transaction order UUID.\n    customer_id:\n      type: string\n      format: uuid\n      nullable: false\n      description: Master verified customer identity reference.\n    order_timestamp:\n      type: string\n      format: date-time\n      pattern: \"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$\"\n      nullable: false\n      description: Event generation timestamp in UTC RFC-3339.\n    total_amount_cents:\n      type: integer\n      minimum: 0\n      maximum: 5000000\n      nullable: false\n      description: Gross order value denominated in lowest currency unit.\n    currency_code:\n      type: string\n      enum: [\"USD\", \"EUR\", \"GBP\", \"JPY\", \"CAD\"]\n      nullable: false\n      description: ISO 4217 three-letter currency code.\n    payment_method:\n      type: string\n      enum: [\"credit_card\", \"apple_pay\", \"google_pay\", \"sepa_debit\"]\n      nullable: false\n      description: Authorized payment gateway instrument type.\n    customer_email_encrypted:\n      type: string\n      nullable: false\n      pii: true\n      masking: deterministic_sha256\n      classification: restricted\n      description: AES-GCM-256 encrypted customer email for fraud detection.\n    shipping_country:\n      type: string\n      pattern: \"^[A-Z]{2}$\"\n      nullable: false\n      description: ISO 3166-1 alpha-2 destination country code.\n    line_items_count:\n      type: integer\n      minimum: 1\n      maximum: 100\n      nullable: false\n      description: Number of line items purchased in order.`\n\nconst schemaFields: SchemaField[] = [\n  {\n    name: 'order_id',\n    dataType: 'string',\n    format: 'uuid',\n    nullable: false,\n    isPrimaryKey: true,\n    constraints: 'format: uuid (RFC-4122)',\n    description: 'Unique primary transaction order identifier.',\n  },\n  {\n    name: 'customer_id',\n    dataType: 'string',\n    format: 'uuid',\n    nullable: false,\n    isForeignKey: true,\n    foreignKeyRef: 'customers.customer_id',\n    constraints: 'format: uuid, not null',\n    description: 'Master verified customer identity reference.',\n  },\n  {\n    name: 'order_timestamp',\n    dataType: 'string',\n    format: 'date-time',\n    nullable: false,\n    constraints: 'pattern: RFC-3339 UTC',\n    description: 'Event generation timestamp in strict ISO-8601 / RFC-3339 UTC.',\n  },\n  {\n    name: 'total_amount_cents',\n    dataType: 'integer',\n    format: 'int64',\n    nullable: false,\n    constraints: '0 ≤ value ≤ 5,000,000',\n    description: 'Gross order value denominated in lowest currency unit (cents).',\n  },\n  {\n    name: 'currency_code',\n    dataType: 'string',\n    nullable: false,\n    constraints: 'enum: [USD, EUR, GBP, JPY, CAD]',\n    description: 'ISO-4217 three-letter currency code in which the charge occurred.',\n  },\n  {\n    name: 'payment_method',\n    dataType: 'string',\n    nullable: false,\n    constraints: 'enum: [credit_card, apple_pay, google_pay, sepa_debit]',\n    description: 'Authorized payment gateway instrument method.',\n  },\n  {\n    name: 'customer_email_encrypted',\n    dataType: 'string',\n    nullable: false,\n    isPii: true,\n    maskingStrategy: 'SHA-256 / AES-256-GCM',\n    constraints: 'pii: true, restricted',\n    description: 'Cryptographically enveloped customer email address.',\n  },\n  {\n    name: 'shipping_country',\n    dataType: 'string',\n    nullable: false,\n    constraints: 'pattern: ^[A-Z]{2}$ (ISO 3166-1)',\n    description: 'Two-letter alpha-2 shipping destination country code.',\n  },\n  {\n    name: 'line_items_count',\n    dataType: 'integer',\n    format: 'int32',\n    nullable: false,\n    constraints: '1 ≤ value ≤ 100',\n    description: 'Total count of individual catalog items inside the basket.',\n  },\n]\n\nconst lintRules: LintTestRule[] = [\n  {\n    id: 'lint-1',\n    name: \"Field 'customer_id' remains required\",\n    category: 'breaking',\n    categoryLabel: 'Requiredness Invariant',\n    status: 'pass',\n    ruleDefinition:\n      'Required string UUID field cannot be made optional or omitted without a major semantic version bump (v4.0.0).',\n    assertionPath: 'schema.properties.customer_id.nullable == false',\n    executionDuration: '14ms',\n    evaluatedAt: 'Just now',\n  },\n  {\n    id: 'lint-2',\n    name: \"Field 'currency_code' enum compatibility\",\n    category: 'compatibility',\n    categoryLabel: 'Enum Evolution',\n    status: 'pass',\n    ruleDefinition:\n      'Allowed currency enum set [USD, EUR, GBP, JPY, CAD] is a strict superset of v3.1; no historical enum values were pruned.',\n    assertionPath: 'schema.properties.currency_code.enum (5 items)',\n    executionDuration: '22ms',\n    evaluatedAt: 'Just now',\n  },\n  {\n    id: 'lint-3',\n    name: 'Timestamp ISO-8601 format compliance',\n    category: 'compliance',\n    categoryLabel: 'Format Strictness',\n    status: 'pass',\n    ruleDefinition:\n      \"Field 'order_timestamp' adheres to strict RFC 3339 / ISO-8601 UTC regex pattern with mandatory 'Z' zone identifier.\",\n    assertionPath: 'format: date-time (RFC-3339 UTC)',\n    executionDuration: '18ms',\n    evaluatedAt: 'Just now',\n  },\n  {\n    id: 'lint-4',\n    name: 'Backward compatibility for existing consumer v3.1',\n    category: 'compatibility',\n    categoryLabel: 'Consumer Simulation',\n    status: 'pass',\n    ruleDefinition:\n      'Simulated payload deserialization passed across all 8 active consumer test vectors without JSON schema deserializer exceptions.',\n    assertionPath: '8/8 consumer test vectors pass',\n    executionDuration: '145ms',\n    evaluatedAt: 'Just now',\n  },\n  {\n    id: 'lint-5',\n    name: \"Field 'customer_email_encrypted' PII Masking Rule\",\n    category: 'compliance',\n    categoryLabel: 'Security & PII',\n    status: 'pass',\n    ruleDefinition:\n      'Customer email field enforces cryptographic ciphertext masking (AES-GCM-256 / SHA-256) prior to publishing onto Kafka broker.',\n    assertionPath: 'pii: true · masking: deterministic_sha256',\n    executionDuration: '31ms',\n    evaluatedAt: 'Just now',\n  },\n  {\n    id: 'lint-6',\n    name: 'Schema type narrowing safety',\n    category: 'breaking',\n    categoryLabel: 'Type Evolution',\n    status: 'pass',\n    ruleDefinition:\n      'No existing schema properties had primitive data types narrowed or widened in a breaking manner (e.g. integer to short).',\n    assertionPath: '0 type narrowing violations detected',\n    executionDuration: '19ms',\n    evaluatedAt: 'Just now',\n  },\n]\n\nconst consumerServices: ConsumerService[] = [\n  {\n    id: 'svc-1',\n    name: 'Fraud Detection Service',\n    team: 'Security & Risk Squad',\n    versionSubscribed: 'v3.2.0',\n    versionStatus: 'current',\n    status: 'compliant',\n    throughput: '4,200 msg/s',\n    latencyP99: '38ms',\n    slaStatus: 'SLA Compliant (p99 < 100ms)',\n    compatibility: '100% Compatible',\n    lastEventReceived: '1.2s ago',\n    contact: '#fraud-eng',\n  },\n  {\n    id: 'svc-2',\n    name: 'Financial Ledger Mart',\n    team: 'Finance Analytics Squad',\n    versionSubscribed: 'v3.1.0',\n    versionStatus: 'minor-lag',\n    status: 'compliant',\n    throughput: '1,850 msg/s',\n    latencyP99: '52ms',\n    slaStatus: 'SLA Compliant (p99 < 100ms)',\n    compatibility: 'Backward Compat Verified',\n    lastEventReceived: '3.4s ago',\n    contact: '#fin-ledger-team',\n  },\n  {\n    id: 'svc-3',\n    name: 'Email Notification Dispatcher',\n    team: 'Customer Comms Team',\n    versionSubscribed: 'v3.2.0',\n    versionStatus: 'current',\n    status: 'compliant',\n    throughput: '850 msg/s',\n    latencyP99: '24ms',\n    slaStatus: 'SLA Compliant (p99 < 100ms)',\n    compatibility: '100% Compatible',\n    lastEventReceived: '0.8s ago',\n    contact: '#comms-alerts',\n  },\n  {\n    id: 'svc-4',\n    name: 'Inventory Fulfillment Pipeline',\n    team: 'Supply Chain Engineering',\n    versionSubscribed: 'v3.2.0',\n    versionStatus: 'current',\n    status: 'compliant',\n    throughput: '2,100 msg/s',\n    latencyP99: '34ms',\n    slaStatus: 'SLA Compliant (p99 < 100ms)',\n    compatibility: '100% Compatible',\n    lastEventReceived: '1.5s ago',\n    contact: '#supply-chain-dev',\n  },\n  {\n    id: 'svc-5',\n    name: 'Customer Data Platform (CDP)',\n    team: 'Growth & Marketing Tech',\n    versionSubscribed: 'v3.0.4',\n    versionStatus: 'minor-lag',\n    status: 'compliant',\n    throughput: '3,400 msg/s',\n    latencyP99: '48ms',\n    slaStatus: 'SLA Compliant (p99 < 100ms)',\n    compatibility: 'v3.0 Compat Mode',\n    lastEventReceived: '2.1s ago',\n    contact: '#growth-infra',\n  },\n  {\n    id: 'svc-6',\n    name: 'Realtime Order Tracking Gateway',\n    team: 'Mobile & Web Edge Platform',\n    versionSubscribed: 'v3.2.0',\n    versionStatus: 'current',\n    status: 'compliant',\n    throughput: '5,600 msg/s',\n    latencyP99: '19ms',\n    slaStatus: 'SLA Compliant (p99 < 100ms)',\n    compatibility: '100% Compatible',\n    lastEventReceived: '0.4s ago',\n    contact: '#edge-team',\n  },\n  {\n    id: 'svc-7',\n    name: 'Audit Log & Compliance Vault',\n    team: 'Infosec & Legal Systems',\n    versionSubscribed: 'v3.2.0',\n    versionStatus: 'current',\n    status: 'compliant',\n    throughput: '1,200 msg/s',\n    latencyP99: '28ms',\n    slaStatus: 'SLA Compliant (p99 < 100ms)',\n    compatibility: '100% Compatible',\n    lastEventReceived: '4.2s ago',\n    contact: '#infosec-ops',\n  },\n  {\n    id: 'svc-8',\n    name: 'Search & Recommendation Indexer',\n    team: 'Discovery & ML Platform',\n    versionSubscribed: 'v3.1.2',\n    versionStatus: 'minor-lag',\n    status: 'compliant',\n    throughput: '980 msg/s',\n    latencyP99: '31ms',\n    slaStatus: 'SLA Compliant (p99 < 100ms)',\n    compatibility: 'Backward Compat Verified',\n    lastEventReceived: '1.9s ago',\n    contact: '#discovery-ml',\n  },\n]\n\nexport type DataContractInspectorTab = 'yaml' | 'schema' | 'sla'\nexport type DataContractLinterFilter = 'all' | 'breaking' | 'compatibility' | 'compliance'\n\nexport interface YamlLine {\n  text: string\n  className: string\n}\n\n/** Colour one YAML line the way the React viewer does (keywords, sections, PII, comments). */\nexport function yamlLineClass(line: string): string {\n  const isKeyword = line.startsWith('apiVersion:') || line.startsWith('kind:') || line.startsWith('id:')\n  const isSection =\n    line.startsWith('info:') ||\n    line.startsWith('servers:') ||\n    line.startsWith('servicelevels:') ||\n    line.startsWith('schema:')\n  const isPii = line.includes('pii: true') || line.includes('masking:')\n  const isComment = line.trim().startsWith('#')\n\n  if (isKeyword) return 'text-info font-semibold'\n  if (isSection) return 'text-chart-1 font-semibold'\n  if (isPii) return 'text-success font-semibold'\n  if (isComment) return 'text-muted-foreground/80 italic'\n  return 'text-foreground/90'\n}\n\nconst yamlLines: YamlLine[] = rawYamlContract.split('\\n').map((text) => ({ text, className: yamlLineClass(text) }))\n\nconst filterButtonBase = 'h-7 px-2.5 text-xs font-medium'\nconst filterButtonActive = 'bg-background text-foreground shadow-xs'\nconst filterButtonIdle = 'text-muted-foreground hover:text-foreground'\n\n/**\n * DataContractGovernance -- the React block, 1:1: an OpenDataContract style contract page with\n * a header (title, semver + enforced badges, ownership strip, Export JSON Schema and Validate\n * actions with a live feedback strip), four governance KPI cards, a left inspector with YAML /\n * schema fields / SLA tabs, and a right column with the breaking change linter (filterable,\n * re-runnable) and the searchable registered consumers table. Edit the data consts above.\n */\n@Component({\n  changeDetection: ChangeDetectionStrategy.Eager,\n  selector: 'ui-data-contract-governance, [ui-data-contract-governance]',\n  standalone: true,\n  // React renders the root <div> itself: keep this wrapper out of the layout.\n  host: { class: 'contents' },\n  imports: [\n    LucideAngularModule,\n    UiBadgeComponent,\n    UiButtonComponent,\n    UiCardComponent,\n    UiInputComponent,\n    UiSeparatorComponent,\n    UiTableComponent,\n    UiTableHeaderComponent,\n    UiTableBodyComponent,\n    UiTableRowComponent,\n    UiTableHeadComponent,\n    UiTableCellComponent,\n    UiTabsComponent,\n    UiTabsListComponent,\n    UiTabsTriggerComponent,\n    UiTabsContentComponent,\n  ],\n  template: `\n    <div data-slot=\"data-contract-governance\" [class]=\"rootClass\">\n      <!-- TOP HEADER -->\n      <header class=\"border-border/80 bg-muted/20 border-b p-4 sm:p-6\">\n        <div class=\"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between\">\n          <!-- Left: Contract Title, Version, Status Badges -->\n          <div class=\"space-y-2\">\n            <div class=\"flex flex-wrap items-center gap-2\">\n              <div\n                class=\"bg-primary/10 text-primary border-primary/20 flex size-8 items-center justify-center rounded-lg border\"\n              >\n                <lucide-icon [img]=\"FileCode2\" class=\"size-4\" />\n              </div>\n              <div>\n                <div class=\"flex flex-wrap items-center gap-2\">\n                  <h2 class=\"font-mono text-base font-bold break-all sm:text-lg\">{{ contractTitle }}</h2>\n                  <span ui-badge variant=\"secondary\" class=\"gap-1 font-mono text-xs font-medium\">\n                    <lucide-icon [img]=\"Tag\" class=\"text-info size-3\" />\n                    {{ version }} · Semantic Versioned\n                  </span>\n                  <span\n                    ui-badge\n                    variant=\"outline\"\n                    class=\"border-success/30 bg-success/10 text-success gap-1.5 font-mono text-xs font-semibold\"\n                  >\n                    <span class=\"bg-success size-1.5 animate-pulse rounded-full\"></span>\n                    <lucide-icon [img]=\"ShieldCheck\" class=\"text-success size-3.5\" />\n                    Contract Enforced &amp; Passing\n                  </span>\n                </div>\n              </div>\n            </div>\n\n            <!-- Metadata Badges & Ownership Strip -->\n            <div class=\"text-muted-foreground flex flex-wrap items-center gap-x-4 gap-y-1.5 font-mono text-xs\">\n              <div class=\"flex items-center gap-1.5\">\n                <lucide-icon [img]=\"Users\" class=\"text-info size-3\" />\n                <span>Owner:</span>\n                <span class=\"text-foreground font-medium\">{{ ownerTeam }}</span>\n              </div>\n              <div class=\"flex items-center gap-1.5\">\n                <lucide-icon [img]=\"Server\" class=\"text-chart-1 size-3\" />\n                <span>Producer:</span>\n                <span class=\"text-foreground font-medium\">{{ producerService }}</span>\n              </div>\n              <div class=\"flex items-center gap-1.5\">\n                <lucide-icon [img]=\"Radio\" class=\"text-warning size-3\" />\n                <span>Topic:</span>\n                <span class=\"text-foreground font-medium\">{{ destinationTopic }}</span>\n              </div>\n              <div class=\"flex items-center gap-1.5\">\n                <lucide-icon [img]=\"Lock\" class=\"text-success size-3\" />\n                <span>Classification:</span>\n                <span class=\"text-foreground font-medium\">PII Sensitive · Encrypted</span>\n              </div>\n            </div>\n          </div>\n\n          <!-- Right: Primary & Secondary Action Buttons -->\n          <div class=\"flex flex-wrap items-center gap-2\">\n            <button\n              ui-button\n              variant=\"outline\"\n              size=\"sm\"\n              class=\"h-8 gap-1.5 text-xs font-medium\"\n              (click)=\"handleExportSchema()\"\n            >\n              <lucide-icon [img]=\"Download\" class=\"text-info size-3.5\" />\n              <span>Export Schema (JSON Schema)</span>\n            </button>\n\n            <button\n              ui-button\n              variant=\"default\"\n              size=\"sm\"\n              class=\"bg-primary text-primary-foreground hover:bg-primary/90 h-8 gap-1.5 text-xs font-semibold shadow-xs\"\n              [disabled]=\"isValidatingYaml()\"\n              (click)=\"handleValidateContract()\"\n            >\n              @if (isValidatingYaml()) {\n                <lucide-icon [img]=\"Loader2\" class=\"size-3.5 animate-spin\" />\n              } @else {\n                <lucide-icon [img]=\"Play\" class=\"size-3.5 fill-current\" />\n              }\n              <span>{{ isValidatingYaml() ? 'Validating Contract...' : 'Validate Contract YAML' }}</span>\n            </button>\n          </div>\n        </div>\n\n        <!-- Live Feedback Notification -->\n        @if (validationToast()) {\n          <div\n            class=\"border-border bg-background mt-3 flex items-center justify-between rounded-lg border px-3 py-2 text-xs\"\n          >\n            <div class=\"flex items-center gap-2\">\n              <lucide-icon [img]=\"ShieldCheck\" class=\"text-success size-4\" />\n              <span class=\"text-foreground font-mono font-medium\">{{ validationToast() }}</span>\n            </div>\n            <span class=\"text-muted-foreground font-mono text-xs\">{{ lastValidatedTimestamp() }}</span>\n          </div>\n        }\n      </header>\n\n      <!-- 4 DATA GOVERNANCE KPI CARDS -->\n      <div class=\"border-border/70 bg-border grid grid-cols-1 gap-px border-b sm:grid-cols-2 lg:grid-cols-4\">\n        <!-- Card 1: Registered Consumers -->\n        <div class=\"bg-card p-4 sm:p-5\">\n          <div class=\"flex items-center justify-between pb-2\">\n            <span class=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">\n              Registered Consumers\n            </span>\n            <div class=\"border-info/20 bg-info/10 text-info flex size-7 items-center justify-center rounded-md border\">\n              <lucide-icon [img]=\"Users\" class=\"size-3.5\" />\n            </div>\n          </div>\n          <div class=\"text-2xl font-bold tracking-tight\">8 Services</div>\n          <div class=\"mt-1.5 flex flex-wrap items-center gap-1.5 font-mono text-xs\">\n            <span ui-badge variant=\"outline\" class=\"border-info/30 bg-info/10 text-info text-xs font-normal\">\n              8 Downstream Consumer Services\n            </span>\n            <span class=\"text-muted-foreground\">across 3 domains</span>\n          </div>\n        </div>\n\n        <!-- Card 2: Breaking Changes Detected -->\n        <div class=\"bg-card p-4 sm:p-5\">\n          <div class=\"flex items-center justify-between pb-2\">\n            <span class=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">Breaking Changes</span>\n            <div\n              class=\"border-success/20 bg-success/10 text-success flex size-7 items-center justify-center rounded-md border\"\n            >\n              <lucide-icon [img]=\"ShieldCheck\" class=\"size-3.5\" />\n            </div>\n          </div>\n          <div class=\"text-success text-2xl font-bold tracking-tight\">0 Breaking</div>\n          <div class=\"mt-1.5 flex flex-wrap items-center gap-1.5 font-mono text-xs\">\n            <span ui-badge variant=\"outline\" class=\"border-success/30 bg-success/10 text-success text-xs font-medium\">\n              0 Breaking Changes\n            </span>\n            <span class=\"text-muted-foreground\">100% backward compat</span>\n          </div>\n        </div>\n\n        <!-- Card 3: Schema Freshness SLA -->\n        <div class=\"bg-card p-4 sm:p-5\">\n          <div class=\"flex items-center justify-between pb-2\">\n            <span class=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">Freshness SLA</span>\n            <div\n              class=\"border-warning/20 bg-warning/10 text-warning flex size-7 items-center justify-center rounded-md border\"\n            >\n              <lucide-icon [img]=\"Activity\" class=\"size-3.5\" />\n            </div>\n          </div>\n          <div class=\"text-2xl font-bold tracking-tight\">99.9% CDC</div>\n          <div class=\"mt-1.5 flex flex-wrap items-center gap-1.5 font-mono text-xs\">\n            <span ui-badge variant=\"outline\" class=\"border-warning/30 bg-warning/10 text-warning text-xs font-normal\">\n              SLA: 99.9% · Real-time CDC\n            </span>\n            <span class=\"text-muted-foreground\">p99 &lt; 85ms</span>\n          </div>\n        </div>\n\n        <!-- Card 4: Quality Assertions Bound -->\n        <div class=\"bg-card p-4 sm:p-5\">\n          <div class=\"flex items-center justify-between pb-2\">\n            <span class=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\"> Quality Assertions </span>\n            <div\n              class=\"border-chart-2/20 bg-chart-2/10 text-chart-2 flex size-7 items-center justify-center rounded-md border\"\n            >\n              <lucide-icon [img]=\"CheckCircle2\" class=\"size-3.5\" />\n            </div>\n          </div>\n          <div class=\"text-2xl font-bold tracking-tight\">14 Active</div>\n          <div class=\"mt-1.5 flex flex-wrap items-center gap-1.5 font-mono text-xs\">\n            <span ui-badge variant=\"outline\" class=\"border-chart-2/30 bg-chart-2/10 text-chart-2 text-xs font-normal\">\n              14 Schema Constraints Active\n            </span>\n            <span class=\"text-muted-foreground\">14/14 passing</span>\n          </div>\n        </div>\n      </div>\n\n      <!-- 2-COLUMN DATA CONTRACT STUDIO -->\n      <div class=\"divide-border grid flex-1 grid-cols-1 divide-y lg:grid-cols-12 lg:divide-x lg:divide-y-0\">\n        <!-- LEFT COLUMN: CONTRACT SCHEMA & SLA INSPECTOR -->\n        <section class=\"bg-muted/10 flex flex-col space-y-4 p-4 sm:p-5 lg:col-span-5\">\n          <!-- Section Header -->\n          <div class=\"flex items-center justify-between\">\n            <div class=\"space-y-0.5\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"Code2\" class=\"text-primary size-4\" />\n                <h3 class=\"text-sm font-semibold\">Contract Specification &amp; SLA</h3>\n              </div>\n              <p class=\"text-muted-foreground text-xs\">\n                OpenDataContract v3.0 schema definitions and producer guarantees\n              </p>\n            </div>\n          </div>\n\n          <!-- Tabs Container -->\n          <ui-tabs [value]=\"activeInspectorTab()\" (valueChange)=\"setInspectorTab($event)\" class=\"w-full\">\n            <div class=\"flex items-center justify-between gap-2 pb-1\">\n              <div ui-tabs-list variant=\"segmented\" class=\"h-8\">\n                <button ui-tabs-trigger value=\"yaml\" class=\"h-7 gap-1 px-2.5 text-xs\">\n                  <lucide-icon [img]=\"FileCode\" class=\"size-3.5\" />\n                  <span>YAML Spec</span>\n                </button>\n                <button ui-tabs-trigger value=\"schema\" class=\"h-7 gap-1 px-2.5 text-xs\">\n                  <lucide-icon [img]=\"Table2\" class=\"size-3.5\" />\n                  <span>Fields ({{ schemaFields.length }})</span>\n                </button>\n                <button ui-tabs-trigger value=\"sla\" class=\"h-7 gap-1 px-2.5 text-xs\">\n                  <lucide-icon [img]=\"Activity\" class=\"size-3.5\" />\n                  <span>SLA Agreements</span>\n                </button>\n              </div>\n\n              <!-- Actions per tab -->\n              <div class=\"flex items-center gap-1\">\n                @if (activeInspectorTab() === 'yaml') {\n                  <button\n                    ui-button\n                    variant=\"ghost\"\n                    size=\"sm\"\n                    class=\"h-7 px-2 text-xs\"\n                    [attr.title]=\"wrapYamlLines() ? 'Disable line wrap' : 'Enable line wrap'\"\n                    (click)=\"wrapYamlLines.set(!wrapYamlLines())\"\n                  >\n                    <lucide-icon [img]=\"WrapText\" class=\"size-3.5\" />\n                  </button>\n\n                  <button ui-button variant=\"ghost\" size=\"sm\" class=\"h-7 gap-1 px-2 text-xs\" (click)=\"handleCopyYaml()\">\n                    @if (copiedYaml()) {\n                      <lucide-icon [img]=\"Check\" class=\"text-success size-3.5\" />\n                    } @else {\n                      <lucide-icon [img]=\"Copy\" class=\"size-3.5\" />\n                    }\n                    <span>{{ copiedYaml() ? 'Copied' : 'Copy' }}</span>\n                  </button>\n                }\n\n                @if (activeInspectorTab() === 'schema') {\n                  <button\n                    ui-button\n                    variant=\"ghost\"\n                    size=\"sm\"\n                    class=\"h-7 gap-1 px-2 text-xs\"\n                    (click)=\"handleCopyJsonSchema()\"\n                  >\n                    @if (copiedSchema()) {\n                      <lucide-icon [img]=\"Check\" class=\"text-success size-3.5\" />\n                    } @else {\n                      <lucide-icon [img]=\"FileJson\" class=\"size-3.5\" />\n                    }\n                    <span>{{ copiedSchema() ? 'Copied JSON' : 'Copy JSON' }}</span>\n                  </button>\n                }\n              </div>\n            </div>\n\n            <!-- TAB 1: YAML SPECIFICATION -->\n            <ui-tabs-content value=\"yaml\" class=\"mt-2 space-y-3 focus-visible:outline-hidden\">\n              <div\n                class=\"border-border bg-muted/40 relative overflow-hidden rounded-lg border font-mono text-xs shadow-xs\"\n              >\n                <!-- Code Header Bar -->\n                <div\n                  class=\"border-border/80 bg-muted/70 flex items-center justify-between border-b px-3 py-1.5 text-xs\"\n                >\n                  <div class=\"flex items-center gap-2\">\n                    <span class=\"bg-success size-2 rounded-full\"></span>\n                    <span class=\"text-foreground font-semibold\">orders_placed_v3.contract.yaml</span>\n                  </div>\n                  <div class=\"text-muted-foreground flex items-center gap-2\">\n                    <span>UTF-8</span>\n                    <span>YAML 1.2</span>\n                  </div>\n                </div>\n\n                <!-- Monospace YAML Viewer (one line per row: no stray whitespace under whitespace-pre) -->\n                <div [class]=\"yamlViewerClass()\">\n                  @for (line of yamlLines; track $index) {\n                    <div class=\"hover:bg-muted/50 flex leading-5\">\n                      <span\n                        class=\"text-muted-foreground/60 w-7 shrink-0 pr-3 text-right font-mono text-xs select-none\"\n                        >{{ $index + 1 }}</span\n                      ><span [class]=\"line.className\">{{ line.text }}</span>\n                    </div>\n                  }\n                </div>\n              </div>\n\n              <!-- Routing Details Strip -->\n              <ui-card class=\"border-border bg-card p-3 shadow-none\">\n                <div class=\"grid grid-cols-2 gap-2 font-mono text-xs\">\n                  <div class=\"space-y-0.5\">\n                    <span class=\"text-muted-foreground\">Kafka Cluster</span>\n                    <div class=\"text-foreground truncate font-medium\">prd-us-east-kafka.internal</div>\n                  </div>\n                  <div class=\"space-y-0.5\">\n                    <span class=\"text-muted-foreground\">Lakehouse Sync</span>\n                    <div class=\"text-foreground truncate font-medium\">Apache Iceberg (Parquet)</div>\n                  </div>\n                </div>\n              </ui-card>\n            </ui-tabs-content>\n\n            <!-- TAB 2: SCHEMA FIELDS EXPLORER -->\n            <ui-tabs-content value=\"schema\" class=\"mt-2 space-y-3 focus-visible:outline-hidden\">\n              <div class=\"border-border bg-card overflow-hidden rounded-lg border\">\n                <div ui-table>\n                  <thead ui-table-header class=\"bg-muted/40\">\n                    <tr ui-table-row class=\"hover:bg-transparent\">\n                      <th ui-table-head class=\"text-muted-foreground h-8 font-mono text-xs font-semibold\">\n                        Field Name\n                      </th>\n                      <th ui-table-head class=\"text-muted-foreground h-8 font-mono text-xs font-semibold\">Type</th>\n                      <th ui-table-head class=\"text-muted-foreground h-8 font-mono text-xs font-semibold\">\n                        Nullability\n                      </th>\n                      <th ui-table-head class=\"text-muted-foreground h-8 font-mono text-xs font-semibold\">\n                        Tags / Constraints\n                      </th>\n                    </tr>\n                  </thead>\n                  <tbody ui-table-body class=\"font-mono text-xs\">\n                    @for (field of schemaFields; track field.name) {\n                      <tr ui-table-row class=\"hover:bg-muted/30\">\n                        <td ui-table-cell class=\"py-2.5 font-medium\">\n                          <div class=\"flex items-center gap-1.5\">\n                            @if (field.isPrimaryKey) {\n                              <lucide-icon [img]=\"Key\" class=\"text-warning size-3\" />\n                            } @else if (field.isForeignKey) {\n                              <lucide-icon [img]=\"Link2\" class=\"text-info size-3\" />\n                            } @else if (field.isPii) {\n                              <lucide-icon [img]=\"Lock\" class=\"text-success size-3\" />\n                            }\n                            <span class=\"text-foreground\">{{ field.name }}</span>\n                          </div>\n                        </td>\n                        <td ui-table-cell class=\"py-2.5\">\n                          <span ui-badge variant=\"secondary\" class=\"font-mono text-xs\"\n                            >{{ field.dataType }}{{ field.format ? ' (' + field.format + ')' : '' }}</span\n                          >\n                        </td>\n                        <td ui-table-cell class=\"py-2.5\">\n                          <span ui-badge [variant]=\"field.nullable ? 'outline' : 'default'\" class=\"text-xs\">{{\n                            field.nullable ? 'nullable' : 'required'\n                          }}</span>\n                        </td>\n                        <td ui-table-cell class=\"py-2.5\">\n                          <div class=\"flex flex-col gap-0.5\">\n                            @if (field.isPii) {\n                              <span class=\"text-success font-semibold\">PII: {{ field.maskingStrategy }}</span>\n                            }\n                            <span class=\"text-muted-foreground text-xs\">{{ field.constraints }}</span>\n                          </div>\n                        </td>\n                      </tr>\n                    }\n                  </tbody>\n                </div>\n              </div>\n            </ui-tabs-content>\n\n            <!-- TAB 3: SLA SERVICE LEVEL AGREEMENTS -->\n            <ui-tabs-content value=\"sla\" class=\"mt-2 space-y-3 focus-visible:outline-hidden\">\n              <div class=\"grid grid-cols-1 gap-3\">\n                <!-- SLA Item 1: Latency -->\n                <ui-card class=\"border-border bg-card p-3.5 shadow-none\">\n                  <div class=\"flex items-start justify-between\">\n                    <div class=\"space-y-1\">\n                      <div class=\"flex items-center gap-1.5 text-xs font-semibold\">\n                        <lucide-icon [img]=\"Zap\" class=\"text-warning size-3.5\" />\n                        <span>Event Latency (p99)</span>\n                      </div>\n                      <p class=\"text-muted-foreground text-xs\">\n                        End-to-end event publication latency from checkout commit to Kafka broker.\n                      </p>\n                    </div>\n                    <span\n                      ui-badge\n                      variant=\"outline\"\n                      class=\"border-success/30 bg-success/10 text-success font-mono text-xs\"\n                    >\n                      Target &lt; 100ms\n                    </span>\n                  </div>\n                  <div\n                    class=\"border-border/60 bg-muted/30 mt-3 flex items-center justify-between rounded-md border p-2 font-mono text-xs\"\n                  >\n                    <span class=\"text-muted-foreground\">Observed 30-Day p99:</span>\n                    <span class=\"text-success font-bold\">42ms (Passing)</span>\n                  </div>\n                </ui-card>\n\n                <!-- SLA Item 2: Availability -->\n                <ui-card class=\"border-border bg-card p-3.5 shadow-none\">\n                  <div class=\"flex items-start justify-between\">\n                    <div class=\"space-y-1\">\n                      <div class=\"flex items-center gap-1.5 text-xs font-semibold\">\n                        <lucide-icon [img]=\"ShieldCheck\" class=\"text-success size-3.5\" />\n                        <span>Producer Availability</span>\n                      </div>\n                      <p class=\"text-muted-foreground text-xs\">\n                        Uptime commitment for producer event emission without message drops.\n                      </p>\n                    </div>\n                    <span\n                      ui-badge\n                      variant=\"outline\"\n                      class=\"border-success/30 bg-success/10 text-success font-mono text-xs\"\n                    >\n                      99.99% Guaranteed\n                    </span>\n                  </div>\n                  <div\n                    class=\"border-border/60 bg-muted/30 mt-3 flex items-center justify-between rounded-md border p-2 font-mono text-xs\"\n                  >\n                    <span class=\"text-muted-foreground\">Actual Rolling Uptime:</span>\n                    <span class=\"text-success font-bold\">99.995%</span>\n                  </div>\n                </ui-card>\n\n                <!-- SLA Item 3: Retention & Archival -->\n                <ui-card class=\"border-border bg-card p-3.5 shadow-none\">\n                  <div class=\"flex items-start justify-between\">\n                    <div class=\"space-y-1\">\n                      <div class=\"flex items-center gap-1.5 text-xs font-semibold\">\n                        <lucide-icon [img]=\"HardDrive\" class=\"text-info size-3.5\" />\n                        <span>Data Retention &amp; Tiering</span>\n                      </div>\n                      <p class=\"text-muted-foreground text-xs\">\n                        Hot retention on Apache Kafka broker topic with cold Iceberg archival.\n                      </p>\n                    </div>\n                    <span ui-badge variant=\"outline\" class=\"font-mono text-xs\">365 Days</span>\n                  </div>\n                  <div\n                    class=\"border-border/60 bg-muted/30 mt-3 flex items-center justify-between rounded-md border p-2 font-mono text-xs\"\n                  >\n                    <span class=\"text-muted-foreground\">Storage Tiers:</span>\n                    <span class=\"text-foreground font-medium\">Kafka 7d · Iceberg 365d</span>\n                  </div>\n                </ui-card>\n\n                <!-- SLA Item 4: Escalation Contacts -->\n                <ui-card class=\"border-border bg-card p-3.5 shadow-none\">\n                  <div class=\"space-y-1\">\n                    <div class=\"flex items-center gap-1.5 text-xs font-semibold\">\n                      <lucide-icon [img]=\"Users\" class=\"text-chart-2 size-3.5\" />\n                      <span>On-Call SLA Escalation</span>\n                    </div>\n                    <p class=\"text-muted-foreground text-xs\">\n                      Tier 1 Mission Critical Producer Squad: MTTA &lt; 5 mins, MTTR &lt; 15 mins.\n                    </p>\n                  </div>\n                  <div\n                    class=\"border-border/60 bg-muted/30 mt-2.5 flex items-center justify-between rounded-md border p-2 font-mono text-xs\"\n                  >\n                    <span class=\"text-muted-foreground\">Slack &amp; PagerDuty:</span>\n                    <span class=\"text-primary font-medium\">#checkout-eng-alerts</span>\n                  </div>\n                </ui-card>\n              </div>\n            </ui-tabs-content>\n          </ui-tabs>\n        </section>\n\n        <!-- RIGHT COLUMN: BREAKING CHANGE LINTER & VALIDATION ENGINE -->\n        <section class=\"bg-card flex flex-col space-y-6 p-4 sm:p-5 lg:col-span-7\">\n          <!-- Linter Section Header -->\n          <div class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n            <div>\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"ShieldCheck\" class=\"text-primary size-4\" />\n                <h3 class=\"text-sm font-semibold\">Breaking Change Linter &amp; Validation Engine</h3>\n              </div>\n              <p class=\"text-muted-foreground text-xs\">\n                Automated schema drift detection and backward compatibility verification\n              </p>\n            </div>\n\n            <!-- Linter Action Controls -->\n            <div class=\"flex items-center gap-2\">\n              <button\n                ui-button\n                variant=\"outline\"\n                size=\"sm\"\n                class=\"h-7 gap-1.5 text-xs font-medium\"\n                [disabled]=\"isRunningLinter()\"\n                (click)=\"handleRunLinter()\"\n              >\n                <lucide-icon [img]=\"RefreshCw\" [class]=\"linterIconClass()\" />\n                <span>{{ isRunningLinter() ? 'Linting...' : 'Re-run Linter' }}</span>\n              </button>\n            </div>\n          </div>\n\n          <!-- Linter Filters & Summary Bar -->\n          <div\n            class=\"border-border/70 bg-muted/20 flex flex-col gap-2 rounded-lg border p-3 sm:flex-row sm:items-center sm:justify-between\"\n          >\n            <div class=\"flex flex-wrap items-center gap-1.5\">\n              <button\n                ui-button\n                variant=\"ghost\"\n                size=\"sm\"\n                [class]=\"filterButtonClass('all')\"\n                (click)=\"selectedLinterFilter.set('all')\"\n              >\n                All Rules ({{ lintRules.length }})\n              </button>\n              <button\n                ui-button\n                variant=\"ghost\"\n                size=\"sm\"\n                [class]=\"filterButtonClass('breaking')\"\n                (click)=\"selectedLinterFilter.set('breaking')\"\n              >\n                Breaking Invariants (2)\n              </button>\n              <button\n                ui-button\n                variant=\"ghost\"\n                size=\"sm\"\n                [class]=\"filterButtonClass('compatibility')\"\n                (click)=\"selectedLinterFilter.set('compatibility')\"\n              >\n                Compatibility (2)\n              </button>\n              <button\n                ui-button\n                variant=\"ghost\"\n                size=\"sm\"\n                [class]=\"filterButtonClass('compliance')\"\n                (click)=\"selectedLinterFilter.set('compliance')\"\n              >\n                Compliance &amp; PII (2)\n              </button>\n            </div>\n\n            <span\n              ui-badge\n              variant=\"outline\"\n              class=\"border-success/30 bg-success/10 text-success font-mono text-xs font-semibold\"\n            >\n              {{ passingRulesCount }}/{{ lintRules.length }} Passing (100%)\n            </span>\n          </div>\n\n          <!-- LIVE BREAKING CHANGE TEST RUNNER CARDS -->\n          <div class=\"space-y-2.5\">\n            @for (rule of filteredLintRules(); track rule.id) {\n              <div class=\"border-border bg-card/60 hover:bg-muted/20 rounded-lg border p-3 transition-colors\">\n                <div class=\"flex items-start justify-between gap-3\">\n                  <div class=\"flex items-start gap-2.5\">\n                    <div class=\"mt-0.5\">\n                      @if (rule.status === 'pass') {\n                        <lucide-icon [img]=\"CheckCircle2\" class=\"text-success size-4\" />\n                      } @else if (rule.status === 'warn') {\n                        <lucide-icon [img]=\"AlertTriangle\" class=\"text-warning size-4\" />\n                      } @else {\n                        <lucide-icon [img]=\"AlertCircle\" class=\"text-destructive size-4\" />\n                      }\n                    </div>\n                    <div class=\"space-y-1\">\n                      <div class=\"flex flex-wrap items-center gap-2\">\n                        <span class=\"text-foreground font-mono text-xs font-bold\">{{ rule.name }}</span>\n                        <span ui-badge variant=\"secondary\" class=\"font-mono text-xs font-normal\">\n                          {{ rule.categoryLabel }}\n                        </span>\n                      </div>\n                      <p class=\"text-muted-foreground text-xs leading-relaxed\">{{ rule.ruleDefinition }}</p>\n                      <div\n                        class=\"border-border/60 bg-muted/40 text-muted-foreground inline-flex items-center gap-1.5 rounded px-2 py-0.5 font-mono text-xs\"\n                      >\n                        <lucide-icon [img]=\"Terminal\" class=\"text-info size-3\" />\n                        <span>{{ rule.assertionPath }}</span>\n                      </div>\n                    </div>\n                  </div>\n\n                  <div class=\"flex shrink-0 flex-col items-end gap-1\">\n                    <span\n                      ui-badge\n                      [variant]=\"rule.status === 'pass' ? 'outline' : 'destructive'\"\n                      class=\"border-success/30 bg-success/10 text-success font-mono text-xs font-bold\"\n                    >\n                      PASS\n                    </span>\n                    <span class=\"text-muted-foreground font-mono text-xs\">{{ rule.executionDuration }}</span>\n                  </div>\n                </div>\n              </div>\n            }\n          </div>\n\n          <ui-separator class=\"my-2\" />\n\n          <!-- ACTIVE CONSUMERS LIST -->\n          <div class=\"space-y-3\">\n            <div class=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n              <div>\n                <h4 class=\"text-muted-foreground text-xs font-semibold tracking-wider uppercase\">\n                  Registered Downstream Consumers ({{ consumerServices.length }})\n                </h4>\n                <p class=\"text-muted-foreground text-xs\">\n                  Active consumer services subscribing to topic\n                  <code class=\"text-foreground font-mono\">{{ destinationTopic }}</code>\n                </p>\n              </div>\n\n              <!-- Consumer Search Input -->\n              <div class=\"relative w-full sm:w-56\">\n                <!-- [class] (not class=) styles only the svg: the absolute offsets must not apply twice. -->\n                <lucide-icon\n                  [img]=\"Search\"\n                  [class]=\"'text-muted-foreground absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2'\"\n                />\n                <ui-input\n                  [value]=\"consumerSearch()\"\n                  (valueChange)=\"consumerSearch.set($event)\"\n                  placeholder=\"Filter consumers...\"\n                  class=\"h-7 pl-8 font-mono text-xs\"\n                />\n              </div>\n            </div>\n\n            <!-- Consumers Table -->\n            <div class=\"border-border bg-card overflow-hidden rounded-lg border\">\n              <div ui-table>\n                <thead ui-table-header class=\"bg-muted/40\">\n                  <tr ui-table-row class=\"hover:bg-transparent\">\n                    <th ui-table-head class=\"text-muted-foreground h-8 font-mono text-xs font-semibold\">\n                      Consumer Service\n                    </th>\n                    <th ui-table-head class=\"text-muted-foreground h-8 font-mono text-xs font-semibold\">\n                      Subscribed Ver\n                    </th>\n                    <th ui-table-head class=\"text-muted-foreground h-8 font-mono text-xs font-semibold\">\n                      Throughput &amp; SLA\n                    </th>\n                    <th ui-table-head class=\"text-muted-foreground h-8 font-mono text-xs font-semibold\">\n                      Compatibility\n                    </th>\n                  </tr>\n                </thead>\n                <tbody ui-table-body class=\"font-mono text-xs\">\n                  @for (consumer of filteredConsumers(); track consumer.id) {\n                    <tr ui-table-row class=\"hover:bg-muted/30\">\n                      <td ui-table-cell class=\"py-2.5\">\n                        <div class=\"space-y-0.5\">\n                          <div class=\"text-foreground font-bold\">{{ consumer.name }}</div>\n                          <div class=\"text-muted-foreground text-xs\">{{ consumer.team }} · {{ consumer.contact }}</div>\n                        </div>\n                      </td>\n                      <td ui-table-cell class=\"py-2.5\">\n                        <span\n                          ui-badge\n                          [variant]=\"consumer.versionStatus === 'current' ? 'secondary' : 'outline'\"\n                          class=\"font-mono text-xs\"\n                        >\n                          {{ consumer.versionSubscribed }}\n                        </span>\n                      </td>\n                      <td ui-table-cell class=\"py-2.5\">\n                        <div class=\"space-y-0.5\">\n                          <div class=\"text-foreground font-medium\">{{ consumer.throughput }}</div>\n                          <div class=\"text-success text-xs\">p99: {{ consumer.latencyP99 }} (OK)</div>\n                        </div>\n                      </td>\n                      <td ui-table-cell class=\"py-2.5\">\n                        <span\n                          ui-badge\n                          variant=\"outline\"\n                          class=\"border-success/30 bg-success/10 text-success font-mono text-xs font-medium\"\n                        >\n                          <lucide-icon [img]=\"Check\" class=\"text-success size-3\" />\n                          {{ consumer.compatibility }}\n                        </span>\n                      </td>\n                    </tr>\n                  }\n                </tbody>\n              </div>\n            </div>\n          </div>\n        </section>\n      </div>\n    </div>\n  `,\n})\nexport class UiDataContractGovernanceComponent {\n  @Input() contractTitle = 'orders_placed_v3.contract.yaml'\n  @Input() version = 'v3.2.0'\n  @Input() ownerTeam = 'Checkout Core Engineering Squad'\n  @Input() producerService = 'checkout-service-prod'\n  @Input() destinationTopic = 'events.orders.placed'\n  @Input() lakehouseTarget = 's3://lakehouse-analytics/tables/checkout/orders_placed_v3'\n  @Input('class') className?: string\n\n  protected readonly FileCode2 = FileCode2\n  protected readonly Tag = Tag\n  protected readonly ShieldCheck = ShieldCheck\n  protected readonly Users = Users\n  protected readonly Server = Server\n  protected readonly Radio = Radio\n  protected readonly Lock = Lock\n  protected readonly Download = Download\n  protected readonly Loader2 = Loader2\n  protected readonly Play = Play\n  protected readonly Activity = Activity\n  protected readonly CheckCircle2 = CheckCircle2\n  protected readonly Code2 = Code2\n  protected readonly FileCode = FileCode\n  protected readonly Table2 = Table2\n  protected readonly WrapText = WrapText\n  protected readonly Check = Check\n  protected readonly Copy = Copy\n  protected readonly FileJson = FileJson\n  protected readonly Key = Key\n  protected readonly Link2 = Link2\n  protected readonly Zap = Zap\n  protected readonly HardDrive = HardDrive\n  protected readonly RefreshCw = RefreshCw\n  protected readonly AlertTriangle = AlertTriangle\n  protected readonly AlertCircle = AlertCircle\n  protected readonly Terminal = Terminal\n  protected readonly Search = Search\n\n  protected readonly schemaFields = schemaFields\n  protected readonly lintRules = lintRules\n  protected readonly consumerServices = consumerServices\n  protected readonly yamlLines = yamlLines\n  protected readonly passingRulesCount = lintRules.filter((r) => r.status === 'pass').length\n\n  readonly activeInspectorTab = signal<DataContractInspectorTab>('yaml')\n  readonly selectedLinterFilter = signal<DataContractLinterFilter>('all')\n  readonly isValidatingYaml = signal(false)\n  readonly validationToast = signal<string | null>(null)\n  readonly isRunningLinter = signal(false)\n  readonly copiedYaml = signal(false)\n  readonly copiedSchema = signal(false)\n  readonly wrapYamlLines = signal(false)\n  readonly consumerSearch = signal('')\n  readonly lastValidatedTimestamp = signal('Just now')\n\n  readonly filteredLintRules = computed(() => {\n    const f = this.selectedLinterFilter()\n    if (f === 'all') return lintRules\n    return lintRules.filter((r) => r.category === f)\n  })\n\n  readonly filteredConsumers = computed(() => {\n    const q = this.consumerSearch().trim().toLowerCase()\n    if (!q) return consumerServices\n    return consumerServices.filter(\n      (c) =>\n        c.name.toLowerCase().includes(q) ||\n        c.team.toLowerCase().includes(q) ||\n        c.versionSubscribed.toLowerCase().includes(q) ||\n        c.compatibility.toLowerCase().includes(q),\n    )\n  })\n\n  private readonly timers = new Set<ReturnType<typeof setTimeout>>()\n\n  constructor() {\n    inject(DestroyRef).onDestroy(() => this.timers.forEach((t) => clearTimeout(t)))\n  }\n\n  protected get rootClass(): string {\n    return cn(\n      'border-border bg-card text-foreground flex w-full flex-col overflow-hidden rounded-xl border shadow-xs',\n      this.className,\n    )\n  }\n\n  protected yamlViewerClass(): string {\n    return cn('max-h-[540px] overflow-auto p-3', this.wrapYamlLines() ? 'whitespace-pre-wrap' : 'whitespace-pre')\n  }\n\n  protected linterIconClass(): string {\n    return cn('size-3', this.isRunningLinter() && 'animate-spin')\n  }\n\n  protected filterButtonClass(filter: DataContractLinterFilter): string {\n    return cn(filterButtonBase, this.selectedLinterFilter() === filter ? filterButtonActive : filterButtonIdle)\n  }\n\n  setInspectorTab(value: string): void {\n    this.activeInspectorTab.set(value as DataContractInspectorTab)\n  }\n\n  private later(fn: () => void, ms: number): void {\n    const t = setTimeout(() => {\n      this.timers.delete(t)\n      fn()\n    }, ms)\n    this.timers.add(t)\n  }\n\n  handleValidateContract(): void {\n    if (this.isValidatingYaml()) return\n    this.isValidatingYaml.set(true)\n    this.validationToast.set('Validating 6 linter invariants & 8 consumer vectors...')\n\n    this.later(() => {\n      this.isValidatingYaml.set(false)\n      this.lastValidatedTimestamp.set('Just now')\n      this.validationToast.set('Contract Validated · 0 Breaking Changes · 100% Compatible')\n      this.later(() => this.validationToast.set(null), 3500)\n    }, 750)\n  }\n\n  handleRunLinter(): void {\n    if (this.isRunningLinter()) return\n    this.isRunningLinter.set(true)\n    this.later(() => this.isRunningLinter.set(false), 600)\n  }\n\n  handleCopyYaml(): void {\n    if (typeof navigator !== 'undefined' && navigator.clipboard) {\n      void navigator.clipboard.writeText(rawYamlContract)\n      this.copiedYaml.set(true)\n      this.later(() => this.copiedYaml.set(false), 2000)\n    }\n  }\n\n  handleCopyJsonSchema(): void {\n    const jsonSchemaObj = {\n      $schema: 'http://json-schema.org/draft-07/schema#',\n      title: 'orders_placed',\n      description: 'Canonical production data contract for completed checkout orders across global storefronts.',\n      type: 'object',\n      required: schemaFields.filter((f) => !f.nullable).map((f) => f.name),\n      properties: Object.fromEntries(\n        schemaFields.map((f) => [\n          f.name,\n          {\n            type: f.dataType,\n            ...(f.format ? { format: f.format } : {}),\n            description: f.description,\n            ...(f.isPii ? { 'x-pii': true, 'x-masking': f.maskingStrategy } : {}),\n          },\n        ]),\n      ),\n    }\n\n    const jsonStr = JSON.stringify(jsonSchemaObj, null, 2)\n    if (typeof navigator !== 'undefined' && navigator.clipboard) {\n      void navigator.clipboard.writeText(jsonStr)\n      this.copiedSchema.set(true)\n      this.later(() => this.copiedSchema.set(false), 2000)\n    }\n  }\n\n  handleExportSchema(): void {\n    const jsonSchemaObj = {\n      $schema: 'http://json-schema.org/draft-07/schema#',\n      id: 'urn:datacontract:checkout:orders_placed',\n      version: this.version,\n      title: 'orders_placed',\n      owner: this.ownerTeam,\n      producer: this.producerService,\n      topic: this.destinationTopic,\n      exportedAt: new Date().toISOString(),\n      servicelevels: {\n        availability: '99.99%',\n        latencyP99: '< 100ms',\n        freshness: '< 5s CDC',\n        retention: '365d',\n      },\n      schema: {\n        type: 'object',\n        required: schemaFields.filter((f) => !f.nullable).map((f) => f.name),\n        properties: Object.fromEntries(\n          schemaFields.map((f) => [\n            f.name,\n            {\n              type: f.dataType,\n              ...(f.format ? { format: f.format } : {}),\n              description: f.description,\n              constraints: f.constraints,\n              ...(f.isPii ? { 'x-pii': true, 'x-masking': f.maskingStrategy } : {}),\n            },\n          ]),\n        ),\n      },\n    }\n\n    const blobData = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(jsonSchemaObj, null, 2))\n    if (typeof document !== 'undefined') {\n      const link = document.createElement('a')\n      link.setAttribute('href', blobData)\n      link.setAttribute('download', `${this.contractTitle.replace('.yaml', '')}.json`)\n      document.body.appendChild(link)\n      link.click()\n      link.remove()\n    }\n  }\n}\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/data-contract-governance/data-contract-governance.component.ts"
    },
    {
      "path": "packages/registry-angular/blocks/data-contract-governance/index.ts",
      "content": "export {\n  UiDataContractGovernanceComponent,\n  yamlLineClass,\n  type ConsumerService,\n  type DataContractInspectorTab,\n  type DataContractLinterFilter,\n  type LintTestRule,\n  type SchemaField,\n  type YamlLine,\n} from './data-contract-governance.component'\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/data-contract-governance/index.ts"
    }
  ],
  "dependencies": [
    "lucide-angular"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/angular/badge.json",
    "https://uipkge.dev/r/angular/button.json",
    "https://uipkge.dev/r/angular/card.json",
    "https://uipkge.dev/r/angular/input.json",
    "https://uipkge.dev/r/angular/separator.json",
    "https://uipkge.dev/r/angular/table.json",
    "https://uipkge.dev/r/angular/tabs.json"
  ],
  "description": "PayPal and OpenDataContract style Data Contracts specification editor, breaking change validator, and producer/consumer SLA agreements dashboard with YAML inspector, schema field explorer, live breaking change linter, and registered consumer status.",
  "categories": [
    "devops",
    "dashboard",
    "app",
    "data"
  ]
}