{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "news-card",
  "title": "News Card",
  "author": "ilinxa",
  "description": "Magazine-style news card in five sizes — role-aware editor and viewer modes, permissions matrix, badges, paywall and sensitivity gates.",
  "dependencies": [
    "lucide-react@^1.11.0"
  ],
  "registryDependencies": [
    "badge",
    "dropdown-menu",
    "@ilinxa/comment-thread"
  ],
  "files": [
    {
      "path": "src/registry/components/data/news-card/news-card.tsx",
      "content": "\"use client\";\n\nimport {\n  memo,\n  useCallback,\n  useEffect,\n  useId,\n  useImperativeHandle,\n  useMemo,\n  useRef,\n  useState,\n} from \"react\";\nimport type { MouseEvent } from \"react\";\nimport { defaultRelativeTime } from \"./hooks/use-relative-time\";\nimport { defaultDateFormat, toDate } from \"./lib/format-default\";\nimport { defaultNewsCardKebabActions } from \"./lib/defaults\";\nimport { resolveNewsCardPermissions } from \"./lib/permissions\";\nimport { FeaturedPart } from \"./parts/featured\";\nimport { LargePart } from \"./parts/large\";\nimport { MediumPart } from \"./parts/medium\";\nimport { SmallPart } from \"./parts/small\";\nimport { ListPart } from \"./parts/list\";\nimport {\n  DEFAULT_LABELS,\n  type NewsCardItem,\n  type NewsCardHandle,\n  type NewsCardProps,\n  type ResolvedPartProps,\n} from \"./types\";\n\n/**\n * NewsCard — magazine-style content card with 5 visual variants\n * dispatched via the `variant` prop (`featured` / `large` / `medium` / `small` / `list`).\n *\n * v0.3.0 grows the card into a backend-shaped composite — role-aware kebab,\n * permissions matrix, paywall + sensitive gates, badge stack, quoted-article\n * mini-card, light engagement counts (with slot-based engagement-bar\n * composition), per-entity click handlers, 11-method imperative handle, and\n * ~50 i18n label keys. All v0.2 behavior preserved when new props are absent.\n *\n * See the description doc at\n * docs/procomps/news-card-procomp/news-card-procomp-description-v0.3.0.md\n * for the full A+ trait set.\n */\nfunction NewsCardImpl(props: NewsCardProps) {\n  const {\n    item: itemProp,\n    variant = \"medium\",\n    href,\n    onClick,\n    linkComponent: LinkComponent = \"a\",\n    formatRelativeTime,\n    formatDate,\n    labels: labelsProp,\n    categoryStyles,\n    titleClassName,\n    imageClassName,\n    className,\n    ariaLabel: ariaLabelProp,\n    actions,\n    loading: loadingProp,\n\n    // v0.3 — role-aware\n    viewerMode,\n    permissions,\n    canPerformAction,\n\n    // v0.3 — slots\n    renderBadges,\n    renderAuthor,\n    renderExcerpt,\n    renderPaywallGate,\n    renderSensitiveGate,\n    renderQuoted,\n    renderEngagementCounts,\n    kebabActions,\n    moderatorActions,\n\n    // v0.3 — opt-outs\n    disableBadgesRender = false,\n    disableAuthorRender = false,\n    disableExcerptRender = false,\n    disablePaywallGate = false,\n    disableSensitiveGate = false,\n    disableQuotedRender = false,\n    disableEngagementCounts = false,\n\n    // v0.3 — engagement handlers\n    onLike,\n    onBookmark,\n    onShare,\n    onComment,\n    onCommentCountClick,\n\n    // v0.3 — per-entity click handlers\n    onAuthorClick,\n    onPublisherClick,\n    onCategoryClick,\n    onTopicClick,\n    onTagClick,\n    onQuotedClick,\n    onTranslate,\n    onRevealPaywall,\n    onRevealSensitive,\n\n    // v0.3 — mutation handlers (flattened from NewsCardMutationHandlers)\n    onEdit,\n    onDelete,\n    onPublish,\n    onUnpublish,\n    onSchedule,\n    onFeature,\n    onPin,\n    onChangeVisibility,\n    onChangeCategory,\n    onMarkSensitive,\n    onSeeAnalytics,\n    onPushToTop,\n    onReport,\n    onBlockAuthor,\n    onMuteAuthor,\n    onUnfollowTopic,\n\n    ref,\n  } = props;\n\n  // ─── Local mirror (R-Plan-1) ─────────────────────────────────────────────\n  const [statefulItem, setStatefulItem] = useState<NewsCardItem>(itemProp);\n  const [paywallRevealed, setPaywallRevealed] = useState(false);\n  const [sensitiveRevealed, setSensitiveRevealed] = useState(false);\n\n  // Use the prop as the source of truth in render path — the mirror only\n  // applies the local flags + any reset() override. v0.2 consumers pushing\n  // updates via prop changes still see fresh data (statefulItem follows\n  // itemProp implicitly via React's render).\n  const effectiveItem = statefulItem === itemProp ? itemProp : statefulItem;\n\n  // Dev-only, once per mount: `updatedAt` is accepted but nothing renders it.\n  const warnedUpdatedAtRef = useRef(false);\n  const hasUpdatedAt = effectiveItem.updatedAt != null;\n  useEffect(() => {\n    if (\n      process.env.NODE_ENV !== \"production\" &&\n      hasUpdatedAt &&\n      !warnedUpdatedAtRef.current\n    ) {\n      warnedUpdatedAtRef.current = true;\n      console.warn(\n        \"[news-card] `item.updatedAt` is not rendered yet: it is accepted but no \\\"(edited)\\\" marker is shown.\",\n      );\n    }\n  }, [hasUpdatedAt]);\n\n  // ─── Resolved labels + permissions ───────────────────────────────────────\n  const labels = useMemo(\n    () => ({ ...DEFAULT_LABELS, ...labelsProp }),\n    [labelsProp],\n  );\n\n  const resolvedPermissions = useMemo(\n    () => resolveNewsCardPermissions(viewerMode, permissions),\n    [viewerMode, permissions],\n  );\n\n  const canModerate = useMemo(() => {\n    if (canPerformAction) {\n      const r = canPerformAction(\"moderate\", effectiveItem);\n      if (r === true) return true;\n      if (r === false) return false;\n    }\n    return resolvedPermissions.canModerate;\n  }, [canPerformAction, effectiveItem, resolvedPermissions]);\n\n  // ─── Date/format derivations (v0.2 carry; now prefers publishedAt over date) ─\n  const dateSource = effectiveItem.publishedAt ?? effectiveItem.date;\n  const date = useMemo(() => toDate(dateSource), [dateSource]);\n\n  const formattedRelativeTime = useMemo(() => {\n    if (!date) return undefined;\n    return (formatRelativeTime ?? defaultRelativeTime)(date);\n  }, [date, formatRelativeTime]);\n\n  const formattedDate = useMemo(() => {\n    if (!date) return undefined;\n    return (formatDate ?? defaultDateFormat)(date);\n  }, [date, formatDate]);\n\n  const categoryStyle = useMemo(() => {\n    if (!effectiveItem.category) return \"bg-muted\";\n    return categoryStyles?.[effectiveItem.category] ?? \"bg-muted\";\n  }, [effectiveItem.category, categoryStyles]);\n\n  const titleId = useId();\n  const ariaLabel =\n    ariaLabelProp ?? `${labels.readArticlePrefix} ${effectiveItem.title}`;\n\n  const handleClick = useCallback(\n    (event: MouseEvent) => {\n      onClick?.({ item: effectiveItem, event });\n    },\n    [onClick, effectiveItem],\n  );\n\n  const loading: \"lazy\" | \"eager\" =\n    loadingProp ?? (variant === \"featured\" ? \"eager\" : \"lazy\");\n\n  // ─── Internal reveal callbacks (set local flag + fire analytics hook) ────\n  const onRevealPaywallInternal = useCallback(() => {\n    setPaywallRevealed(true);\n    onRevealPaywall?.(effectiveItem.id);\n  }, [effectiveItem.id, onRevealPaywall]);\n\n  const onRevealSensitiveInternal = useCallback(() => {\n    setSensitiveRevealed(true);\n    onRevealSensitive?.(effectiveItem.id);\n  }, [effectiveItem.id, onRevealSensitive]);\n\n  // ─── Engagement handlers pre-bound to item id ────────────────────────────\n  const engagementHandlers = useMemo(\n    () => ({\n      onLike: onLike\n        ? (nextLiked: boolean) => onLike(effectiveItem.id, nextLiked)\n        : undefined,\n      onComment: onCommentCountClick\n        ? () => onCommentCountClick(effectiveItem.id)\n        : onComment\n          ? () => onComment(effectiveItem.id)\n          : undefined,\n      onShare: onShare ? () => onShare(effectiveItem.id) : undefined,\n      onBookmark: onBookmark\n        ? (nextBookmarked: boolean) =>\n            onBookmark(effectiveItem.id, nextBookmarked)\n        : undefined,\n    }),\n    [effectiveItem.id, onLike, onComment, onCommentCountClick, onShare, onBookmark],\n  );\n\n  // ─── Kebab items (computed once via the default helper unless full-takeover slot supplied) ─\n  const boundTranslate = useMemo(() => {\n    if (!onTranslate || !effectiveItem.language) return undefined;\n    return () => onTranslate(effectiveItem.id, effectiveItem.language!);\n  }, [onTranslate, effectiveItem.id, effectiveItem.language]);\n\n  const kebabItems = useMemo(() => {\n    if (kebabActions) return kebabActions(effectiveItem);\n    return defaultNewsCardKebabActions({\n      item: effectiveItem,\n      engagementHandlers: { onBookmark, onShare },\n      miscHandlers: { onTranslate: boundTranslate },\n      viewerMode,\n      permissions,\n      canPerformAction,\n      mutationHandlers: {\n        onEdit,\n        onDelete,\n        onPublish,\n        onUnpublish,\n        onSchedule,\n        onFeature,\n        onPin,\n        onChangeVisibility,\n        onChangeCategory,\n        onMarkSensitive,\n        onSeeAnalytics,\n        onPushToTop,\n        onReport,\n        onBlockAuthor,\n        onMuteAuthor,\n        onUnfollowTopic,\n      },\n      moderatorActions,\n      labels: labelsProp,\n    });\n  }, [\n    kebabActions,\n    effectiveItem,\n    onBookmark,\n    onShare,\n    boundTranslate,\n    viewerMode,\n    permissions,\n    canPerformAction,\n    onEdit,\n    onDelete,\n    onPublish,\n    onUnpublish,\n    onSchedule,\n    onFeature,\n    onPin,\n    onChangeVisibility,\n    onChangeCategory,\n    onMarkSensitive,\n    onSeeAnalytics,\n    onPushToTop,\n    onReport,\n    onBlockAuthor,\n    onMuteAuthor,\n    onUnfollowTopic,\n    moderatorActions,\n    labelsProp,\n  ]);\n\n  // ─── Imperative handle (11 methods) ──────────────────────────────────────\n  const [kebabOpen, setKebabOpen] = useState(false);\n  // 0.4.5: `openKebab()` is a no-op when no item is visible — it used to arm the menu, which then\n  // popped open by itself once an item appeared.\n  const hasVisibleKebabRef = useRef(false);\n  useEffect(() => {\n    hasVisibleKebabRef.current = kebabItems.some((it) => !it.hidden);\n  });\n\n  useImperativeHandle(\n    ref,\n    (): NewsCardHandle => ({\n      /*\n       * v0.4.1 — was an empty body while `meta.ts` advertised an \"11-method\n       * imperative handle\". The trigger lives in whichever variant part is\n       * rendered, so the root could not reach it; the menu is now controlled\n       * from here and every variant forwards that state to its kebab.\n       */\n      openKebab: () => {\n        if (hasVisibleKebabRef.current) setKebabOpen(true);\n      },\n      triggerEdit: () => onEdit?.(effectiveItem.id),\n      triggerDelete: () => onDelete?.(effectiveItem.id),\n      triggerPublish: () => onPublish?.(effectiveItem.id),\n      triggerUnpublish: () => onUnpublish?.(effectiveItem.id),\n      triggerPin: () => onPin?.(effectiveItem.id, !effectiveItem.isPinned),\n      triggerFeature: () =>\n        onFeature?.(effectiveItem.id, !effectiveItem.isFeatured),\n      revealPaywall: onRevealPaywallInternal,\n      revealSensitive: onRevealSensitiveInternal,\n      reset: (next: NewsCardItem) => {\n        setStatefulItem(next);\n        setPaywallRevealed(false);\n        setSensitiveRevealed(false);\n      },\n      getCurrentItem: () => effectiveItem,\n    }),\n    [\n      effectiveItem,\n      onEdit,\n      onDelete,\n      onPublish,\n      onUnpublish,\n      onPin,\n      onFeature,\n      onRevealPaywallInternal,\n      onRevealSensitiveInternal,\n    ],\n  );\n\n  // ─── Resolved part-props bag ─────────────────────────────────────────────\n  const partProps: ResolvedPartProps = {\n    kebabOpen,\n    onKebabOpenChange: setKebabOpen,\n    item: effectiveItem,\n    formattedDate,\n    formattedRelativeTime,\n    categoryStyle,\n    labels,\n    LinkComponent,\n    href,\n    onClick: onClick ? handleClick : undefined,\n    ariaLabel,\n    titleId,\n    titleClassName,\n    imageClassName,\n    className,\n    actions,\n    loading,\n\n    // v0.3 — role-aware\n    viewerMode,\n    resolvedPermissions,\n    canModerate,\n\n    // v0.3 — local-mirror flags\n    paywallRevealed,\n    sensitiveRevealed,\n    onRevealPaywallInternal,\n    onRevealSensitiveInternal,\n\n    // v0.3 — render slots passthrough\n    renderBadges,\n    renderAuthor,\n    renderExcerpt,\n    renderPaywallGate,\n    renderSensitiveGate,\n    renderQuoted,\n    renderEngagementCounts,\n\n    // v0.3 — opt-outs passthrough\n    disableBadgesRender,\n    disableAuthorRender,\n    disableExcerptRender,\n    disablePaywallGate,\n    disableSensitiveGate,\n    disableQuotedRender,\n    disableEngagementCounts,\n\n    // v0.3 — handler bag + kebab + click handlers\n    engagementHandlers,\n    kebabItems,\n    onAuthorClick,\n    onPublisherClick,\n    onCategoryClick,\n    onTopicClick,\n    onTagClick,\n    onQuotedClick,\n  };\n\n  switch (variant) {\n    case \"featured\":\n      return <FeaturedPart {...partProps} />;\n    case \"large\":\n      return <LargePart {...partProps} />;\n    case \"small\":\n      return <SmallPart {...partProps} />;\n    case \"list\":\n      return <ListPart {...partProps} />;\n    case \"medium\":\n    default:\n      return <MediumPart {...partProps} />;\n  }\n}\n\nexport const NewsCard = memo(NewsCardImpl);\nNewsCard.displayName = \"NewsCard\";\n\nexport default NewsCard;\n\n// ─── Tail type re-exports (cross-procomp consumers) ──────────────────────────\n// Procomps that adapt to NewsCardItem must import these types from THIS\n// component-file path, not `./types`: the shadcn path rewriter preserves the\n// component-file path but mangles `/types` cross-procomp imports (F-S1).\nexport type {\n  NewsCardItem,\n  ContentStatus,\n  NewsArticleAuthor,\n  NewsPublisher,\n  NewsVisibility,\n  ContentSensitivity,\n  ContentPaywall,\n} from \"./types\";\n",
      "type": "registry:component",
      "target": "components/news-card/news-card.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/index.ts",
      "content": "// ─── Root component ─────────────────────────────────────────────────────────\nexport { NewsCard, default } from \"./news-card\";\n\n// ─── Public types (v0.2 carry + v0.3.0 additions) ───────────────────────────\nexport type {\n  // v0.2 carry\n  NewsCardItem,\n  NewsCardLabels,\n  NewsCardProps,\n  NewsCardVariant,\n  ResolvedPartProps,\n  // v0.3 — role-aware + permissions\n  NewsViewerMode,\n  NewsCardPermissionAction,\n  NewsCardPermissions,\n  NewsCardMutationHandlers,\n  NewsCardEngagementHandlers,\n  NewsCardClickHandlers,\n  NewsCardHandle,\n  // v0.3 — entity sub-types\n  NewsArticleAuthor,\n  NewsPublisher,\n  ContentStatus,\n  NewsVisibility,\n  ContentSensitivity,\n  ContentPaywall,\n} from \"./types\";\n\n// ─── Default constants (label dictionary) ───────────────────────────────────\nexport { DEFAULT_LABELS } from \"./types\";\n\n// ─── Hooks + format helpers (v0.2 carry) ────────────────────────────────────\nexport { defaultRelativeTime } from \"./hooks/use-relative-time\";\nexport { defaultDateFormat, toDate } from \"./lib/format-default\";\n\n// ─── v0.3 — permission resolver + kebab defaults ────────────────────────────\nexport {\n  resolveNewsCardPermissions,\n  canPerformActionInternal,\n  PERMISSION_DEFAULTS_BY_MODE,\n} from \"./lib/permissions\";\nexport {\n  defaultNewsCardKebabActions,\n  stripQuotedRecursion,\n} from \"./lib/defaults\";\n\n// ─── v0.3 — sub-exported parts (badge primitives + composites) ──────────────\n// Per description §10 #7: 6 main composite parts + 5 small badge primitives.\n// C5 ships the badge primitives + the badge-stack composite; C6 adds author/publisher;\n// C7-C10 add paywall/sensitive/quoted/engagement.\nexport { NewsBadges } from \"./parts/news-badges\";\nexport { StatusBadge } from \"./parts/status-badge\";\nexport { VisibilityBadge } from \"./parts/visibility-badge\";\nexport { SponsorBadge } from \"./parts/sponsor-badge\";\nexport { LiveUpdateLine } from \"./parts/live-update-line\";\nexport { NewsAuthorByline } from \"./parts/news-author-byline\";\nexport { NewsPublisherRow } from \"./parts/news-publisher-row\";\nexport { NewsPaywallGate } from \"./parts/news-paywall-gate\";\nexport { ContentSensitiveGate } from \"./parts/content-sensitive-gate\";\nexport { QuotedArticleCard } from \"./parts/quoted-article-card\";\nexport { NewsEngagementCounts } from \"./parts/news-engagement-counts\";\nexport { NewsKebab } from \"./parts/news-kebab\";\n\n// @ilinxa/news-card 0.4.5\n",
      "type": "registry:component",
      "target": "components/news-card/index.ts"
    },
    {
      "path": "src/registry/components/data/news-card/types.ts",
      "content": "import type { ElementType, MouseEvent, ReactNode, Ref } from \"react\";\n\n// F-S1 lock: cross-procomp imports use RELATIVE paths to specific files\n// (NOT barrels) so shadcn 4.6.0's path-rewriter doesn't mangle them.\n// See .claude/decisions/2026-05-28-post-card-v0.3.1-fcross-11-fs1-cleanup.md\nimport type { CommentMenuItem } from \"../comment-thread/types\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.2 surface (preserved unchanged — every v0.2.x consumer keeps working)\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport type NewsCardVariant =\n  | \"featured\"\n  | \"large\"\n  | \"medium\"\n  | \"small\"\n  | \"list\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Role-aware mode\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Two-mode toggle for role-aware kebab + render affordances.\n *  - `\"editor\"`: shows Edit / Delete / Publish / Unpublish / Schedule / Feature /\n *    Pin / Change visibility / Change category / Mark sensitive / See analytics /\n *    Push to top kebab items (when their handlers are wired and the matrix permits).\n *  - `\"viewer\"`: shows Report / Block author / Mute author / Unfollow topic\n *    (when wired and the matrix permits).\n *\n * **Opt-in semantics (per Q-D1 lock):** `viewerMode === undefined` → v0.2 legacy\n * mode (NO kebab rendered unless any of the new role-aware args is explicitly\n * set). No auto-derivation from any identity source — the host explicitly picks\n * the mode to keep the library neutral across identity / role models.\n *\n * **Moderator UX** (take-down, feature, lock, etc.) is **NOT** a third value —\n * moderation is an orthogonal capability that crosses editor / viewer lines.\n * Wire it via `permissions.canModerate: true` (or\n * `canPerformAction(\"moderate\", item) === true`) PLUS the\n * {@link NewsCardProps.moderatorActions} slot which supplies the menu items.\n * The moderator section renders between common items and viewer-destructive\n * items with a divider above it. Full kebab takeover via\n * {@link NewsCardProps.kebabActions} still bypasses everything.\n */\nexport type NewsViewerMode = \"editor\" | \"viewer\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Status + Visibility\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Lifecycle status of an article. CLOSED enum per Q-P31 — library owns the\n * full set so it can render canonical badges. Hosts with custom workflow\n * states should encode via {@link NewsVisibility} (which IS extensible).\n *\n * Rendering: only `\"draft\"` / `\"scheduled\"` / `\"archived\"` render a badge.\n * `\"published\"` is the implicit baseline and produces no badge.\n *\n * Editor-only: status badge renders only when `viewerMode === \"editor\"` per\n * Q-D10 lock. Readers never see the status chip.\n */\nexport type ContentStatus =\n  | \"draft\"\n  | \"scheduled\"\n  | \"published\"\n  | \"archived\";\n\n/**\n * Facebook-style extensible visibility/access-tier shape per Q-P30.\n *\n * Library renders default labels for the 5 base values via\n * `DEFAULT_LABELS`. Custom string values (e.g. `\"gold-tier\"`,\n * `\"employees-only\"`, `\"newsletter-subscribers\"`) get a fallback \"Custom\"\n * label. Granular host-specific tiers are encoded as their own string keys.\n *\n * - `\"public\"` — visible to everyone\n * - `\"members\"` — visible to logged-in members\n * - `\"subscribers\"` — visible to paying subscribers (paywall typically aligns to this tier)\n * - `\"staff\"` — visible to internal editorial / CMS users only\n * - `\"unlisted\"` — published but hidden from feeds / listings (URL access only)\n * - `(string & {})` — branded extension for host-specific tiers\n */\nexport type NewsVisibility =\n  | \"public\"\n  | \"members\"\n  | \"subscribers\"\n  | \"staff\"\n  | \"unlisted\"\n  | (string & {});\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Entity sub-types\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport interface NewsArticleAuthor {\n  id: string;\n  name: string;\n  /** Optional role label — \"Senior Editor\", \"Contributor\", \"Wire Reporter\". */\n  role?: string;\n  avatar?: string;\n  isVerified?: boolean;\n}\n\nexport interface NewsPublisher {\n  id: string;\n  name: string;\n  logo?: string;\n  slug?: string;\n}\n\nexport interface ContentSensitivity {\n  isSensitive: boolean;\n  reason?: string;\n  /** Specific content warnings — [\"graphic\", \"death\", \"violence\", \"nudity\"]. */\n  contentWarnings?: string[];\n}\n\n/**\n * Premium-gate over excerpt + media (per Q-P33). Distinct from\n * {@link ContentSensitivity} (monetization vs content-warning motivation; see\n * description §3.2).\n */\nexport interface ContentPaywall {\n  isPaywalled: boolean;\n  /** Subscription tier required to access — matches a {@link NewsVisibility} value. */\n  tier?: string;\n  /** First N words shown above the gate (renders inline when set). */\n  preview?: string;\n  /** Custom label on the CTA button. Defaults to \"Subscribe to read\" via labels. */\n  ctaLabel?: string;\n  /**\n   * When set, CTA renders as `<a href={ctaHref}>` (host can pass `linkComponent`\n   * to swap to Next/Remix link). `onClick` fires `onRevealPaywall(articleId)`\n   * BEFORE navigation as an analytics hook. When unset, CTA renders as\n   * `<button>` and only fires `onRevealPaywall`.\n   */\n  ctaHref?: string;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Extended NewsCardItem (31 new optional fields)\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport interface NewsCardItem {\n  // ─── v0.1 / v0.2 core (unchanged) ────────────────────────────────────────\n  /** Stable identifier. Used for React keys and the default ariaLabel. */\n  id: string;\n  /** Headline. Rendered in the H-tag appropriate for the variant. */\n  title: string;\n  /** Image URL. */\n  image: string;\n  /** Short summary or lead paragraph. Variants gracefully omit when absent. */\n  excerpt?: string;\n  /** Category / tag string. Used as a key into `categoryStyles`. */\n  category?: string;\n  /**\n   * Author byline as a plain string (legacy v0.1 shape). Stays for soft-compat.\n   * When {@link NewsCardItem.authorEntity} is also set, the structured\n   * version wins for rendering; this string is the fallback.\n   */\n  author?: string;\n  /**\n   * Publish date — ISO-8601 string or Date. Stays for soft-compat.\n   * When {@link NewsCardItem.publishedAt} is set, it wins; this is the fallback.\n   */\n  date?: string | Date;\n  /** Estimated read time in minutes. */\n  readTime?: number;\n  /** View count for engagement chip. Only `medium` renders this. */\n  views?: number;\n\n  // ─── v0.3.0 schema expansion (all optional; v0.2.x shape still satisfies) ─\n\n  /** URL slug — canonical-URL composition, deep-linking. */\n  slug?: string;\n\n  /** Structured author — wins over the string `author` field when both set. */\n  authorEntity?: NewsArticleAuthor;\n\n  /** Publisher / source — wire-service / multi-source attribution. */\n  publisher?: NewsPublisher;\n\n  /** Canonical published timestamp — wins over `date` when both set. */\n  publishedAt?: string | Date | number;\n  /**\n   * @notImplemented Timestamp of the last edit. Accepted but not rendered yet — no\n   * \"(edited)\" marker is shown anywhere. Passing it emits a dev-only warning\n   * (once per mount).\n   */\n  updatedAt?: string | Date | number;\n  /** Future timestamp when a `status: \"scheduled\"` article will publish. */\n  scheduledFor?: string | Date | number;\n\n  /** Lifecycle status. Only editor-mode renders the badge (Q-D10). */\n  status?: ContentStatus;\n  /** Audience / access tier. Renders a visibility badge in the badge stack. */\n  visibility?: NewsVisibility;\n  /** Topic taxonomy axis (separate from `category` / `tags`). */\n  topics?: string[];\n  /** Freeform hashtag-style chips. */\n  tags?: string[];\n  /** BCP-47 language tag. Drives `onTranslate` kebab item visibility. */\n  language?: string;\n  /** Languages this article is available in (data only in v0.3 — no render). */\n  availableTranslations?: string[];\n\n  /** Pinned articles render a \"Pinned\" badge. */\n  isPinned?: boolean;\n  /** Featured articles render a \"Featured\" badge. */\n  isFeatured?: boolean;\n  /** Breaking-news articles render a \"Breaking\" badge. Highest priority. */\n  isBreaking?: boolean;\n  /** Live-blog articles render a \"Live\" badge + optional live-update sub-line. */\n  isLive?: boolean;\n  /** Exclusive content renders an \"Exclusive\" badge. */\n  isExclusive?: boolean;\n  /** Sponsored content renders a \"Sponsored\" badge. */\n  isSponsored?: boolean;\n  /** Optional sponsor name — renders as \"Sponsored by {name}\" when set. */\n  sponsorLabel?: string;\n\n  /** Number of live updates posted (only meaningful when `isLive`). */\n  liveUpdateCount?: number;\n  /** Timestamp of the most-recent live update. */\n  lastLiveUpdateAt?: string | Date | number;\n\n  /** Sensitive-content gate (per-card). */\n  sensitivity?: ContentSensitivity;\n  /** Paywall gate (per-card). */\n  paywall?: ContentPaywall;\n\n  /** When false, comment-count chip is suppressed regardless of `commentCount`. */\n  commentsEnabled?: boolean;\n  /** Comment count for engagement chip. */\n  commentCount?: number;\n  /** Like count for engagement chip. */\n  likeCount?: number;\n  /** Whether the current viewer has liked this article. */\n  isLiked?: boolean;\n  /** Bookmark count for engagement chip. */\n  bookmarkCount?: number;\n  /** Whether the current viewer has bookmarked this article. */\n  isBookmarked?: boolean;\n  /** Share count for engagement chip. */\n  shareCount?: number;\n\n  /**\n   * Quoted / referenced parent article — renders as a nested compact mini-card.\n   * Recursion-strip applies: the inner card's own `quotedArticle` is ignored\n   * (no infinite nesting). Per Q-P32 + Q-PE renders only in `medium` + `list`\n   * variants.\n   */\n  quotedArticle?: NewsCardItem;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Permissions matrix\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Discriminator for the universal {@link NewsCardProps.canPerformAction}\n * predicate. 19 actions spanning editor / host-policy / reader / moderator.\n */\nexport type NewsCardPermissionAction =\n  // editor-side (12)\n  | \"edit\"\n  | \"delete\"\n  | \"publish\"\n  | \"unpublish\"\n  | \"schedule\"\n  | \"feature\"\n  | \"pin\"\n  | \"changeVisibility\"\n  | \"changeCategory\"\n  | \"markSensitive\"\n  | \"seeAnalytics\"\n  | \"pushToTop\"\n  // host-policy gates (2)\n  | \"share\"\n  | \"bookmark\"\n  // reader-side (4)\n  | \"report\"\n  | \"blockAuthor\"\n  | \"muteAuthor\"\n  | \"unfollowTopic\"\n  // moderator (1)\n  | \"moderate\";\n\n/**\n * Per-action permissions matrix. Overrides the `viewerMode`-derived defaults.\n *\n * **Resolution order (most → least specific):**\n *  1. `canPerformAction(action, item)` returning `true` / `false` — wins everything\n *  2. `permissions[canX]` per-field — `false` denies, `true` allows\n *  3. `viewerMode`-derived defaults (`\"editor\"` → editor-side `true`, reader-side `false`; `\"viewer\"` → inverse)\n *  4. Library-baseline default (legacy mode — no `viewerMode` + no `permissions` + no `canPerformAction`): no kebab rendered\n *\n * `canShare` / `canBookmark` are **host-policy gates** — reader-side actions\n * whose visibility the host can deny (e.g. paywalled articles may hide Share\n * for non-subscribers).\n *\n * `canModerate` is **orthogonal** to editor / viewer modes. When `true` AND\n * {@link NewsCardProps.moderatorActions} returns ≥1 item, the kebab\n * renders a moderator section between common items and reader-destructive\n * items with a divider above. Defaults to `false` in both viewer modes.\n */\nexport interface NewsCardPermissions {\n  // editor-side (12)\n  canEdit?: boolean;\n  canDelete?: boolean;\n  canPublish?: boolean;\n  canUnpublish?: boolean;\n  canSchedule?: boolean;\n  canFeature?: boolean;\n  canPin?: boolean;\n  canChangeVisibility?: boolean;\n  canChangeCategory?: boolean;\n  canMarkSensitive?: boolean;\n  canSeeAnalytics?: boolean;\n  canPushToTop?: boolean;\n  // host-policy gates (2)\n  canShare?: boolean;\n  canBookmark?: boolean;\n  // reader-side (4)\n  canReport?: boolean;\n  canBlockAuthor?: boolean;\n  canMuteAuthor?: boolean;\n  canUnfollowTopic?: boolean;\n  // moderator (1)\n  canModerate?: boolean;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Mutation handlers (separate from engagement)\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Editor + reader mutation handlers. Flattened onto {@link NewsCardProps}\n * (not a nested prop bag).\n *\n * **Picker-free contract (Q-P40):** `onChangeVisibility`, `onChangeCategory`,\n * `onSchedule` are single triggers — library does NOT ship picker UIs. Host\n * opens its own picker (sheet / dialog / inline form) and calls back to its\n * API directly. Library only receives the trigger event.\n */\nexport interface NewsCardMutationHandlers {\n  // editor-side (12)\n  onEdit?: (articleId: string) => void;\n  onDelete?: (articleId: string) => void;\n  onPublish?: (articleId: string) => void;\n  onUnpublish?: (articleId: string) => void;\n  onSchedule?: (\n    articleId: string,\n    currentScheduledFor: Date | undefined,\n  ) => void;\n  onFeature?: (articleId: string, nextFeatured: boolean) => void;\n  onPin?: (articleId: string, nextPinned: boolean) => void;\n  onChangeVisibility?: (\n    articleId: string,\n    currentVisibility: NewsVisibility | undefined,\n  ) => void;\n  onChangeCategory?: (\n    articleId: string,\n    currentCategory: string | undefined,\n  ) => void;\n  onMarkSensitive?: (\n    articleId: string,\n    nextSensitive: boolean,\n    reason?: string,\n  ) => void;\n  onSeeAnalytics?: (articleId: string) => void;\n  onPushToTop?: (articleId: string) => void;\n  // reader-side (4)\n  onReport?: (articleId: string) => void;\n  onBlockAuthor?: (authorId: string) => void;\n  onMuteAuthor?: (authorId: string) => void;\n  onUnfollowTopic?: (topic: string) => void;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Engagement handlers (light count-chip model per Q-P35)\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Engagement handlers for the light count-chip model. NOT a full\n * engagement-bar composition (Q-D6=(a)). Consumers who want the full bar\n * pass `<EngagementBar>` into the `renderEngagementCounts` slot — the same\n * handlers below are pre-wired into the slot's `helpers` bag.\n */\nexport interface NewsCardEngagementHandlers {\n  onLike?: (articleId: string, nextLiked: boolean) => void;\n  onBookmark?: (articleId: string, nextBookmarked: boolean) => void;\n  onShare?: (articleId: string) => void;\n  /** Fired when the comment-count chip is tapped. Host navigates to article + jumps to comments. */\n  onCommentCountClick?: (articleId: string) => void;\n  /** Alias for {@link onCommentCountClick} — kept for symmetry with post-card. */\n  onComment?: (articleId: string) => void;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Labels (~49 new keys per description §9)\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport interface NewsCardLabels {\n  // ─── v0.2 labels (5) — preserved ──────────────────────────────────────────\n  /** Featured-variant CTA label. Default: 'Read More'. */\n  readMore?: string;\n  /** Compact \"min\" suffix for `large` variant. Default: 'min'. */\n  minutesShort?: string;\n  /** Long \"min read\" suffix for `featured` variant. Default: 'min read'. */\n  minutesRead?: string;\n  /** Visually-hidden label prefix on the link. Default: 'Read article:'. */\n  readArticlePrefix?: string;\n  /** aria-label suffix on the views chip. Default: 'views'. */\n  viewsLabel?: string;\n\n  // ─── v0.3.0 kebab labels (22) ─────────────────────────────────────────────\n  /** Editor-side kebab item. Default \"Edit\". */\n  edit?: string;\n  /** Editor-side kebab item. Default \"Delete\". */\n  delete?: string;\n  /** Editor-side kebab item when `status !== \"published\"`. Default \"Publish\". */\n  publish?: string;\n  /** Editor-side kebab item when `status === \"published\"`. Default \"Unpublish\". */\n  unpublish?: string;\n  /** Editor-side kebab item. Default \"Schedule\". */\n  schedule?: string;\n  /** Editor-side kebab item when not featured. Default \"Feature\". */\n  feature?: string;\n  /** Editor-side kebab item when featured. Default \"Unfeature\". */\n  unfeature?: string;\n  /** Editor-side kebab item when not pinned. Default \"Pin to top\". */\n  pin?: string;\n  /** Editor-side kebab item when pinned. Default \"Unpin\". */\n  unpin?: string;\n  /** Editor-side kebab item. Default \"Change visibility\". */\n  changeVisibility?: string;\n  /** Editor-side kebab item. Default \"Change category\". */\n  changeCategory?: string;\n  /** Editor-side kebab item when not sensitive. Default \"Mark as sensitive\". */\n  markSensitive?: string;\n  /** Editor-side kebab item when sensitive. Default \"Remove sensitive mark\". */\n  unmarkSensitive?: string;\n  /** Editor-side kebab item. Default \"See analytics\". */\n  seeAnalytics?: string;\n  /** Editor-side kebab item. Default \"Push to top of feed\". */\n  pushToTop?: string;\n  /** Common kebab item when not bookmarked. Default \"Bookmark\". */\n  bookmark?: string;\n  /** Common kebab item when bookmarked. Default \"Remove bookmark\". */\n  unbookmark?: string;\n  /** Common kebab item. Default \"Share\". */\n  share?: string;\n  /** Common kebab item. Default \"Copy link\". */\n  copyLink?: string;\n  /** Common kebab item (visible when `item.language` set). Default \"Translate\". */\n  translate?: string;\n  /** Reader-side kebab item. Default \"Report\". */\n  report?: string;\n  /** Reader-side kebab item. Default \"Block author\". */\n  blockAuthor?: string;\n  /** Reader-side kebab item. Default \"Mute author\". */\n  muteAuthor?: string;\n  /** Reader-side kebab item. Default \"Unfollow topic\". */\n  unfollowTopic?: string;\n\n  // ─── v0.3.0 visibility labels (6) ─────────────────────────────────────────\n  /** Visibility badge label for `\"public\"`. Default \"Public\". */\n  visibilityPublic?: string;\n  /** Visibility badge label for `\"members\"`. Default \"Members\". */\n  visibilityMembers?: string;\n  /** Visibility badge label for `\"subscribers\"`. Default \"Subscribers\". */\n  visibilitySubscribers?: string;\n  /** Visibility badge label for `\"staff\"`. Default \"Staff\". */\n  visibilityStaff?: string;\n  /** Visibility badge label for `\"unlisted\"`. Default \"Unlisted\". */\n  visibilityUnlisted?: string;\n  /** Fallback label for any custom visibility string. Default \"Custom\". */\n  visibilityCustom?: string;\n\n  // ─── v0.3.0 status labels (3 — `\"published\"` produces no badge) ───────────\n  /** Status badge text when draft. Default \"Draft\". */\n  statusDraft?: string;\n  /** Status badge text when scheduled. Default \"Scheduled\". */\n  statusScheduled?: string;\n  /** Status badge text when archived. Default \"Archived\". */\n  statusArchived?: string;\n\n  // ─── v0.3.0 editorial badge labels (6) ────────────────────────────────────\n  /** \"Pinned\" badge text. Default \"Pinned\". */\n  pinnedBadgeLabel?: string;\n  /** \"Featured\" badge text. Default \"Featured\". */\n  featuredBadgeLabel?: string;\n  /** \"Breaking\" badge text. Default \"Breaking\". */\n  breakingBadgeLabel?: string;\n  /** \"Live\" badge text. Default \"Live\". */\n  liveBadgeLabel?: string;\n  /** \"Exclusive\" badge text. Default \"Exclusive\". */\n  exclusiveBadgeLabel?: string;\n  /**\n   * \"Sponsored\" badge template. `{name}` is replaced with `sponsorLabel`.\n   * When `sponsorLabel` is not set, falls back to {@link sponsoredBadgeFallback}.\n   * Default \"Sponsored by {name}\".\n   */\n  sponsoredBadgeLabelTemplate?: string;\n  /** Fallback when `sponsorLabel` is not set. Default \"Sponsored\". */\n  sponsoredBadgeFallback?: string;\n\n  // ─── v0.3.0 paywall labels (4) ────────────────────────────────────────────\n  /** Paywall gate heading. Default \"Premium content\". */\n  paywallHeading?: string;\n  /** Default CTA when `paywall.ctaLabel` is not set. Default \"Subscribe to read\". */\n  paywallDefaultCta?: string;\n  /** aria-label on the blurred overlay region. Default \"Premium content — subscription required\". */\n  paywallBlurredOverlayAria?: string;\n  /** Visual separator between `paywall.preview` text and the gate. Default \"…\". */\n  paywallPreviewSeparator?: string;\n\n  // ─── v0.3.0 sensitive labels (3) ──────────────────────────────────────────\n  /** Sensitive-content gate heading. Default \"Sensitive content\". */\n  sensitiveHeading?: string;\n  /** Sensitive-content gate reveal button. Default \"Show\". */\n  sensitiveRevealLabel?: string;\n  /** Content-warning template; `{warnings}` is replaced with the joined warnings. Default \"Contains: {warnings}\". */\n  sensitiveContentWarningTemplate?: string;\n\n  // ─── v0.3.0 engagement labels (4) ─────────────────────────────────────────\n  /** aria-label template on the like chip. `{count}` is replaced. Default \"{count} likes\". */\n  likeAriaLabel?: string;\n  /** aria-label template on the comment chip. `{count}` is replaced. Default \"{count} comments\". */\n  commentAriaLabel?: string;\n  /** aria-label template on the bookmark chip. `{count}` is replaced. Default \"{count} bookmarks\". */\n  bookmarkAriaLabel?: string;\n  /** aria-label template on the share chip. `{count}` is replaced. Default \"{count} shares\". */\n  shareAriaLabel?: string;\n\n  // ─── v0.3.0 live-blog label (1) ───────────────────────────────────────────\n  /** Live-update sub-line template; `{time}` + `{count}` are replaced. Default \"Updated {time} · {count} updates\". */\n  liveUpdatedTemplate?: string;\n\n  // ─── v0.3.0 verified-byline label (1 extra for parallelism with post-card) ─\n  /** aria-label on the verified-author check icon. Default \"Verified author\". */\n  verifiedAuthorLabel?: string;\n}\n\n/**\n * Defaults — English. Hosts override via the {@link NewsCardProps.labels}\n * prop, which deep-merges into this object.\n */\nexport const DEFAULT_LABELS: Required<NewsCardLabels> = {\n  // v0.2\n  readMore: \"Read More\",\n  minutesShort: \"min\",\n  minutesRead: \"min read\",\n  readArticlePrefix: \"Read article:\",\n  viewsLabel: \"views\",\n\n  // v0.3 — kebab\n  edit: \"Edit\",\n  delete: \"Delete\",\n  publish: \"Publish\",\n  unpublish: \"Unpublish\",\n  schedule: \"Schedule\",\n  feature: \"Feature\",\n  unfeature: \"Unfeature\",\n  pin: \"Pin to top\",\n  unpin: \"Unpin\",\n  changeVisibility: \"Change visibility\",\n  changeCategory: \"Change category\",\n  markSensitive: \"Mark as sensitive\",\n  unmarkSensitive: \"Remove sensitive mark\",\n  seeAnalytics: \"See analytics\",\n  pushToTop: \"Push to top of feed\",\n  bookmark: \"Bookmark\",\n  unbookmark: \"Remove bookmark\",\n  share: \"Share\",\n  copyLink: \"Copy link\",\n  translate: \"Translate\",\n  report: \"Report\",\n  blockAuthor: \"Block author\",\n  muteAuthor: \"Mute author\",\n  unfollowTopic: \"Unfollow topic\",\n\n  // v0.3 — visibility\n  visibilityPublic: \"Public\",\n  visibilityMembers: \"Members\",\n  visibilitySubscribers: \"Subscribers\",\n  visibilityStaff: \"Staff\",\n  visibilityUnlisted: \"Unlisted\",\n  visibilityCustom: \"Custom\",\n\n  // v0.3 — status\n  statusDraft: \"Draft\",\n  statusScheduled: \"Scheduled\",\n  statusArchived: \"Archived\",\n\n  // v0.3 — editorial badges\n  pinnedBadgeLabel: \"Pinned\",\n  featuredBadgeLabel: \"Featured\",\n  breakingBadgeLabel: \"Breaking\",\n  liveBadgeLabel: \"Live\",\n  exclusiveBadgeLabel: \"Exclusive\",\n  sponsoredBadgeLabelTemplate: \"Sponsored by {name}\",\n  sponsoredBadgeFallback: \"Sponsored\",\n\n  // v0.3 — paywall\n  paywallHeading: \"Premium content\",\n  paywallDefaultCta: \"Subscribe to read\",\n  paywallBlurredOverlayAria: \"Premium content — subscription required\",\n  paywallPreviewSeparator: \"…\",\n\n  // v0.3 — sensitive\n  sensitiveHeading: \"Sensitive content\",\n  sensitiveRevealLabel: \"Show\",\n  sensitiveContentWarningTemplate: \"Contains: {warnings}\",\n\n  // v0.3 — engagement\n  likeAriaLabel: \"{count} likes\",\n  commentAriaLabel: \"{count} comments\",\n  bookmarkAriaLabel: \"{count} bookmarks\",\n  shareAriaLabel: \"{count} shares\",\n\n  // v0.3 — live\n  liveUpdatedTemplate: \"Updated {time} · {count} updates\",\n\n  // v0.3 — verified\n  verifiedAuthorLabel: \"Verified author\",\n};\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Imperative handle (11 methods)\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Imperative escape hatch for CMS dashboards / bulk-action UIs.\n *\n * Handle methods **bypass the permissions matrix** — they fire the underlying\n * handler regardless of whether the kebab item is visible. The matrix gates\n * UI affordances (which items render); the handle gates programmatic intent.\n * If a handler isn't wired, the method is a no-op.\n */\nexport interface NewsCardHandle {\n  openKebab: () => void;\n  /** Fires `onEdit(item.id)` if wired. No-op otherwise. */\n  triggerEdit: () => void;\n  /** Fires `onDelete(item.id)` if wired. No-op otherwise. */\n  triggerDelete: () => void;\n  /** Fires `onPublish(item.id)` if wired. No-op otherwise. */\n  triggerPublish: () => void;\n  /** Fires `onUnpublish(item.id)` if wired. No-op otherwise. */\n  triggerUnpublish: () => void;\n  /** Fires `onPin(item.id, !item.isPinned)` if wired. No-op otherwise. */\n  triggerPin: () => void;\n  /** Fires `onFeature(item.id, !item.isFeatured)` if wired. No-op otherwise. */\n  triggerFeature: () => void;\n  /** Sets local `paywallRevealed=true` + fires `onRevealPaywall(item.id)` if wired. */\n  revealPaywall: () => void;\n  /** Sets local `sensitiveRevealed=true` + fires `onRevealSensitive(item.id)` if wired. */\n  revealSensitive: () => void;\n  /** Replace the item — re-derives local mirror; clears `paywallRevealed` + `sensitiveRevealed`. */\n  reset: (next: NewsCardItem) => void;\n  /** Read the current local mirror state (item + any local flags applied). */\n  getCurrentItem: () => NewsCardItem;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Per-entity click handlers\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Click handlers for nested entities. Each fires when the corresponding\n * inline element is tapped — host opens its own profile / topic / tag /\n * category routes.\n */\nexport interface NewsCardClickHandlers {\n  onAuthorClick?: (author: NewsArticleAuthor) => void;\n  onPublisherClick?: (publisher: NewsPublisher) => void;\n  onCategoryClick?: (category: string) => void;\n  onTopicClick?: (topic: string) => void;\n  onTagClick?: (tag: string) => void;\n  /** Fired when the nested quoted-article mini-card is tapped. */\n  onQuotedClick?: (quotedArticle: NewsCardItem) => void;\n  /** Fired when the kebab \"Translate\" item is tapped (visible only if `item.language` set). */\n  onTranslate?: (articleId: string, sourceLanguage: string) => void;\n  /** Analytics hook — fires when the paywall CTA is tapped. */\n  onRevealPaywall?: (articleId: string) => void;\n  /** Analytics hook — fires when the sensitive-gate reveal button is tapped. */\n  onRevealSensitive?: (articleId: string) => void;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// v0.3.0 — Main props interface\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport interface NewsCardProps\n  extends NewsCardMutationHandlers,\n    NewsCardEngagementHandlers,\n    NewsCardClickHandlers {\n  /** The item to render. */\n  item: NewsCardItem;\n\n  /** Visual variant. Default: 'medium'. */\n  variant?: NewsCardVariant;\n\n  /** URL the card links to. */\n  href?: string;\n  /**\n   * Click handler — object-shape, fired before navigation if `href` is also\n   * set. v0.2 cutover stays — canonical `onClick` carries the object shape.\n   */\n  onClick?: (args: { item: NewsCardItem; event: MouseEvent }) => void;\n  /** Element used for the link. Default: 'a'. Pass NextLink / RemixLink / etc. */\n  linkComponent?: ElementType;\n\n  /** Custom relative-time formatter. Default: English. */\n  formatRelativeTime?: (date: Date, now?: Date) => string;\n  /** Custom absolute-date formatter. Default: browser locale long format. */\n  formatDate?: (date: Date) => string;\n  /** Localized labels. Defaults are English. */\n  labels?: NewsCardLabels;\n\n  /** Map of category → Tailwind class string. Falls back to `bg-muted` when absent. */\n  categoryStyles?: Record<string, string>;\n  /** Override classes for the title. */\n  titleClassName?: string;\n  /** Override classes for the image. */\n  imageClassName?: string;\n  /** Override classes for the root <article>. */\n  className?: string;\n\n  /** Override the link's accessible name. Default: '<readArticlePrefix> <title>'. */\n  ariaLabel?: string;\n\n  /** Optional cluster of buttons/links sitting ABOVE the link overlay (z-10). */\n  actions?: ReactNode;\n\n  /** Image loading strategy. Default: 'lazy' ('eager' for `featured`). */\n  loading?: \"lazy\" | \"eager\";\n\n  // ─── v0.3.0 role-aware mode (opt-in per Q-D1 lock) ───────────────────────\n\n  /**\n   * Two-mode toggle for role-aware kebab + render affordances. `undefined` =\n   * v0.2 legacy mode (no kebab rendered unless any role-aware arg is set).\n   * No auto-derivation — host explicitly picks.\n   */\n  viewerMode?: NewsViewerMode;\n  /** Per-action permissions matrix. Overrides `viewerMode`-derived defaults. */\n  permissions?: NewsCardPermissions;\n  /**\n   * Universal permission predicate — wins over `permissions` + `viewerMode`.\n   * Return `true` / `false` to force-allow / deny; return `undefined` to fall\n   * through to the matrix → mode defaults → legacy mode.\n   */\n  canPerformAction?: (\n    action: NewsCardPermissionAction,\n    item: NewsCardItem,\n  ) => boolean | undefined;\n\n  // ─── v0.3.0 render slots (7 sub-feature + kebab + moderator) ─────────────\n\n  /** Full takeover for the badge stack. Default renders `<NewsBadges>`. */\n  renderBadges?: (\n    item: NewsCardItem,\n    helpers: { canModerate: boolean },\n  ) => ReactNode;\n  /** Full takeover for the author byline. Default renders `<NewsAuthorByline>`. */\n  renderAuthor?: (\n    author: NewsArticleAuthor | string | undefined,\n    helpers: { publisher: NewsPublisher | undefined },\n  ) => ReactNode;\n  /** Full takeover for the excerpt. Default renders the string from `item.excerpt`. */\n  renderExcerpt?: (item: NewsCardItem) => ReactNode;\n  /** Full takeover for the paywall gate. Default renders `<NewsPaywallGate>` when `item.paywall.isPaywalled`. */\n  renderPaywallGate?: (\n    item: NewsCardItem,\n    helpers: { onReveal: () => void },\n  ) => ReactNode;\n  /** Full takeover for the sensitive-content gate. Default renders `<ContentSensitiveGate>` when `item.sensitivity.isSensitive`. */\n  renderSensitiveGate?: (\n    item: NewsCardItem,\n    helpers: { onReveal: () => void },\n  ) => ReactNode;\n  /** Full takeover for the quoted-article mini-card. Default renders `<QuotedArticleCard>` when `item.quotedArticle` set. */\n  renderQuoted?: (\n    item: NewsCardItem,\n    helpers: { onClick?: () => void },\n  ) => ReactNode;\n  /**\n   * Full takeover for the engagement counts row. Default renders\n   * `<NewsEngagementCounts>` (light count chips). Consumers compose\n   * `<EngagementBar>` here for the news article detail page (see\n   * description §6.2 — the news-detail-page composition pattern).\n   */\n  renderEngagementCounts?: (\n    item: NewsCardItem,\n    helpers: {\n      handlers: {\n        onLike?: NewsCardProps[\"onLike\"];\n        onComment?: NewsCardProps[\"onCommentCountClick\"];\n        onShare?: NewsCardProps[\"onShare\"];\n        onBookmark?: NewsCardProps[\"onBookmark\"];\n      };\n    },\n  ) => ReactNode;\n  /**\n   * Kebab full-takeover slot. When supplied, all default items + moderator\n   * section + permission gating are bypassed; host's items render verbatim.\n   */\n  kebabActions?: (item: NewsCardItem) => CommentMenuItem[];\n  /**\n   * Supplier for the moderator section of the kebab. Items render only when\n   * `canModerate` resolves to `true`. Bypassed entirely when `kebabActions`\n   * full-takeover slot is supplied.\n   */\n  moderatorActions?: (item: NewsCardItem) => CommentMenuItem[];\n\n  // ─── v0.3.0 opt-outs (suppress defaults without taking over via slot) ────\n\n  /** Suppress the default badge-stack render. */\n  disableBadgesRender?: boolean;\n  /** Suppress the default author-byline render. */\n  disableAuthorRender?: boolean;\n  /** Suppress the default excerpt render. */\n  disableExcerptRender?: boolean;\n  /** Suppress the default paywall gate even when `item.paywall.isPaywalled`. */\n  disablePaywallGate?: boolean;\n  /** Suppress the default sensitive gate even when `item.sensitivity.isSensitive`. */\n  disableSensitiveGate?: boolean;\n  /** Suppress the default quoted-article render even when `item.quotedArticle` set. */\n  disableQuotedRender?: boolean;\n  /** Suppress the default engagement-counts row. */\n  disableEngagementCounts?: boolean;\n\n  // ─── v0.3.0 imperative handle ─────────────────────────────────────────────\n\n  ref?: Ref<NewsCardHandle>;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Internal — passed from the root to each `parts/<variant>.tsx`\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Internal shape passed from the root to each `parts/<variant>.tsx`.\n * All defaults resolved; all formatting pre-computed.\n *\n * Grows at C4 (root + local-mirror + handle) — variant parts pull resolved\n * permissions / slots / opt-outs / kebab items / pre-wired handlers from\n * here without re-deriving. C11 wires them up.\n */\nexport interface ResolvedPartProps {\n  /*\n   * v0.4.1 — controlled kebab state, so `NewsCardHandle.openKebab()` can\n   * actually open it. The handle method shipped as an empty function body while\n   * `meta.ts` advertised an \"11-method imperative handle\"; the trigger lives in\n   * whichever variant part is rendered, so the root had no way to reach it.\n   *\n   * OPTIONAL on purpose. `ResolvedPartProps` is exported from the barrel and\n   * `types.ts` ships, so adding REQUIRED fields would break any consumer who\n   * annotates with it — in a patch release. The root always passes both; when\n   * they are absent the kebab simply falls back to uncontrolled.\n   */\n  kebabOpen?: boolean;\n  onKebabOpenChange?: (open: boolean) => void;\n\n  // v0.2 carry\n  item: NewsCardItem;\n  formattedDate: string | undefined;\n  formattedRelativeTime: string | undefined;\n  categoryStyle: string;\n  labels: Required<NewsCardLabels>;\n  LinkComponent: ElementType;\n  href: string | undefined;\n  onClick: ((event: MouseEvent) => void) | undefined;\n  ariaLabel: string;\n  titleId: string;\n  titleClassName: string | undefined;\n  imageClassName: string | undefined;\n  className: string | undefined;\n  actions: ReactNode;\n  loading: \"lazy\" | \"eager\";\n\n  // v0.3 — resolved permissions + role-aware passthrough\n  viewerMode: NewsViewerMode | undefined;\n  resolvedPermissions: Required<NewsCardPermissions>;\n  canModerate: boolean;\n\n  // v0.3 — local-mirror flags + reveal callbacks\n  paywallRevealed: boolean;\n  sensitiveRevealed: boolean;\n  onRevealPaywallInternal: () => void;\n  onRevealSensitiveInternal: () => void;\n\n  // v0.3 — render slots passthrough\n  renderBadges: NewsCardProps[\"renderBadges\"];\n  renderAuthor: NewsCardProps[\"renderAuthor\"];\n  renderExcerpt: NewsCardProps[\"renderExcerpt\"];\n  renderPaywallGate: NewsCardProps[\"renderPaywallGate\"];\n  renderSensitiveGate: NewsCardProps[\"renderSensitiveGate\"];\n  renderQuoted: NewsCardProps[\"renderQuoted\"];\n  renderEngagementCounts: NewsCardProps[\"renderEngagementCounts\"];\n\n  // v0.3 — opt-outs passthrough\n  disableBadgesRender: boolean;\n  disableAuthorRender: boolean;\n  disableExcerptRender: boolean;\n  disablePaywallGate: boolean;\n  disableSensitiveGate: boolean;\n  disableQuotedRender: boolean;\n  disableEngagementCounts: boolean;\n\n  // v0.3 — engagement handlers pre-bound to item id (for the counts row)\n  engagementHandlers: {\n    onLike?: (nextLiked: boolean) => void;\n    onComment?: () => void;\n    onShare?: () => void;\n    onBookmark?: (nextBookmarked: boolean) => void;\n  };\n\n  // v0.3 — kebab items computed once. Empty array → don't render kebab.\n  kebabItems: CommentMenuItem[];\n\n  // v0.3 — per-entity click handlers passthrough\n  onAuthorClick: NewsCardProps[\"onAuthorClick\"];\n  onPublisherClick: NewsCardProps[\"onPublisherClick\"];\n  onCategoryClick: NewsCardProps[\"onCategoryClick\"];\n  onTopicClick: NewsCardProps[\"onTopicClick\"];\n  onTagClick: NewsCardProps[\"onTagClick\"];\n  onQuotedClick: NewsCardProps[\"onQuotedClick\"];\n}\n",
      "type": "registry:component",
      "target": "components/news-card/types.ts"
    },
    {
      "path": "src/registry/components/data/news-card/hooks/use-relative-time.ts",
      "content": "import { defaultDateFormat } from \"../lib/format-default\";\n\n/**\n * Default relative-time formatter — English, with absolute-date fallback\n * for dates older than ~30 days. Pure function; consumers override via\n * `formatRelativeTime` prop.\n *\n * Examples:\n *   defaultRelativeTime(today)        → \"Today\"\n *   defaultRelativeTime(yesterday)    → \"Yesterday\"\n *   defaultRelativeTime(3 days ago)   → \"3 days ago\"\n *   defaultRelativeTime(2 weeks ago)  → \"2 weeks ago\"\n *   defaultRelativeTime(2 months ago) → \"March 5, 2026\"\n */\nexport const defaultRelativeTime = (\n  date: Date,\n  now: Date = new Date(),\n): string => {\n  const diffMs = now.getTime() - date.getTime();\n  const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));\n\n  if (diffDays === 0) return \"Today\";\n  if (diffDays === 1) return \"Yesterday\";\n  if (diffDays < 7) return `${diffDays} days ago`;\n  if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;\n  return defaultDateFormat(date);\n};\n",
      "type": "registry:component",
      "target": "components/news-card/hooks/use-relative-time.ts"
    },
    {
      "path": "src/registry/components/data/news-card/lib/format-default.ts",
      "content": "/**\n * Default absolute-date formatter — browser locale, long format\n * (e.g. \"May 1, 2026\"). Consumers override via `formatDate` prop.\n */\nexport const defaultDateFormat = (date: Date): string =>\n  date.toLocaleDateString(undefined, {\n    day: \"numeric\",\n    month: \"long\",\n    year: \"numeric\",\n  });\n\n/**\n * Coerce a `string | Date | number` value to `Date`. Returns `undefined`\n * if the input is itself undefined or fails to parse.\n *\n * Accepts `number` (epoch millis) as of v0.3 — `publishedAt` / `updatedAt`\n * / `scheduledFor` / `lastLiveUpdateAt` all support `number` per types.\n */\nexport const toDate = (\n  value: string | Date | number | undefined,\n): Date | undefined => {\n  if (value === undefined) return undefined;\n  if (value instanceof Date) {\n    return Number.isNaN(value.getTime()) ? undefined : value;\n  }\n  const parsed = new Date(value);\n  return Number.isNaN(parsed.getTime()) ? undefined : parsed;\n};\n",
      "type": "registry:component",
      "target": "components/news-card/lib/format-default.ts"
    },
    {
      "path": "src/registry/components/data/news-card/lib/permissions.ts",
      "content": "import type {\n  NewsCardItem,\n  NewsCardPermissions,\n  NewsCardPermissionAction,\n  NewsViewerMode,\n} from \"../types\";\n\n/**\n * Editor-mode baseline — all editor-side `true`, host-policy gates `true`,\n * reader-side `false`. `canModerate` is orthogonal and defaults `false` in\n * both modes (moderator capability must be opted in explicitly by the host).\n */\nconst EDITOR_DEFAULTS: Required<NewsCardPermissions> = {\n  // editor-side (12)\n  canEdit: true,\n  canDelete: true,\n  canPublish: true,\n  canUnpublish: true,\n  canSchedule: true,\n  canFeature: true,\n  canPin: true,\n  canChangeVisibility: true,\n  canChangeCategory: true,\n  canMarkSensitive: true,\n  canSeeAnalytics: true,\n  canPushToTop: true,\n  // host-policy gates (2) — editors get both by default\n  canShare: true,\n  canBookmark: true,\n  // reader-side (4) — editors don't see reader-destructive items by default\n  canReport: false,\n  canBlockAuthor: false,\n  canMuteAuthor: false,\n  canUnfollowTopic: false,\n  // moderator (1) — orthogonal; must be opted in\n  canModerate: false,\n};\n\n/**\n * Reader-mode baseline — all editor-side `false`, host-policy gates `true`\n * (readers see Share / Bookmark unless host denies), reader-side `true`.\n */\nconst READER_DEFAULTS: Required<NewsCardPermissions> = {\n  // editor-side (12)\n  canEdit: false,\n  canDelete: false,\n  canPublish: false,\n  canUnpublish: false,\n  canSchedule: false,\n  canFeature: false,\n  canPin: false,\n  canChangeVisibility: false,\n  canChangeCategory: false,\n  canMarkSensitive: false,\n  canSeeAnalytics: false,\n  canPushToTop: false,\n  // host-policy gates (2)\n  canShare: true,\n  canBookmark: true,\n  // reader-side (4)\n  canReport: true,\n  canBlockAuthor: true,\n  canMuteAuthor: true,\n  canUnfollowTopic: true,\n  // moderator (1)\n  canModerate: false,\n};\n\n/**\n * Resolution defaults per viewer mode. Exported for test fixtures + the\n * default kebab helper.\n */\nexport const PERMISSION_DEFAULTS_BY_MODE = {\n  editor: EDITOR_DEFAULTS,\n  viewer: READER_DEFAULTS,\n} as const;\n\n/**\n * Resolve the effective permissions matrix from `viewerMode` + optional\n * `permissions` overrides.\n *\n * **Resolution order (most → least specific):**\n *  1. `canPerformAction(action, item)` — handled per-call by\n *     {@link canPerformActionInternal}; not part of this resolver.\n *  2. `permissions[canX]` per-field — explicit overrides win.\n *  3. `viewerMode`-derived defaults — `\"editor\"` → {@link EDITOR_DEFAULTS},\n *     `\"viewer\"` → {@link READER_DEFAULTS}.\n *  4. Legacy mode — when ALL three role-aware args (`viewerMode`,\n *     `permissions`, `canPerformAction`) are undefined, the kebab itself\n *     isn't rendered; this resolver is not called.\n *\n * **Edge case (Q-P27):** when `viewerMode === undefined` but `permissions`\n * IS set, the matrix promotes to role-aware mode with reader baseline +\n * the explicit overrides. Lets hosts grant editor-side capabilities without\n * declaring a viewer mode (e.g. `permissions={{ canEdit: true, canDelete: true }}`\n * on a power-user account).\n *\n * @param viewerMode  The host-supplied mode (`\"editor\"` / `\"viewer\"` / `undefined`)\n * @param permissions Optional per-action overrides; explicit fields win\n * @returns A fully-resolved `Required<NewsCardPermissions>` matrix\n */\nexport function resolveNewsCardPermissions(\n  viewerMode: NewsViewerMode | undefined,\n  permissions: NewsCardPermissions | undefined,\n): Required<NewsCardPermissions> {\n  // Pick the baseline: explicit mode wins; absent mode falls to reader baseline\n  // (least-privileged default — explicit grants required to elevate).\n  const baseline: Required<NewsCardPermissions> =\n    viewerMode === \"editor\" ? EDITOR_DEFAULTS : READER_DEFAULTS;\n\n  // No overrides → return baseline directly. Cheap.\n  if (!permissions) {\n    return baseline;\n  }\n\n  // Merge — explicit fields in `permissions` win over the baseline.\n  return {\n    canEdit: permissions.canEdit ?? baseline.canEdit,\n    canDelete: permissions.canDelete ?? baseline.canDelete,\n    canPublish: permissions.canPublish ?? baseline.canPublish,\n    canUnpublish: permissions.canUnpublish ?? baseline.canUnpublish,\n    canSchedule: permissions.canSchedule ?? baseline.canSchedule,\n    canFeature: permissions.canFeature ?? baseline.canFeature,\n    canPin: permissions.canPin ?? baseline.canPin,\n    canChangeVisibility:\n      permissions.canChangeVisibility ?? baseline.canChangeVisibility,\n    canChangeCategory:\n      permissions.canChangeCategory ?? baseline.canChangeCategory,\n    canMarkSensitive:\n      permissions.canMarkSensitive ?? baseline.canMarkSensitive,\n    canSeeAnalytics: permissions.canSeeAnalytics ?? baseline.canSeeAnalytics,\n    canPushToTop: permissions.canPushToTop ?? baseline.canPushToTop,\n    canShare: permissions.canShare ?? baseline.canShare,\n    canBookmark: permissions.canBookmark ?? baseline.canBookmark,\n    canReport: permissions.canReport ?? baseline.canReport,\n    canBlockAuthor: permissions.canBlockAuthor ?? baseline.canBlockAuthor,\n    canMuteAuthor: permissions.canMuteAuthor ?? baseline.canMuteAuthor,\n    canUnfollowTopic:\n      permissions.canUnfollowTopic ?? baseline.canUnfollowTopic,\n    canModerate: permissions.canModerate ?? baseline.canModerate,\n  };\n}\n\n/**\n * Map `NewsCardPermissionAction` discriminator → corresponding\n * `NewsCardPermissions` field name. Pure lookup.\n */\nconst ACTION_TO_FIELD: Record<\n  NewsCardPermissionAction,\n  keyof NewsCardPermissions\n> = {\n  edit: \"canEdit\",\n  delete: \"canDelete\",\n  publish: \"canPublish\",\n  unpublish: \"canUnpublish\",\n  schedule: \"canSchedule\",\n  feature: \"canFeature\",\n  pin: \"canPin\",\n  changeVisibility: \"canChangeVisibility\",\n  changeCategory: \"canChangeCategory\",\n  markSensitive: \"canMarkSensitive\",\n  seeAnalytics: \"canSeeAnalytics\",\n  pushToTop: \"canPushToTop\",\n  share: \"canShare\",\n  bookmark: \"canBookmark\",\n  report: \"canReport\",\n  blockAuthor: \"canBlockAuthor\",\n  muteAuthor: \"canMuteAuthor\",\n  unfollowTopic: \"canUnfollowTopic\",\n  moderate: \"canModerate\",\n};\n\n/**\n * Internal helper — resolves a single action against the full resolution\n * chain (predicate → matrix → mode → legacy).\n *\n * **Use case:** the default kebab helper calls this once per candidate item\n * to decide whether to include it. The pure {@link resolveNewsCardPermissions}\n * matrix can be memoized per `(viewerMode, permissions)` identity tuple\n * inside the host; this helper layers the predicate on top.\n *\n * @param action          The action discriminator (e.g. `\"edit\"`).\n * @param item            The article being rendered.\n * @param resolved        The pre-resolved matrix (cache outside).\n * @param canPerformAction Optional predicate; wins over the matrix.\n * @returns `true` if the action is allowed; `false` otherwise.\n */\nexport function canPerformActionInternal(\n  action: NewsCardPermissionAction,\n  item: NewsCardItem,\n  resolved: Required<NewsCardPermissions>,\n  canPerformAction?: (\n    action: NewsCardPermissionAction,\n    item: NewsCardItem,\n  ) => boolean | undefined,\n): boolean {\n  // Layer 1 — predicate wins; `undefined` falls through.\n  if (canPerformAction) {\n    const predicateResult = canPerformAction(action, item);\n    if (predicateResult === true) return true;\n    if (predicateResult === false) return false;\n  }\n  // Layer 2/3 — the matrix carries the merge of explicit overrides + mode defaults.\n  return resolved[ACTION_TO_FIELD[action]];\n}\n",
      "type": "registry:component",
      "target": "components/news-card/lib/permissions.ts"
    },
    {
      "path": "src/registry/components/data/news-card/lib/defaults.tsx",
      "content": "import {\n  Bookmark,\n  BookmarkX,\n  Share2,\n  Link as LinkIcon,\n  Languages,\n  Flag,\n  UserX,\n  VolumeX,\n  HashIcon,\n  Edit3,\n  Trash2,\n  Send,\n  CalendarClock,\n  Star,\n  StarOff,\n  Pin,\n  PinOff,\n  EyeOff,\n  Eye,\n  Tag,\n  AlertOctagon,\n  BarChart3,\n  ArrowUpToLine,\n} from \"lucide-react\";\nimport { createElement } from \"react\";\n\n// F-S1 lock: cross-procomp imports use RELATIVE paths to specific files.\nimport type { CommentMenuItem } from \"../../comment-thread/types\";\nimport type {\n  NewsCardEngagementHandlers,\n  NewsCardItem,\n  NewsCardMutationHandlers,\n  NewsCardLabels,\n  NewsCardPermissionAction,\n  NewsCardPermissions,\n  NewsViewerMode,\n} from \"../types\";\nimport { DEFAULT_LABELS } from \"../types\";\nimport {\n  canPerformActionInternal,\n  resolveNewsCardPermissions,\n} from \"./permissions\";\n\n/**\n * Engagement handlers exposed to the kebab — `onBookmark` / `onShare` show up\n * in the common items section. `onLike` doesn't have a kebab item (it lives\n * on the engagement-counts row); it's accepted here so the helper signature\n * mirrors the engagement-handlers bag the root passes everywhere.\n */\ntype KebabEngagementHandlers = Pick<\n  NewsCardEngagementHandlers,\n  \"onBookmark\" | \"onShare\"\n>;\n\n/**\n * Misc reader-side handlers needed by the kebab beyond the mutation bag.\n * `onCopyLink` is conceptually the same as `onShare` but copies vs opens;\n * `onReport` lives on {@link NewsCardMutationHandlers} already.\n */\ninterface KebabMiscHandlers {\n  onCopyLink?: (articleId: string) => void;\n  /**\n   * Bound translator handler — receives no args (the caller pre-binds\n   * `articleId` + `sourceLanguage`). Visible only when `item.language` is\n   * set.\n   */\n  onTranslate?: () => void;\n}\n\ninterface DefaultNewsCardKebabArgs {\n  item: NewsCardItem;\n  engagementHandlers?: KebabEngagementHandlers;\n  miscHandlers?: KebabMiscHandlers;\n  viewerMode?: NewsViewerMode;\n  permissions?: NewsCardPermissions;\n  canPerformAction?: (\n    action: NewsCardPermissionAction,\n    item: NewsCardItem,\n  ) => boolean | undefined;\n  mutationHandlers?: NewsCardMutationHandlers;\n  moderatorActions?: (item: NewsCardItem) => CommentMenuItem[];\n  labels?: NewsCardLabels;\n}\n\n/**\n * Build the canonical kebab item list for news-card.\n *\n * **Dual-mode entry-branch (Q-P29):**\n *  - When `viewerMode`, `permissions`, AND `canPerformAction` are all\n *    `undefined` → **legacy minimal kebab**: only common items render\n *    (Bookmark / Share / Copy link / Translate / Report), gated on handler\n *    presence. Same behavior as v0.2 had no kebab at all — caller decides\n *    whether to render the trigger based on returned array length.\n *  - When ANY of the three is set → **role-aware mode**: permissions matrix\n *    is resolved + items assembled per editor / viewer / moderator role.\n *\n * **Resolution layering:** the helper calls {@link resolveNewsCardPermissions}\n * to compute the effective matrix, then {@link canPerformActionInternal} per\n * action to layer in the predicate. Memoize identities at the call-site.\n *\n * @returns Array of `CommentMenuItem` ready to render in any kebab UI. Empty\n *          array signals \"don't render the trigger.\"\n */\nexport function defaultNewsCardKebabActions(\n  args: DefaultNewsCardKebabArgs,\n): CommentMenuItem[] {\n  const {\n    item,\n    engagementHandlers = {},\n    miscHandlers = {},\n    viewerMode,\n    permissions,\n    canPerformAction,\n    mutationHandlers = {},\n    moderatorActions,\n    labels,\n  } = args;\n\n  const resolvedLabels: Required<NewsCardLabels> = {\n    ...DEFAULT_LABELS,\n    ...labels,\n  };\n\n  // Detect role-aware mode entry. ALL three undefined → legacy path.\n  const isRoleAware =\n    viewerMode !== undefined ||\n    permissions !== undefined ||\n    canPerformAction !== undefined;\n\n  if (!isRoleAware) {\n    return buildLegacyKebab({\n      item,\n      engagementHandlers,\n      miscHandlers,\n      mutationHandlers,\n      labels: resolvedLabels,\n    });\n  }\n\n  // Role-aware path — resolve once, layer predicate per action.\n  const resolved = resolveNewsCardPermissions(viewerMode, permissions);\n  const allowed = (action: NewsCardPermissionAction): boolean =>\n    canPerformActionInternal(action, item, resolved, canPerformAction);\n\n  const items: CommentMenuItem[] = [];\n\n  // ─── Editor-side section ────────────────────────────────────────────────\n  if (viewerMode === \"editor\") {\n    if (allowed(\"edit\") && mutationHandlers.onEdit) {\n      items.push({\n        label: resolvedLabels.edit,\n        icon: createElement(Edit3, { className: \"size-4\", \"aria-hidden\": true }),\n        onClick: () => mutationHandlers.onEdit?.(item.id),\n      });\n    }\n    // Publish / Unpublish — single slot, label + handler flip on status\n    if (item.status !== \"published\") {\n      if (allowed(\"publish\") && mutationHandlers.onPublish) {\n        items.push({\n          label: resolvedLabels.publish,\n          icon: createElement(Send, { className: \"size-4\", \"aria-hidden\": true }),\n          onClick: () => mutationHandlers.onPublish?.(item.id),\n        });\n      }\n    } else {\n      if (allowed(\"unpublish\") && mutationHandlers.onUnpublish) {\n        items.push({\n          label: resolvedLabels.unpublish,\n          icon: createElement(EyeOff, { className: \"size-4\", \"aria-hidden\": true }),\n          onClick: () => mutationHandlers.onUnpublish?.(item.id),\n        });\n      }\n    }\n    if (allowed(\"schedule\") && mutationHandlers.onSchedule) {\n      items.push({\n        label: resolvedLabels.schedule,\n        icon: createElement(CalendarClock, { className: \"size-4\", \"aria-hidden\": true }),\n        onClick: () =>\n          mutationHandlers.onSchedule?.(\n            item.id,\n            item.scheduledFor ? toDate(item.scheduledFor) : undefined,\n          ),\n      });\n    }\n    if (allowed(\"feature\") && mutationHandlers.onFeature) {\n      const nextFeatured = !item.isFeatured;\n      items.push({\n        label: item.isFeatured ? resolvedLabels.unfeature : resolvedLabels.feature,\n        icon: createElement(item.isFeatured ? StarOff : Star, {\n          className: \"size-4\",\n          \"aria-hidden\": true,\n        }),\n        onClick: () => mutationHandlers.onFeature?.(item.id, nextFeatured),\n      });\n    }\n    if (allowed(\"pin\") && mutationHandlers.onPin) {\n      const nextPinned = !item.isPinned;\n      items.push({\n        label: item.isPinned ? resolvedLabels.unpin : resolvedLabels.pin,\n        icon: createElement(item.isPinned ? PinOff : Pin, {\n          className: \"size-4\",\n          \"aria-hidden\": true,\n        }),\n        onClick: () => mutationHandlers.onPin?.(item.id, nextPinned),\n      });\n    }\n    if (allowed(\"pushToTop\") && mutationHandlers.onPushToTop) {\n      items.push({\n        label: resolvedLabels.pushToTop,\n        icon: createElement(ArrowUpToLine, { className: \"size-4\", \"aria-hidden\": true }),\n        onClick: () => mutationHandlers.onPushToTop?.(item.id),\n      });\n    }\n    if (allowed(\"changeVisibility\") && mutationHandlers.onChangeVisibility) {\n      items.push({\n        label: resolvedLabels.changeVisibility,\n        icon: createElement(Eye, { className: \"size-4\", \"aria-hidden\": true }),\n        onClick: () =>\n          mutationHandlers.onChangeVisibility?.(item.id, item.visibility),\n      });\n    }\n    if (allowed(\"changeCategory\") && mutationHandlers.onChangeCategory) {\n      items.push({\n        label: resolvedLabels.changeCategory,\n        icon: createElement(Tag, { className: \"size-4\", \"aria-hidden\": true }),\n        onClick: () =>\n          mutationHandlers.onChangeCategory?.(item.id, item.category),\n      });\n    }\n    if (allowed(\"markSensitive\") && mutationHandlers.onMarkSensitive) {\n      const isSensitive = item.sensitivity?.isSensitive ?? false;\n      items.push({\n        label: isSensitive\n          ? resolvedLabels.unmarkSensitive\n          : resolvedLabels.markSensitive,\n        icon: createElement(AlertOctagon, { className: \"size-4\", \"aria-hidden\": true }),\n        onClick: () =>\n          mutationHandlers.onMarkSensitive?.(\n            item.id,\n            !isSensitive,\n            item.sensitivity?.reason,\n          ),\n      });\n    }\n    if (allowed(\"seeAnalytics\") && mutationHandlers.onSeeAnalytics) {\n      items.push({\n        label: resolvedLabels.seeAnalytics,\n        icon: createElement(BarChart3, { className: \"size-4\", \"aria-hidden\": true }),\n        onClick: () => mutationHandlers.onSeeAnalytics?.(item.id),\n      });\n    }\n  }\n\n  // ─── Common items (Bookmark / Share / Copy link / Translate) ────────────\n  const commonStart = items.length;\n  if (allowed(\"bookmark\") && engagementHandlers.onBookmark) {\n    items.push({\n      label: item.isBookmarked\n        ? resolvedLabels.unbookmark\n        : resolvedLabels.bookmark,\n      icon: createElement(item.isBookmarked ? BookmarkX : Bookmark, {\n        className: \"size-4\",\n        \"aria-hidden\": true,\n      }),\n      onClick: () =>\n        engagementHandlers.onBookmark?.(item.id, !item.isBookmarked),\n    });\n  }\n  if (allowed(\"share\") && engagementHandlers.onShare) {\n    items.push({\n      label: resolvedLabels.share,\n      icon: createElement(Share2, { className: \"size-4\", \"aria-hidden\": true }),\n      onClick: () => engagementHandlers.onShare?.(item.id),\n    });\n  }\n  if (miscHandlers.onCopyLink) {\n    items.push({\n      label: resolvedLabels.copyLink,\n      icon: createElement(LinkIcon, { className: \"size-4\", \"aria-hidden\": true }),\n      onClick: () => miscHandlers.onCopyLink?.(item.id),\n    });\n  }\n  if (item.language && miscHandlers.onTranslate) {\n    items.push({\n      label: resolvedLabels.translate,\n      icon: createElement(Languages, { className: \"size-4\", \"aria-hidden\": true }),\n      onClick: () => miscHandlers.onTranslate?.(),\n    });\n  }\n  // Mark divider before common items if editor-side items preceded.\n  if (commonStart > 0 && items.length > commonStart) {\n    items[commonStart] = { ...items[commonStart], separatorBefore: true };\n  }\n\n  // ─── Moderator section (orthogonal — divider above) ─────────────────────\n  if (allowed(\"moderate\") && moderatorActions) {\n    const modItems = moderatorActions(item);\n    if (modItems.length > 0) {\n      modItems[0] = { ...modItems[0], separatorBefore: true };\n      items.push(...modItems);\n    }\n  }\n\n  // ─── Reader-side destructive items ──────────────────────────────────────\n  const destructiveStart = items.length;\n  if (viewerMode === \"viewer\") {\n    if (allowed(\"report\") && mutationHandlers.onReport) {\n      items.push({\n        label: resolvedLabels.report,\n        icon: createElement(Flag, { className: \"size-4\", \"aria-hidden\": true }),\n        destructive: true,\n        onClick: () => mutationHandlers.onReport?.(item.id),\n      });\n    }\n    if (allowed(\"muteAuthor\") && mutationHandlers.onMuteAuthor) {\n      const authorId = item.authorEntity?.id;\n      if (authorId) {\n        items.push({\n          label: resolvedLabels.muteAuthor,\n          icon: createElement(VolumeX, { className: \"size-4\", \"aria-hidden\": true }),\n          destructive: true,\n          onClick: () => mutationHandlers.onMuteAuthor?.(authorId),\n        });\n      }\n    }\n    if (allowed(\"blockAuthor\") && mutationHandlers.onBlockAuthor) {\n      const authorId = item.authorEntity?.id;\n      if (authorId) {\n        items.push({\n          label: resolvedLabels.blockAuthor,\n          icon: createElement(UserX, { className: \"size-4\", \"aria-hidden\": true }),\n          destructive: true,\n          onClick: () => mutationHandlers.onBlockAuthor?.(authorId),\n        });\n      }\n    }\n    if (\n      allowed(\"unfollowTopic\") &&\n      mutationHandlers.onUnfollowTopic &&\n      item.topics &&\n      item.topics.length > 0\n    ) {\n      const firstTopic = item.topics[0];\n      items.push({\n        label: resolvedLabels.unfollowTopic,\n        icon: createElement(HashIcon, { className: \"size-4\", \"aria-hidden\": true }),\n        destructive: true,\n        onClick: () => mutationHandlers.onUnfollowTopic?.(firstTopic),\n      });\n    }\n  }\n  if (destructiveStart > 0 && items.length > destructiveStart) {\n    items[destructiveStart] = {\n      ...items[destructiveStart],\n      separatorBefore: true,\n    };\n  }\n\n  // ─── Editor-mode delete (last, destructive, separated) ──────────────────\n  if (\n    viewerMode === \"editor\" &&\n    allowed(\"delete\") &&\n    mutationHandlers.onDelete\n  ) {\n    items.push({\n      label: resolvedLabels.delete,\n      icon: createElement(Trash2, { className: \"size-4\", \"aria-hidden\": true }),\n      destructive: true,\n      separatorBefore: true,\n      onClick: () => mutationHandlers.onDelete?.(item.id),\n    });\n  }\n\n  return items;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Legacy minimal kebab — v0.2-compatible handler-driven path\n// ─────────────────────────────────────────────────────────────────────────────\n\ninterface LegacyKebabArgs {\n  item: NewsCardItem;\n  engagementHandlers: KebabEngagementHandlers;\n  miscHandlers: KebabMiscHandlers;\n  mutationHandlers: NewsCardMutationHandlers;\n  labels: Required<NewsCardLabels>;\n}\n\nfunction buildLegacyKebab(args: LegacyKebabArgs): CommentMenuItem[] {\n  const { item, engagementHandlers, miscHandlers, mutationHandlers, labels } =\n    args;\n  const items: CommentMenuItem[] = [];\n\n  if (engagementHandlers.onBookmark) {\n    items.push({\n      label: item.isBookmarked ? labels.unbookmark : labels.bookmark,\n      icon: createElement(item.isBookmarked ? BookmarkX : Bookmark, {\n        className: \"size-4\",\n        \"aria-hidden\": true,\n      }),\n      onClick: () =>\n        engagementHandlers.onBookmark?.(item.id, !item.isBookmarked),\n    });\n  }\n  if (engagementHandlers.onShare) {\n    items.push({\n      label: labels.share,\n      icon: createElement(Share2, { className: \"size-4\", \"aria-hidden\": true }),\n      onClick: () => engagementHandlers.onShare?.(item.id),\n    });\n  }\n  if (miscHandlers.onCopyLink) {\n    items.push({\n      label: labels.copyLink,\n      icon: createElement(LinkIcon, { className: \"size-4\", \"aria-hidden\": true }),\n      onClick: () => miscHandlers.onCopyLink?.(item.id),\n    });\n  }\n  if (item.language && miscHandlers.onTranslate) {\n    items.push({\n      label: labels.translate,\n      icon: createElement(Languages, { className: \"size-4\", \"aria-hidden\": true }),\n      onClick: () => miscHandlers.onTranslate?.(),\n    });\n  }\n  if (mutationHandlers.onReport) {\n    items.push({\n      label: labels.report,\n      icon: createElement(Flag, { className: \"size-4\", \"aria-hidden\": true }),\n      destructive: true,\n      separatorBefore: items.length > 0,\n      onClick: () => mutationHandlers.onReport?.(item.id),\n    });\n  }\n\n  return items;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Recursion-strip helper for quoted articles (used at C9)\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Strip `quotedArticle` from a `NewsCardItem` to prevent infinite recursion\n * when rendering nested quoted-article mini-cards. Used by `QuotedArticleCard`\n * to ensure a quoted article's own quotedArticle field is dropped at render\n * time (Q-P32).\n *\n * Pure — returns a shallow copy with `quotedArticle: undefined`. Doesn't\n * mutate the input.\n */\nexport function stripQuotedRecursion(item: NewsCardItem): NewsCardItem {\n  if (!item.quotedArticle) return item;\n  return { ...item, quotedArticle: undefined };\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Internal date coercion (mirrors lib/format-default.ts but kept self-contained\n// to avoid bidirectional dep)\n// ─────────────────────────────────────────────────────────────────────────────\n\nfunction toDate(value: string | Date | number): Date {\n  if (value instanceof Date) return value;\n  return new Date(value);\n}\n",
      "type": "registry:component",
      "target": "components/news-card/lib/defaults.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/featured.tsx",
      "content": "import { ArrowRight, Calendar, Clock, User } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { cn } from \"@/lib/utils\";\nimport type { ResolvedPartProps } from \"../types\";\nimport { NewsBadges } from \"./news-badges\";\nimport { VisibilityBadge } from \"./visibility-badge\";\nimport { LiveUpdateLine } from \"./live-update-line\";\nimport { NewsAuthorByline } from \"./news-author-byline\";\nimport { NewsPublisherRow } from \"./news-publisher-row\";\nimport { NewsPaywallGate } from \"./news-paywall-gate\";\nimport { ContentSensitiveGate } from \"./content-sensitive-gate\";\nimport { NewsEngagementCounts } from \"./news-engagement-counts\";\nimport { NewsKebab } from \"./news-kebab\";\n\n/**\n * Featured variant — full-bleed hero card. Image fills the entire surface;\n * gradient overlay puts the title + meta + CTA in legible white type.\n *\n * v0.3.0 features per Q-PA matrix: full badge stack, publisher logo, kebab\n * (top-right), paywall + sensitive gates, engagement counts, structured\n * author byline, live-update sub-line. NO quoted article render (Q-PE).\n */\nexport function FeaturedPart(props: ResolvedPartProps) {\n  const {\n    item,\n    formattedRelativeTime,\n    categoryStyle,\n    labels,\n    LinkComponent,\n    href,\n    onClick,\n    ariaLabel,\n    titleId,\n    titleClassName,\n    imageClassName,\n    className,\n    actions,\n    loading,\n    viewerMode,\n    canModerate,\n    paywallRevealed,\n    sensitiveRevealed,\n    onRevealPaywallInternal,\n    onRevealSensitiveInternal,\n    renderBadges,\n    renderAuthor,\n    renderExcerpt,\n    renderPaywallGate,\n    renderSensitiveGate,\n    renderEngagementCounts,\n    disableBadgesRender,\n    disableAuthorRender,\n    disableExcerptRender,\n    disablePaywallGate,\n    disableSensitiveGate,\n    disableEngagementCounts,\n    engagementHandlers,\n    kebabItems,\n    kebabOpen,\n    onKebabOpenChange,\n    onAuthorClick,\n    onPublisherClick,\n    onCategoryClick,\n  } = props;\n\n  const isEditorMode = viewerMode === \"editor\";\n  const showKebab = kebabItems.some((it) => !it.hidden);\n\n  const heroMedia = (\n    <>\n      <img\n        src={item.image}\n        alt={item.title}\n        loading={loading}\n        decoding=\"async\"\n        className={cn(\n          \"absolute inset-0 h-full w-full object-cover transition-transform duration-700\",\n          \"motion-safe:group-hover:scale-105\",\n          imageClassName,\n        )}\n      />\n      <div\n        aria-hidden=\"true\"\n        className=\"absolute inset-0 bg-linear-to-t from-black via-black/50 to-transparent\"\n      />\n    </>\n  );\n\n  // Paywall scope: gate wraps just the hero media. Title + meta in the\n  // content overlay stay visible above the gate via z-20 (per Q-PG).\n  // Substitute paywall.preview for item.excerpt when paywalled.\n  const isPaywalled =\n    !disablePaywallGate && Boolean(item.paywall?.isPaywalled) && !paywallRevealed;\n\n  const previewText =\n    isPaywalled && item.paywall?.preview\n      ? `${item.paywall.preview} ${labels.paywallPreviewSeparator}`\n      : null;\n  const displayExcerpt = previewText ?? item.excerpt;\n\n  const sensitiveGatedHero =\n    !disableSensitiveGate && item.sensitivity?.isSensitive ? (\n      renderSensitiveGate ? (\n        renderSensitiveGate(item, { onReveal: onRevealSensitiveInternal })\n      ) : (\n        <ContentSensitiveGate\n          sensitivity={item.sensitivity}\n          revealed={sensitiveRevealed}\n          onReveal={onRevealSensitiveInternal}\n          labels={labels}\n          className=\"contents\"\n        >\n          {heroMedia}\n        </ContentSensitiveGate>\n      )\n    ) : (\n      heroMedia\n    );\n\n  const mediaWithPaywall = isPaywalled\n    ? renderPaywallGate\n      ? renderPaywallGate(item, { onReveal: onRevealPaywallInternal })\n      : (\n          <NewsPaywallGate\n            paywall={item.paywall}\n            revealed={paywallRevealed}\n            onReveal={onRevealPaywallInternal}\n            linkComponent={LinkComponent}\n            labels={labels}\n            className=\"absolute inset-0\"\n          >\n            {sensitiveGatedHero}\n          </NewsPaywallGate>\n        )\n    : sensitiveGatedHero;\n\n  const content = (\n    <>\n      {mediaWithPaywall}\n\n      <div className=\"absolute inset-0 z-20 flex flex-col justify-end p-8 md:p-12\">\n        {/* Top-row: publisher logo (left) + kebab/visibility (right) */}\n        {(item.publisher || showKebab || item.visibility) && (\n          <div className=\"absolute left-8 right-8 top-8 flex items-start justify-between md:left-12 md:right-12 md:top-12\">\n            <NewsPublisherRow\n              publisher={item.publisher}\n              onPublisherClick={onPublisherClick}\n            />\n            <div className=\"flex items-center gap-1\">\n              <VisibilityBadge visibility={item.visibility} labels={labels} />\n              {showKebab && (\n                <NewsKebab\n                  items={kebabItems}\n                  open={kebabOpen}\n                  onOpenChange={onKebabOpenChange}\n                />\n              )}\n            </div>\n          </div>\n        )}\n\n        {item.category ? (\n          <span className=\"mb-4 inline-flex w-fit gap-1\">\n            {onCategoryClick ? (\n              <button\n                type=\"button\"\n                onClick={(e) => {\n                  e.stopPropagation();\n                  e.preventDefault();\n                  onCategoryClick(item.category!);\n                }}\n                className=\"relative z-10 rounded-full bg-black/40 backdrop-blur-sm\"\n                aria-label={`Category: ${item.category}`}\n              >\n                <Badge className={cn(\"cursor-pointer\", categoryStyle)}>\n                  {item.category}\n                </Badge>\n              </button>\n            ) : (\n              <span className=\"rounded-full bg-black/40 backdrop-blur-sm\">\n                <Badge\n                  className={cn(categoryStyle)}\n                  aria-label={`Category: ${item.category}`}\n                >\n                  {item.category}\n                </Badge>\n              </span>\n            )}\n          </span>\n        ) : null}\n\n        <h2\n          id={titleId}\n          className={cn(\n            \"mb-4 font-serif text-3xl font-bold leading-tight text-white md:text-4xl lg:text-5xl\",\n            titleClassName,\n          )}\n        >\n          {item.title}\n        </h2>\n\n        {!disableExcerptRender && displayExcerpt\n          ? renderExcerpt\n            ? renderExcerpt(item)\n            : (\n                <p className=\"mb-6 max-w-3xl text-lg text-white/80 line-clamp-3 md:text-xl\">\n                  {displayExcerpt}\n                </p>\n              )\n          : null}\n\n        {/* Author byline (structured when authorEntity set) */}\n        {!disableAuthorRender && item.authorEntity ? (\n          renderAuthor ? (\n            renderAuthor(item.authorEntity, { publisher: item.publisher })\n          ) : (\n            <div className=\"mb-4 text-white/80\">\n              <NewsAuthorByline\n                author={item.authorEntity}\n                onAuthorClick={onAuthorClick}\n                labels={labels}\n              />\n            </div>\n          )\n        ) : null}\n\n        <div className=\"flex flex-wrap items-center gap-6 text-white/70\">\n          {/* String author (when no structured authorEntity) */}\n          {!item.authorEntity && item.author ? (\n            <div className=\"flex items-center gap-2\">\n              <User aria-hidden=\"true\" className=\"h-4 w-4\" />\n              <span>{item.author}</span>\n            </div>\n          ) : null}\n          {formattedRelativeTime ? (\n            <div className=\"flex flex-col\">\n              <div className=\"flex items-center gap-2\">\n                <Calendar aria-hidden=\"true\" className=\"h-4 w-4\" />\n                <span>{formattedRelativeTime}</span>\n              </div>\n              <LiveUpdateLine\n                item={item}\n                labels={labels}\n                className=\"text-white/60\"\n              />\n            </div>\n          ) : null}\n          {item.readTime !== undefined ? (\n            <div className=\"flex items-center gap-2\">\n              <Clock aria-hidden=\"true\" className=\"h-4 w-4\" />\n              <span>\n                {item.readTime} {labels.minutesRead}\n              </span>\n            </div>\n          ) : null}\n          {href ? (\n            <span className=\"ms-auto inline-flex items-center gap-2 text-white transition-colors motion-safe:group-hover:text-primary\">\n              {labels.readMore}\n              <ArrowRight\n                aria-hidden=\"true\"\n                className=\"h-4 w-4 transition-transform motion-safe:group-hover:translate-x-1 rtl:rotate-180\"\n              />\n            </span>\n          ) : null}\n        </div>\n\n        {!disableEngagementCounts ? (\n          renderEngagementCounts ? (\n            <div className=\"relative z-10 mt-4\">\n              {renderEngagementCounts(item, {\n                handlers: {\n                  onLike: engagementHandlers.onLike\n                    ? (id, nextLiked) => engagementHandlers.onLike?.(nextLiked)\n                    : undefined,\n                  onComment: engagementHandlers.onComment\n                    ? () => engagementHandlers.onComment?.()\n                    : undefined,\n                  onShare: engagementHandlers.onShare\n                    ? () => engagementHandlers.onShare?.()\n                    : undefined,\n                  onBookmark: engagementHandlers.onBookmark\n                    ? (id, nextBookmarked) =>\n                        engagementHandlers.onBookmark?.(nextBookmarked)\n                    : undefined,\n                },\n              })}\n            </div>\n          ) : (\n            <NewsEngagementCounts\n              item={item}\n              handlers={engagementHandlers}\n              labels={labels}\n              className=\"mt-4 text-white/80\"\n            />\n          )\n        ) : null}\n\n        {actions ? (\n          <div className=\"relative z-10 mt-4\">{actions}</div>\n        ) : null}\n      </div>\n    </>\n  );\n\n  return (\n    <article\n      className={cn(\n        \"group relative h-125 overflow-hidden rounded-2xl md:h-150\",\n        \"has-[a:focus-visible]:ring-2 has-[a:focus-visible]:ring-ring has-[a:focus-visible]:ring-offset-2\",\n        className,\n      )}\n    >\n      {/* Editorial badge stack — overlaid at top */}\n      {!disableBadgesRender && (\n        <div className=\"absolute start-2 top-2 z-20\">\n          {renderBadges ? (\n            renderBadges(item, { canModerate })\n          ) : (\n            <NewsBadges\n              item={item}\n              labels={labels}\n              isEditorMode={isEditorMode}\n            />\n          )}\n        </div>\n      )}\n\n      {href ? (\n        <LinkComponent\n          href={href}\n          aria-labelledby={titleId}\n          aria-label={ariaLabel}\n          onClick={onClick}\n          className=\"absolute inset-0 z-0 rounded-2xl outline-none\"\n        />\n      ) : null}\n\n      {content}\n    </article>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/featured.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/large.tsx",
      "content": "import { User } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { cn } from \"@/lib/utils\";\nimport type { ResolvedPartProps } from \"../types\";\nimport { NewsBadges } from \"./news-badges\";\nimport { VisibilityBadge } from \"./visibility-badge\";\nimport { LiveUpdateLine } from \"./live-update-line\";\nimport { NewsAuthorByline } from \"./news-author-byline\";\nimport { NewsPublisherRow } from \"./news-publisher-row\";\nimport { NewsPaywallGate } from \"./news-paywall-gate\";\nimport { ContentSensitiveGate } from \"./content-sensitive-gate\";\nimport { NewsEngagementCounts } from \"./news-engagement-counts\";\nimport { NewsKebab } from \"./news-kebab\";\n\n/**\n * Large variant — 2-column horizontal card. Image left, content right.\n * v0.3 features per Q-PA matrix: full badge stack, publisher logo, kebab,\n * paywall + sensitive gates, engagement counts. NO quoted article (Q-PE).\n */\nexport function LargePart(props: ResolvedPartProps) {\n  const {\n    item,\n    formattedRelativeTime,\n    categoryStyle,\n    labels,\n    LinkComponent,\n    href,\n    onClick,\n    ariaLabel,\n    titleId,\n    titleClassName,\n    imageClassName,\n    className,\n    actions,\n    loading,\n    viewerMode,\n    canModerate,\n    paywallRevealed,\n    sensitiveRevealed,\n    onRevealPaywallInternal,\n    onRevealSensitiveInternal,\n    renderBadges,\n    renderAuthor,\n    renderExcerpt,\n    renderPaywallGate,\n    renderSensitiveGate,\n    renderEngagementCounts,\n    disableBadgesRender,\n    disableAuthorRender,\n    disableExcerptRender,\n    disablePaywallGate,\n    disableSensitiveGate,\n    disableEngagementCounts,\n    engagementHandlers,\n    kebabItems,\n    kebabOpen,\n    onKebabOpenChange,\n    onAuthorClick,\n    onPublisherClick,\n    onCategoryClick,\n  } = props;\n\n  const isEditorMode = viewerMode === \"editor\";\n  const showKebab = kebabItems.some((it) => !it.hidden);\n\n  const mediaBlock = (\n    <div className=\"relative h-64 overflow-hidden md:h-full md:min-h-75\">\n      <img\n        src={item.image}\n        alt={item.title}\n        loading={loading}\n        decoding=\"async\"\n        className={cn(\n          \"absolute inset-0 h-full w-full object-cover transition-transform duration-500\",\n          \"motion-safe:group-hover:scale-105\",\n          imageClassName,\n        )}\n      />\n      {!disableBadgesRender && (\n        <div className=\"absolute start-2 top-2 z-20\">\n          {renderBadges ? (\n            renderBadges(item, { canModerate })\n          ) : (\n            <NewsBadges\n              item={item}\n              labels={labels}\n              isEditorMode={isEditorMode}\n            />\n          )}\n        </div>\n      )}\n    </div>\n  );\n\n  const gatedMedia =\n    !disableSensitiveGate && item.sensitivity?.isSensitive ? (\n      renderSensitiveGate ? (\n        renderSensitiveGate(item, { onReveal: onRevealSensitiveInternal })\n      ) : (\n        <ContentSensitiveGate\n          sensitivity={item.sensitivity}\n          revealed={sensitiveRevealed}\n          onReveal={onRevealSensitiveInternal}\n          labels={labels}\n        >\n          {mediaBlock}\n        </ContentSensitiveGate>\n      )\n    ) : (\n      mediaBlock\n    );\n\n  // Paywall scope: gate wraps just the media (Q-PG); substitute\n  // paywall.preview for item.excerpt in the body so title + author +\n  // footer stay visible.\n  const isPaywalled =\n    !disablePaywallGate && Boolean(item.paywall?.isPaywalled) && !paywallRevealed;\n\n  const mediaWithPaywall = isPaywalled\n    ? renderPaywallGate\n      ? renderPaywallGate(item, { onReveal: onRevealPaywallInternal })\n      : (\n          <NewsPaywallGate\n            paywall={item.paywall}\n            revealed={paywallRevealed}\n            onReveal={onRevealPaywallInternal}\n            linkComponent={LinkComponent}\n            labels={labels}\n            className=\"md:h-full md:min-h-75\"\n          >\n            {gatedMedia}\n          </NewsPaywallGate>\n        )\n    : gatedMedia;\n\n  const previewText =\n    isPaywalled && item.paywall?.preview\n      ? `${item.paywall.preview} ${labels.paywallPreviewSeparator}`\n      : null;\n  const displayExcerpt = previewText ?? item.excerpt;\n\n  const content = (\n    <>\n      {mediaWithPaywall}\n\n      <div className=\"flex flex-col justify-center p-6 md:p-8\">\n        {/* Top: publisher + kebab/visibility */}\n        {(item.publisher || showKebab || item.visibility) && (\n          <div className=\"mb-3 flex items-start justify-between gap-2\">\n            <NewsPublisherRow\n              publisher={item.publisher}\n              onPublisherClick={onPublisherClick}\n            />\n            <div className=\"flex items-center gap-1\">\n              <VisibilityBadge visibility={item.visibility} labels={labels} />\n              {showKebab && (\n                <NewsKebab\n                  items={kebabItems}\n                  open={kebabOpen}\n                  onOpenChange={onKebabOpenChange}\n                />\n              )}\n            </div>\n          </div>\n        )}\n\n        {item.category ? (\n          onCategoryClick ? (\n            <button\n              type=\"button\"\n              onClick={(e) => {\n                e.stopPropagation();\n                e.preventDefault();\n                onCategoryClick(item.category!);\n              }}\n              className=\"relative z-10 mb-4 w-fit\"\n              aria-label={`Category: ${item.category}`}\n            >\n              <Badge className={cn(categoryStyle, \"cursor-pointer\")}>\n                {item.category}\n              </Badge>\n            </button>\n          ) : (\n            <Badge\n              className={cn(categoryStyle, \"mb-4 w-fit\")}\n              aria-label={`Category: ${item.category}`}\n            >\n              {item.category}\n            </Badge>\n          )\n        ) : null}\n\n        <h3\n          id={titleId}\n          className={cn(\n            \"mb-3 font-serif text-2xl font-bold transition-colors line-clamp-2 motion-safe:group-hover:text-primary md:text-3xl\",\n            titleClassName,\n          )}\n        >\n          {item.title}\n        </h3>\n\n        {!disableExcerptRender && displayExcerpt\n          ? renderExcerpt\n            ? renderExcerpt(item)\n            : (\n                <p className=\"mb-4 text-muted-foreground line-clamp-3\">\n                  {displayExcerpt}\n                </p>\n              )\n          : null}\n\n        {!disableAuthorRender && item.authorEntity ? (\n          renderAuthor ? (\n            renderAuthor(item.authorEntity, { publisher: item.publisher })\n          ) : (\n            <NewsAuthorByline\n              author={item.authorEntity}\n              onAuthorClick={onAuthorClick}\n              labels={labels}\n              className=\"mb-3\"\n            />\n          )\n        ) : null}\n\n        {(item.author || formattedRelativeTime || item.readTime !== undefined) && (\n          <div className=\"mt-auto flex items-center gap-4 text-sm text-muted-foreground\">\n            {!item.authorEntity && item.author ? (\n              <span className=\"flex items-center gap-1.5\">\n                <User aria-hidden=\"true\" className=\"h-4 w-4\" />\n                {item.author}\n              </span>\n            ) : null}\n            {formattedRelativeTime ? (\n              <div className=\"flex flex-col\">\n                <span>{formattedRelativeTime}</span>\n                <LiveUpdateLine item={item} labels={labels} />\n              </div>\n            ) : null}\n            {item.readTime !== undefined ? (\n              <span>\n                {item.readTime} {labels.minutesShort}\n              </span>\n            ) : null}\n          </div>\n        )}\n\n        {!disableEngagementCounts ? (\n          renderEngagementCounts ? (\n            <div className=\"relative z-10 mt-3\">\n              {renderEngagementCounts(item, {\n                handlers: {\n                  onLike: engagementHandlers.onLike\n                    ? (id, nextLiked) => engagementHandlers.onLike?.(nextLiked)\n                    : undefined,\n                  onComment: engagementHandlers.onComment\n                    ? () => engagementHandlers.onComment?.()\n                    : undefined,\n                  onShare: engagementHandlers.onShare\n                    ? () => engagementHandlers.onShare?.()\n                    : undefined,\n                  onBookmark: engagementHandlers.onBookmark\n                    ? (id, nextBookmarked) =>\n                        engagementHandlers.onBookmark?.(nextBookmarked)\n                    : undefined,\n                },\n              })}\n            </div>\n          ) : (\n            <NewsEngagementCounts\n              item={item}\n              handlers={engagementHandlers}\n              labels={labels}\n              className=\"mt-3\"\n            />\n          )\n        ) : null}\n\n        {actions ? (\n          <div className=\"relative z-10 mt-4\">{actions}</div>\n        ) : null}\n      </div>\n    </>\n  );\n\n  return (\n    <article\n      className={cn(\n        \"group relative grid gap-6 overflow-hidden rounded-2xl border border-border/50 bg-card transition-all duration-300 hover:shadow-xl md:grid-cols-2\",\n        \"has-[a:focus-visible]:ring-2 has-[a:focus-visible]:ring-ring has-[a:focus-visible]:ring-offset-2\",\n        className,\n      )}\n    >\n      {href ? (\n        <LinkComponent\n          href={href}\n          aria-labelledby={titleId}\n          aria-label={ariaLabel}\n          onClick={onClick}\n          className=\"absolute inset-0 z-0 rounded-2xl outline-none\"\n        />\n      ) : null}\n\n      {content}\n    </article>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/large.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/medium.tsx",
      "content": "import { Eye } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { cn } from \"@/lib/utils\";\nimport type { ResolvedPartProps } from \"../types\";\nimport { NewsBadges } from \"./news-badges\";\nimport { VisibilityBadge } from \"./visibility-badge\";\nimport { LiveUpdateLine } from \"./live-update-line\";\nimport { NewsAuthorByline } from \"./news-author-byline\";\nimport { NewsPaywallGate } from \"./news-paywall-gate\";\nimport { ContentSensitiveGate } from \"./content-sensitive-gate\";\nimport { QuotedArticleCard } from \"./quoted-article-card\";\nimport { NewsEngagementCounts } from \"./news-engagement-counts\";\nimport { NewsKebab } from \"./news-kebab\";\n\n/**\n * Medium variant — vertical card with image-on-top, view-chip overlay,\n * and a kicker footer (author left, date right, separator above).\n *\n * v0.3.0 integration per Q-PA matrix:\n *   - Badge stack (top-left, full set)\n *   - Visibility badge (top-right beside kebab)\n *   - Kebab dropdown (top-right corner, when kebabItems non-empty)\n *   - Sensitive gate over media\n *   - Paywall gate over excerpt + media\n *   - Quoted article (between excerpt and footer; medium + list only per Q-PE)\n *   - Engagement counts (bottom row)\n *   - Live-update sub-line (below date)\n *   - Structured author byline (via authorEntity)\n */\nexport function MediumPart(props: ResolvedPartProps) {\n  const {\n    item,\n    formattedRelativeTime,\n    categoryStyle,\n    labels,\n    LinkComponent,\n    href,\n    onClick,\n    ariaLabel,\n    titleId,\n    titleClassName,\n    imageClassName,\n    className,\n    actions,\n    loading,\n    viewerMode,\n    canModerate,\n    paywallRevealed,\n    sensitiveRevealed,\n    onRevealPaywallInternal,\n    onRevealSensitiveInternal,\n    renderBadges,\n    renderAuthor,\n    renderExcerpt,\n    renderPaywallGate,\n    renderSensitiveGate,\n    renderQuoted,\n    renderEngagementCounts,\n    disableBadgesRender,\n    disableAuthorRender,\n    disableExcerptRender,\n    disablePaywallGate,\n    disableSensitiveGate,\n    disableQuotedRender,\n    disableEngagementCounts,\n    engagementHandlers,\n    kebabItems,\n    kebabOpen,\n    onKebabOpenChange,\n    onAuthorClick,\n    onPublisherClick,\n    onCategoryClick,\n    onQuotedClick,\n  } = props;\n\n  const isEditorMode = viewerMode === \"editor\";\n  const showKebab = kebabItems.some((it) => !it.hidden);\n  // State-group badges (top-right overlay): Breaking / Live / Pinned /\n  // Sponsored / Status. Curation-group badges (Exclusive / Featured) render\n  // as a kicker above the title — checked separately at the body where\n  // they render.\n  const showStateBadges =\n    !disableBadgesRender &&\n    (renderBadges ||\n      item.isBreaking ||\n      item.isLive ||\n      item.isPinned ||\n      item.isSponsored ||\n      (isEditorMode && item.status && item.status !== \"published\"));\n\n  const categoryChip =\n    item.category && onCategoryClick ? (\n      <button\n        type=\"button\"\n        onClick={(e) => {\n          e.stopPropagation();\n          e.preventDefault();\n          onCategoryClick(item.category!);\n        }}\n        className=\"relative z-10\"\n        aria-label={`Category: ${item.category}`}\n      >\n        <Badge className={cn(\"cursor-pointer\", categoryStyle)}>\n          {item.category}\n        </Badge>\n      </button>\n    ) : item.category ? (\n      <Badge\n        className={cn(categoryStyle)}\n        aria-label={`Category: ${item.category}`}\n      >\n        {item.category}\n      </Badge>\n    ) : null;\n\n  // Media block (gets wrapped by sensitive gate when sensitive)\n  const mediaBlock = (\n    <div className=\"relative h-48 overflow-hidden\">\n      <img\n        src={item.image}\n        alt={item.title}\n        loading={loading}\n        decoding=\"async\"\n        className={cn(\n          \"h-full w-full object-cover transition-transform duration-500\",\n          \"motion-safe:group-hover:scale-105\",\n          imageClassName,\n        )}\n      />\n      {categoryChip && <div className=\"absolute start-4 top-4\">{categoryChip}</div>}\n      {item.views !== undefined ? (\n        <div\n          className=\"absolute bottom-4 end-4 flex items-center gap-1 rounded-full bg-black/60 px-2 py-1 text-xs text-white backdrop-blur-sm\"\n          aria-label={`${item.views} ${labels.viewsLabel}`}\n        >\n          <Eye aria-hidden=\"true\" className=\"h-3 w-3\" />\n          <span aria-hidden=\"true\">{item.views}</span>\n        </div>\n      ) : null}\n    </div>\n  );\n\n  const gatedMedia =\n    !disableSensitiveGate && item.sensitivity?.isSensitive ? (\n      renderSensitiveGate ? (\n        renderSensitiveGate(item, { onReveal: onRevealSensitiveInternal })\n      ) : (\n        <ContentSensitiveGate\n          sensitivity={item.sensitivity}\n          revealed={sensitiveRevealed}\n          onReveal={onRevealSensitiveInternal}\n          labels={labels}\n        >\n          {mediaBlock}\n        </ContentSensitiveGate>\n      )\n    ) : (\n      mediaBlock\n    );\n\n  // Paywall scope: gate wraps just the media block, substitutes\n  // paywall.preview for item.excerpt in the body (Q-PG lock — title +\n  // author + footer all stay visible above/below the gate).\n  const isPaywalled =\n    !disablePaywallGate && Boolean(item.paywall?.isPaywalled) && !paywallRevealed;\n\n  const mediaWithPaywall = isPaywalled\n    ? renderPaywallGate\n      ? renderPaywallGate(item, { onReveal: onRevealPaywallInternal })\n      : (\n          <NewsPaywallGate\n            paywall={item.paywall}\n            revealed={paywallRevealed}\n            onReveal={onRevealPaywallInternal}\n            linkComponent={LinkComponent}\n            labels={labels}\n          >\n            {gatedMedia}\n          </NewsPaywallGate>\n        )\n    : gatedMedia;\n\n  // Excerpt block — paywall.preview substitutes for item.excerpt when paywalled\n  const previewText =\n    isPaywalled && item.paywall?.preview\n      ? `${item.paywall.preview} ${labels.paywallPreviewSeparator}`\n      : null;\n  const displayExcerpt = previewText ?? item.excerpt;\n\n  const excerptBlock =\n    !disableExcerptRender && displayExcerpt ? (\n      renderExcerpt ? (\n        renderExcerpt(item)\n      ) : (\n        <p className=\"mb-4 flex-1 text-sm text-muted-foreground line-clamp-3\">\n          {displayExcerpt}\n        </p>\n      )\n    ) : null;\n\n  const articleContent = (\n    <>\n      {mediaWithPaywall}\n      <div className=\"flex flex-1 flex-col p-6\">\n        {/* Curation kicker — editorial product labels (Exclusive / Featured).\n            Render above the title as the newspaper convention dictates. */}\n        {!disableBadgesRender && !renderBadges && (item.isExclusive || item.isFeatured) && (\n          <div className=\"mb-2\">\n            <NewsBadges\n              item={item}\n              labels={labels}\n              isEditorMode={isEditorMode}\n              group=\"curation\"\n            />\n          </div>\n        )}\n\n        <div className=\"mb-2 flex items-start justify-between gap-2\">\n          <h3\n            id={titleId}\n            className={cn(\n              \"font-serif text-xl font-bold transition-colors line-clamp-2 motion-safe:group-hover:text-primary\",\n              titleClassName,\n            )}\n          >\n            {item.title}\n          </h3>\n          <div className=\"flex shrink-0 items-center gap-1\">\n            <VisibilityBadge visibility={item.visibility} labels={labels} />\n            {showKebab && (\n              <NewsKebab\n                items={kebabItems}\n                open={kebabOpen}\n                onOpenChange={onKebabOpenChange}\n              />\n            )}\n          </div>\n        </div>\n\n        {excerptBlock}\n\n        {!disableQuotedRender && item.quotedArticle ? (\n          renderQuoted ? (\n            renderQuoted(item, {\n              onClick: onQuotedClick\n                ? () => onQuotedClick(item.quotedArticle!)\n                : undefined,\n            })\n          ) : (\n            <div className=\"mb-4\">\n              <QuotedArticleCard\n                quotedArticle={item.quotedArticle}\n                onClick={onQuotedClick}\n                labels={undefined}\n              />\n            </div>\n          )\n        ) : null}\n\n        {actions ? <div className=\"relative z-10 mb-4\">{actions}</div> : null}\n\n        {!disableAuthorRender && (item.authorEntity || item.author || item.publisher) ? (\n          renderAuthor ? (\n            renderAuthor(item.authorEntity ?? item.author, {\n              publisher: item.publisher,\n            })\n          ) : (\n            <NewsAuthorByline\n              author={item.authorEntity ?? item.author}\n              publisher={item.publisher}\n              onAuthorClick={onAuthorClick}\n              onPublisherClick={onPublisherClick}\n              labels={labels}\n              className=\"mb-3\"\n            />\n          )\n        ) : null}\n\n        <div className=\"mt-auto flex flex-wrap items-center justify-between gap-2 border-t border-border/50 pt-4 text-xs text-muted-foreground\">\n          <div className=\"flex flex-col gap-1\">\n            {formattedRelativeTime ? <span>{formattedRelativeTime}</span> : null}\n            <LiveUpdateLine item={item} labels={labels} />\n          </div>\n          {!disableEngagementCounts ? (\n            renderEngagementCounts ? (\n              renderEngagementCounts(item, {\n                handlers: {\n                  onLike: engagementHandlers.onLike\n                    ? (id, nextLiked) => engagementHandlers.onLike?.(nextLiked)\n                    : undefined,\n                  onComment: engagementHandlers.onComment\n                    ? () => engagementHandlers.onComment?.()\n                    : undefined,\n                  onShare: engagementHandlers.onShare\n                    ? () => engagementHandlers.onShare?.()\n                    : undefined,\n                  onBookmark: engagementHandlers.onBookmark\n                    ? (id, nextBookmarked) =>\n                        engagementHandlers.onBookmark?.(nextBookmarked)\n                    : undefined,\n                },\n              })\n            ) : (\n              <NewsEngagementCounts\n                item={item}\n                handlers={engagementHandlers}\n                labels={labels}\n              />\n            )\n          ) : null}\n        </div>\n      </div>\n    </>\n  );\n\n  return (\n    <article\n      className={cn(\n        \"group relative flex h-full flex-col overflow-hidden rounded-2xl border border-border/50 bg-card transition-all duration-300 hover:shadow-xl\",\n        \"has-[a:focus-visible]:ring-2 has-[a:focus-visible]:ring-ring has-[a:focus-visible]:ring-offset-2\",\n        className,\n      )}\n    >\n      {/* State badge stack — top-right overlay (urgency / admin / commercial:\n          Breaking / Live / Pinned / Sponsored / Status). Top-left belongs to\n          the category chip rendered inside mediaBlock. Curation badges\n          (Exclusive / Featured) render as a separate kicker above the title\n          in the body — distinct semantic so they get distinct visual position. */}\n      {showStateBadges && (\n        <div className=\"absolute end-2 top-2 z-20 flex max-w-[75%] flex-wrap justify-end gap-1\">\n          {renderBadges ? (\n            renderBadges(item, { canModerate })\n          ) : (\n            <NewsBadges\n              item={item}\n              labels={labels}\n              isEditorMode={isEditorMode}\n              group=\"state\"\n            />\n          )}\n        </div>\n      )}\n\n      {href ? (\n        <LinkComponent\n          href={href}\n          aria-labelledby={titleId}\n          aria-label={ariaLabel}\n          onClick={onClick}\n          className=\"absolute inset-0 z-0 rounded-2xl outline-none\"\n        />\n      ) : null}\n\n      {articleContent}\n    </article>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/medium.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/small.tsx",
      "content": "import { Badge } from \"@/components/ui/badge\";\nimport { cn } from \"@/lib/utils\";\nimport type { ResolvedPartProps } from \"../types\";\nimport { NewsBadges } from \"./news-badges\";\nimport { ContentSensitiveGate } from \"./content-sensitive-gate\";\n\n/**\n * Small variant — horizontal thumb tile, compact sidebar density.\n *\n * Per Q-PA matrix: ONLY highest-priority badge (via `highestPriorityOnly`)\n * + sensitive gate (graphic content must always warn). NO kebab, NO author,\n * NO excerpt, NO engagement counts, NO paywall (no space + low engagement\n * value at this density), NO publisher logo, NO quoted article. Just\n * category chip + title + date + a single highest-priority badge.\n */\nexport function SmallPart(props: ResolvedPartProps) {\n  const {\n    item,\n    formattedRelativeTime,\n    categoryStyle,\n    labels,\n    LinkComponent,\n    href,\n    onClick,\n    ariaLabel,\n    titleId,\n    titleClassName,\n    imageClassName,\n    className,\n    loading,\n    viewerMode,\n    canModerate,\n    sensitiveRevealed,\n    onRevealSensitiveInternal,\n    renderBadges,\n    renderSensitiveGate,\n    disableBadgesRender,\n    disableSensitiveGate,\n    onCategoryClick,\n  } = props;\n\n  const isEditorMode = viewerMode === \"editor\";\n\n  const thumbImg = (\n    <img\n      src={item.image}\n      alt={item.title}\n      loading={loading}\n      decoding=\"async\"\n      className={cn(\n        \"h-24 w-24 shrink-0 rounded-lg object-cover\",\n        imageClassName,\n      )}\n    />\n  );\n\n  const gatedThumb =\n    !disableSensitiveGate && item.sensitivity?.isSensitive ? (\n      renderSensitiveGate ? (\n        renderSensitiveGate(item, { onReveal: onRevealSensitiveInternal })\n      ) : (\n        <ContentSensitiveGate\n          sensitivity={item.sensitivity}\n          revealed={sensitiveRevealed}\n          onReveal={onRevealSensitiveInternal}\n          labels={labels}\n          compact\n          className=\"shrink-0 overflow-hidden rounded-lg\"\n        >\n          {thumbImg}\n        </ContentSensitiveGate>\n      )\n    ) : (\n      thumbImg\n    );\n\n  return (\n    <article\n      className={cn(\n        \"group relative flex items-start gap-4 rounded-xl border border-border/50 bg-card p-4 transition-all duration-300 hover:shadow-md\",\n        \"has-[a:focus-visible]:ring-2 has-[a:focus-visible]:ring-ring has-[a:focus-visible]:ring-offset-2\",\n        className,\n      )}\n    >\n      {gatedThumb}\n\n      {href ? (\n        <LinkComponent\n          href={href}\n          aria-labelledby={titleId}\n          aria-label={ariaLabel}\n          onClick={onClick}\n          className=\"absolute inset-0 z-0 rounded-xl outline-none\"\n        />\n      ) : null}\n\n      {/* Single highest-priority badge — top-right corner */}\n      {!disableBadgesRender && (\n        <div className=\"absolute end-2 top-2 z-20\">\n          {renderBadges ? (\n            renderBadges(item, { canModerate })\n          ) : (\n            <NewsBadges\n              item={item}\n              labels={labels}\n              isEditorMode={isEditorMode}\n              highestPriorityOnly\n            />\n          )}\n        </div>\n      )}\n\n      <div className=\"flex min-w-0 flex-col justify-center\">\n        {item.category ? (\n          onCategoryClick ? (\n            <button\n              type=\"button\"\n              onClick={(e) => {\n                e.stopPropagation();\n                e.preventDefault();\n                onCategoryClick(item.category!);\n              }}\n              className=\"relative z-10 mb-2 w-fit\"\n              aria-label={`Category: ${item.category}`}\n            >\n              <Badge className={cn(categoryStyle, \"cursor-pointer text-xs\")}>\n                {item.category}\n              </Badge>\n            </button>\n          ) : (\n            <Badge\n              className={cn(categoryStyle, \"mb-2 w-fit text-xs\")}\n              aria-label={`Category: ${item.category}`}\n            >\n              {item.category}\n            </Badge>\n          )\n        ) : null}\n        <h4\n          id={titleId}\n          className={cn(\n            \"text-sm font-semibold transition-colors line-clamp-2 motion-safe:group-hover:text-primary\",\n            titleClassName,\n          )}\n        >\n          {item.title}\n        </h4>\n        {formattedRelativeTime ? (\n          <span className=\"mt-1 text-xs text-muted-foreground\">\n            {formattedRelativeTime}\n          </span>\n        ) : null}\n      </div>\n    </article>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/small.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/list.tsx",
      "content": "import { ArrowRight } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { cn } from \"@/lib/utils\";\nimport type { ResolvedPartProps } from \"../types\";\nimport { NewsBadges } from \"./news-badges\";\nimport { VisibilityBadge } from \"./visibility-badge\";\nimport { LiveUpdateLine } from \"./live-update-line\";\nimport { NewsAuthorByline } from \"./news-author-byline\";\nimport { NewsPaywallGate } from \"./news-paywall-gate\";\nimport { ContentSensitiveGate } from \"./content-sensitive-gate\";\nimport { QuotedArticleCard } from \"./quoted-article-card\";\nimport { NewsEngagementCounts } from \"./news-engagement-counts\";\nimport { NewsKebab } from \"./news-kebab\";\n\n/**\n * List variant — full-width row, compact density. Author + chevron / actions / kebab right-aligned.\n *\n * v0.3 features per Q-PA matrix: full badge stack (inline), kebab (replaces chevron when items),\n * paywall + sensitive gates (over excerpt; list has no image), quoted article, engagement counts,\n * structured author byline. NO publisher logo / topic chips / tag chips per matrix.\n */\nexport function ListPart(props: ResolvedPartProps) {\n  const {\n    item,\n    formattedRelativeTime,\n    labels,\n    LinkComponent,\n    href,\n    onClick,\n    ariaLabel,\n    titleId,\n    titleClassName,\n    className,\n    actions,\n    viewerMode,\n    canModerate,\n    paywallRevealed,\n    sensitiveRevealed,\n    onRevealPaywallInternal,\n    onRevealSensitiveInternal,\n    renderBadges,\n    renderAuthor,\n    renderExcerpt,\n    renderPaywallGate,\n    renderSensitiveGate,\n    renderQuoted,\n    renderEngagementCounts,\n    disableBadgesRender,\n    disableAuthorRender,\n    disableExcerptRender,\n    disablePaywallGate,\n    disableSensitiveGate,\n    disableQuotedRender,\n    disableEngagementCounts,\n    engagementHandlers,\n    kebabItems,\n    kebabOpen,\n    onKebabOpenChange,\n    onAuthorClick,\n    onCategoryClick,\n    onQuotedClick,\n  } = props;\n\n  const isEditorMode = viewerMode === \"editor\";\n  const showKebab = kebabItems.some((it) => !it.hidden);\n\n  // Paywall scope: list has no image, so the gate wraps the excerpt area\n  // (Q-PG — gates excerpt + media; in list there's only excerpt).\n  // Substitute paywall.preview for item.excerpt as the body text when\n  // paywalled — title stays visible above, author/quoted/engagement below.\n  const isPaywalled =\n    !disablePaywallGate && Boolean(item.paywall?.isPaywalled) && !paywallRevealed;\n\n  const previewText =\n    isPaywalled && item.paywall?.preview\n      ? `${item.paywall.preview} ${labels.paywallPreviewSeparator}`\n      : null;\n  const displayExcerpt = previewText ?? item.excerpt;\n\n  const excerptBlock =\n    !disableExcerptRender && displayExcerpt ? (\n      renderExcerpt ? (\n        renderExcerpt(item)\n      ) : (\n        <p className=\"mt-1 text-sm text-muted-foreground line-clamp-1\">\n          {displayExcerpt}\n        </p>\n      )\n    ) : null;\n\n  const sensitiveGatedExcerpt =\n    !disableSensitiveGate && item.sensitivity?.isSensitive ? (\n      renderSensitiveGate ? (\n        renderSensitiveGate(item, { onReveal: onRevealSensitiveInternal })\n      ) : (\n        <ContentSensitiveGate\n          sensitivity={item.sensitivity}\n          revealed={sensitiveRevealed}\n          onReveal={onRevealSensitiveInternal}\n          labels={labels}\n        >\n          {excerptBlock}\n        </ContentSensitiveGate>\n      )\n    ) : (\n      excerptBlock\n    );\n\n  const gatedExcerpt = isPaywalled\n    ? renderPaywallGate\n      ? renderPaywallGate(item, { onReveal: onRevealPaywallInternal })\n      : (\n          <NewsPaywallGate\n            paywall={item.paywall}\n            revealed={paywallRevealed}\n            onReveal={onRevealPaywallInternal}\n            linkComponent={LinkComponent}\n            labels={labels}\n          >\n            {sensitiveGatedExcerpt}\n          </NewsPaywallGate>\n        )\n    : sensitiveGatedExcerpt;\n\n  const innerContent = (\n    <>\n      {(item.category || formattedRelativeTime || !disableBadgesRender) && (\n        <div className=\"mb-2 flex flex-wrap items-center gap-2\">\n          {!disableBadgesRender &&\n            (renderBadges ? (\n              renderBadges(item, { canModerate })\n            ) : (\n              <NewsBadges\n                item={item}\n                labels={labels}\n                isEditorMode={isEditorMode}\n              />\n            ))}\n          {item.category ? (\n            onCategoryClick ? (\n              <button\n                type=\"button\"\n                onClick={(e) => {\n                  e.stopPropagation();\n                  e.preventDefault();\n                  onCategoryClick(item.category!);\n                }}\n                className=\"relative z-10\"\n                aria-label={`Category: ${item.category}`}\n              >\n                <Badge variant=\"outline\" className=\"cursor-pointer text-xs\">\n                  {item.category}\n                </Badge>\n              </button>\n            ) : (\n              <Badge\n                variant=\"outline\"\n                className=\"text-xs\"\n                aria-label={`Category: ${item.category}`}\n              >\n                {item.category}\n              </Badge>\n            )\n          ) : null}\n          <VisibilityBadge visibility={item.visibility} labels={labels} />\n          {formattedRelativeTime ? (\n            <span className=\"text-xs text-muted-foreground\">\n              {formattedRelativeTime}\n            </span>\n          ) : null}\n          <LiveUpdateLine item={item} labels={labels} />\n        </div>\n      )}\n      <h4\n        id={titleId}\n        className={cn(\n          \"font-semibold transition-colors line-clamp-1 motion-safe:group-hover:text-primary\",\n          titleClassName,\n        )}\n      >\n        {item.title}\n      </h4>\n      {gatedExcerpt}\n\n      {!disableAuthorRender && item.authorEntity ? (\n        renderAuthor ? (\n          renderAuthor(item.authorEntity, { publisher: item.publisher })\n        ) : (\n          <NewsAuthorByline\n            author={item.authorEntity}\n            onAuthorClick={onAuthorClick}\n            labels={labels}\n            className=\"mt-1\"\n          />\n        )\n      ) : null}\n\n      {!disableQuotedRender && item.quotedArticle ? (\n        renderQuoted ? (\n          renderQuoted(item, {\n            onClick: onQuotedClick\n              ? () => onQuotedClick(item.quotedArticle!)\n              : undefined,\n          })\n        ) : (\n          <div className=\"mt-2\">\n            <QuotedArticleCard\n              quotedArticle={item.quotedArticle}\n              onClick={onQuotedClick}\n              labels={undefined}\n            />\n          </div>\n        )\n      ) : null}\n\n      {!disableEngagementCounts ? (\n        renderEngagementCounts ? (\n          <div className=\"relative z-10 mt-2\">\n            {renderEngagementCounts(item, {\n              handlers: {\n                onLike: engagementHandlers.onLike\n                  ? (id, nextLiked) => engagementHandlers.onLike?.(nextLiked)\n                  : undefined,\n                onComment: engagementHandlers.onComment\n                  ? () => engagementHandlers.onComment?.()\n                  : undefined,\n                onShare: engagementHandlers.onShare\n                  ? () => engagementHandlers.onShare?.()\n                  : undefined,\n                onBookmark: engagementHandlers.onBookmark\n                  ? (id, nextBookmarked) =>\n                      engagementHandlers.onBookmark?.(nextBookmarked)\n                  : undefined,\n              },\n            })}\n          </div>\n        ) : (\n          <NewsEngagementCounts\n            item={item}\n            handlers={engagementHandlers}\n            labels={labels}\n            className=\"mt-2\"\n          />\n        )\n      ) : null}\n    </>\n  );\n\n  return (\n    <article\n      className={cn(\n        \"group relative flex gap-4 rounded-lg border-b border-border/50 px-2 py-4 transition-colors last:border-0 hover:bg-muted/30\",\n        \"has-[a:focus-visible]:ring-2 has-[a:focus-visible]:ring-ring has-[a:focus-visible]:ring-offset-2\",\n        className,\n      )}\n    >\n      {href ? (\n        <LinkComponent\n          href={href}\n          aria-labelledby={titleId}\n          aria-label={ariaLabel}\n          onClick={onClick}\n          className=\"absolute inset-0 z-0 rounded-lg outline-none\"\n        />\n      ) : null}\n\n      <div className=\"min-w-0 flex-1\">{innerContent}</div>\n\n      <div className=\"flex shrink-0 items-center gap-1 self-center\">\n        {actions ? (\n          <div className=\"relative z-10\">{actions}</div>\n        ) : null}\n        {showKebab ? (\n          <NewsKebab\n            items={kebabItems}\n            open={kebabOpen}\n            onOpenChange={onKebabOpenChange}\n          />\n        ) : !actions ? (\n          <ArrowRight\n            aria-hidden=\"true\"\n            className=\"h-4 w-4 text-muted-foreground transition-all motion-safe:group-hover:translate-x-1 motion-safe:group-hover:text-primary rtl:rotate-180\"\n          />\n        ) : null}\n      </div>\n    </article>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/list.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/news-badges.tsx",
      "content": "import { AlertTriangle, Pin, Star, ShieldCheck } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type { NewsCardItem, NewsCardLabels } from \"../types\";\nimport { StatusBadge } from \"./status-badge\";\nimport { SponsorBadge } from \"./sponsor-badge\";\n\n/**\n * Two logical groups inside the badge stack — they're conceptually different\n * and editorial design wants them in different positions on the card:\n *\n *   - `\"state\"` — Breaking / Live / Pinned / Sponsored / Status: WHAT IS THE\n *     STATE of this content (urgency / admin / commercial disclosure).\n *     Belongs on the IMAGE overlay (top-right corner in medium / large; top\n *     of the hero in featured) — they answer \"should I look at this now?\".\n *\n *   - `\"curation\"` — Exclusive / Featured: WHAT KIND OF EDITORIAL PRODUCT\n *     is this (Exclusive scoop / Featured pick). Belongs as a KICKER above\n *     the title in the body — they answer \"what kind of journalism is this?\".\n *\n * The priority order from Q-P42 is preserved within each group; the split\n * is purely visual layout (not a re-prioritization).\n */\nexport type NewsBadgeGroup = \"all\" | \"state\" | \"curation\";\n\ninterface NewsBadgesProps {\n  item: NewsCardItem;\n  labels: Required<NewsCardLabels>;\n  /**\n   * When `true`, only the highest-priority badge renders. Used by the `small`\n   * variant per Q-PA matrix. Operates AFTER the group filter when both are set.\n   */\n  highestPriorityOnly?: boolean;\n  /**\n   * Whether the viewer is in editor mode — status badge only renders then.\n   */\n  isEditorMode?: boolean;\n  /**\n   * Which logical group to render. Default `\"all\"`. See {@link NewsBadgeGroup}\n   * for the split rationale.\n   */\n  group?: NewsBadgeGroup;\n  className?: string;\n}\n\n/**\n * Uniform editorial badge — same shape + sizing across all states (h-5,\n * px-2, py-0, text-[10px], font-semibold, uppercase, tracking-wide). Visual\n * hierarchy lives in saturation: vivid solid for breaking-tier (Breaking /\n * Live); accent solid for editorial-curation (Featured / Exclusive); subtle\n * card-tone for low-tier (Pinned / Sponsored / status). No border-tint mix.\n * Drop-shadow on the vivid tier so they read against bright hero images.\n *\n * Sized for ~5 badges to fit on a single line at medium-card width (~280px)\n * without wrapping. Beyond that, flex-wrap kicks in.\n */\nconst BADGE_BASE =\n  \"inline-flex h-5 shrink-0 items-center gap-1 rounded px-1.5 text-[10px] font-semibold uppercase tracking-wide leading-none\";\n\n/**\n * Ordered editorial badge stack per Q-P42 priority:\n *  1. isBreaking\n *  2. isLive\n *  3. isExclusive\n *  4. isFeatured\n *  5. isPinned\n *  6. isSponsored\n *  7. status (editor mode only; renders nothing for `published`)\n *\n * `small` variant passes `highestPriorityOnly` to limit to the top badge.\n * RSC-compatible.\n */\nexport function NewsBadges({\n  item,\n  labels,\n  highestPriorityOnly = false,\n  isEditorMode = false,\n  group = \"all\",\n  className,\n}: NewsBadgesProps) {\n  const candidates: ReactNode[] = [];\n\n  // ─── State-group candidates ────────────────────────────────────────────\n  const wantsState = group === \"all\" || group === \"state\";\n\n  if (wantsState && item.isBreaking) {\n    candidates.push(\n      <span\n        key=\"breaking\"\n        className={cn(\n          BADGE_BASE,\n          \"bg-red-600 text-white shadow-sm shadow-red-950/30 ring-1 ring-red-700/40\",\n        )}\n      >\n        <AlertTriangle className=\"size-2.5\" aria-hidden />\n        {labels.breakingBadgeLabel}\n      </span>,\n    );\n  }\n  if (wantsState && item.isLive) {\n    candidates.push(\n      <span\n        key=\"live\"\n        className={cn(\n          BADGE_BASE,\n          \"bg-red-500 text-white shadow-sm shadow-red-950/30 ring-1 ring-red-700/40\",\n        )}\n      >\n        <span\n          className=\"relative inline-flex size-1.5 rounded-full bg-white motion-safe:animate-pulse\"\n          aria-hidden\n        />\n        {labels.liveBadgeLabel}\n      </span>,\n    );\n  }\n\n  // ─── Curation-group candidates ─────────────────────────────────────────\n  const wantsCuration = group === \"all\" || group === \"curation\";\n\n  if (wantsCuration && item.isExclusive) {\n    candidates.push(\n      <span\n        key=\"exclusive\"\n        className={cn(\n          BADGE_BASE,\n          \"bg-amber-500 text-amber-950 shadow-sm shadow-amber-950/20\",\n        )}\n      >\n        <ShieldCheck className=\"size-2.5\" aria-hidden />\n        {labels.exclusiveBadgeLabel}\n      </span>,\n    );\n  }\n  if (wantsCuration && item.isFeatured) {\n    candidates.push(\n      <span\n        key=\"featured\"\n        className={cn(\n          BADGE_BASE,\n          \"bg-primary text-primary-foreground shadow-sm shadow-primary/20\",\n        )}\n      >\n        <Star className=\"size-2.5 fill-current\" aria-hidden />\n        {labels.featuredBadgeLabel}\n      </span>,\n    );\n  }\n\n  // ─── State-group continuation (Pinned / Sponsored / Status) ────────────\n  if (wantsState && item.isPinned) {\n    candidates.push(\n      <span\n        key=\"pinned\"\n        className={cn(BADGE_BASE, \"bg-card/95 text-foreground ring-1 ring-border\")}\n      >\n        <Pin className=\"size-2.5 fill-current\" aria-hidden />\n        {labels.pinnedBadgeLabel}\n      </span>,\n    );\n  }\n  if (wantsState && item.isSponsored) {\n    candidates.push(\n      <SponsorBadge\n        key=\"sponsored\"\n        isSponsored={item.isSponsored}\n        sponsorLabel={item.sponsorLabel}\n        labels={labels}\n      />,\n    );\n  }\n  if (\n    wantsState &&\n    isEditorMode &&\n    item.status &&\n    item.status !== \"published\"\n  ) {\n    candidates.push(\n      <StatusBadge key=\"status\" status={item.status} labels={labels} />,\n    );\n  }\n\n  if (candidates.length === 0) return null;\n\n  const visible = highestPriorityOnly ? candidates.slice(0, 1) : candidates;\n\n  return (\n    <div className={cn(\"flex flex-wrap items-center gap-1\", className)}>\n      {visible}\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/news-badges.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/status-badge.tsx",
      "content": "import { FileEdit, CalendarClock, Archive } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport type { ContentStatus, NewsCardLabels } from \"../types\";\n\ninterface StatusBadgeProps {\n  status: ContentStatus | undefined;\n  labels: Required<NewsCardLabels>;\n  className?: string;\n}\n\n/**\n * Status badge — editor-mode-only. Renders nothing for `\"published\"` (the\n * implicit baseline) or when `status` is undefined.\n *\n * RSC-compatible (no `\"use client\"`); pure presentation.\n */\nexport function StatusBadge({ status, labels, className }: StatusBadgeProps) {\n  if (!status || status === \"published\") return null;\n\n  const config = (() => {\n    switch (status) {\n      case \"draft\":\n        return {\n          label: labels.statusDraft,\n          Icon: FileEdit,\n          tone: \"bg-muted text-muted-foreground ring-border\",\n        };\n      case \"scheduled\":\n        return {\n          label: labels.statusScheduled,\n          Icon: CalendarClock,\n          tone: \"bg-amber-500 text-amber-950 ring-amber-700/40\",\n        };\n      case \"archived\":\n        return {\n          label: labels.statusArchived,\n          Icon: Archive,\n          tone: \"bg-secondary text-secondary-foreground ring-border\",\n        };\n    }\n  })();\n\n  if (!config) return null;\n  const { label, Icon, tone } = config;\n\n  return (\n    <span\n      className={cn(\n        \"inline-flex h-5 shrink-0 items-center gap-1 rounded px-1.5 text-[10px] font-semibold uppercase tracking-wide leading-none ring-1\",\n        tone,\n        className,\n      )}\n    >\n      <Icon className=\"size-2.5\" aria-hidden />\n      {label}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/status-badge.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/visibility-badge.tsx",
      "content": "import { Globe, Users, BadgeCheck, Shield, EyeOff } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport type { NewsVisibility, NewsCardLabels } from \"../types\";\n\ninterface VisibilityBadgeProps {\n  visibility: NewsVisibility | undefined;\n  labels: Required<NewsCardLabels>;\n  className?: string;\n}\n\n/**\n * Visibility / access-tier badge. Renders for any visibility value EXCEPT\n * `\"public\"` (the implicit default — no badge for free, public content)\n * and `undefined`.\n *\n * RSC-compatible.\n */\nexport function VisibilityBadge({\n  visibility,\n  labels,\n  className,\n}: VisibilityBadgeProps) {\n  if (!visibility || visibility === \"public\") return null;\n\n  const { label, Icon } = (() => {\n    switch (visibility) {\n      case \"members\":\n        return { label: labels.visibilityMembers, Icon: Users };\n      case \"subscribers\":\n        return { label: labels.visibilitySubscribers, Icon: BadgeCheck };\n      case \"staff\":\n        return { label: labels.visibilityStaff, Icon: Shield };\n      case \"unlisted\":\n        return { label: labels.visibilityUnlisted, Icon: EyeOff };\n      default:\n        // Branded extension — custom string value\n        return { label: labels.visibilityCustom, Icon: Globe };\n    }\n  })();\n\n  return (\n    <span\n      className={cn(\n        \"inline-flex items-center gap-1 rounded-md border border-border bg-card/60 px-1.5 py-0.5 text-[10px] font-medium\",\n        className,\n      )}\n      title={label}\n    >\n      <Icon className=\"size-3\" aria-hidden />\n      {label}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/visibility-badge.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/sponsor-badge.tsx",
      "content": "import { Megaphone } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport type { NewsCardLabels } from \"../types\";\n\ninterface SponsorBadgeProps {\n  /** Whether the item is sponsored. */\n  isSponsored: boolean | undefined;\n  /** Sponsor name — renders as \"Sponsored by {name}\" via template. */\n  sponsorLabel: string | undefined;\n  labels: Required<NewsCardLabels>;\n  className?: string;\n}\n\n/**\n * Sponsor badge — renders \"Sponsored by {name}\" when `sponsorLabel` is set,\n * otherwise \"Sponsored\". No render when `isSponsored !== true`.\n *\n * RSC-compatible.\n */\nexport function SponsorBadge({\n  isSponsored,\n  sponsorLabel,\n  labels,\n  className,\n}: SponsorBadgeProps) {\n  if (!isSponsored) return null;\n\n  const text = sponsorLabel\n    ? labels.sponsoredBadgeLabelTemplate.replace(\"{name}\", sponsorLabel)\n    : labels.sponsoredBadgeFallback;\n\n  return (\n    <span\n      className={cn(\n        \"inline-flex h-5 shrink-0 items-center gap-1 rounded bg-card/95 px-1.5 text-[10px] font-semibold uppercase tracking-wide leading-none text-muted-foreground ring-1 ring-border\",\n        className,\n      )}\n    >\n      <Megaphone className=\"size-2.5\" aria-hidden />\n      {text}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/sponsor-badge.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/live-update-line.tsx",
      "content": "import { Radio } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport { defaultRelativeTime } from \"../hooks/use-relative-time\";\nimport { toDate } from \"../lib/format-default\";\nimport type { NewsCardItem, NewsCardLabels } from \"../types\";\n\ninterface LiveUpdateLineProps {\n  item: NewsCardItem;\n  labels: Required<NewsCardLabels>;\n  /** Optional custom relative-time formatter (root passes its resolved one). */\n  formatRelativeTime?: (date: Date, now?: Date) => string;\n  className?: string;\n}\n\n/**\n * Live-update sub-line — rendered below the date when `isLive === true` AND\n * `lastLiveUpdateAt` is set. Renders \"Updated 3m ago · 14 updates\" using the\n * `liveUpdatedTemplate` label (placeholders `{time}` + `{count}`).\n *\n * Visual: small pulsing dot prefix for the live signal. `motion-reduce`\n * removes the pulse.\n *\n * RSC-compatible.\n */\nexport function LiveUpdateLine({\n  item,\n  labels,\n  formatRelativeTime,\n  className,\n}: LiveUpdateLineProps) {\n  if (!item.isLive || !item.lastLiveUpdateAt) return null;\n\n  const date = toDate(item.lastLiveUpdateAt);\n  if (!date) return null;\n\n  const time = (formatRelativeTime ?? defaultRelativeTime)(date);\n  const count = item.liveUpdateCount ?? 0;\n  const text = labels.liveUpdatedTemplate\n    .replace(\"{time}\", time)\n    .replace(\"{count}\", String(count));\n\n  return (\n    <span\n      className={cn(\n        \"inline-flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground\",\n        className,\n      )}\n    >\n      <span\n        className=\"relative inline-flex size-2 rounded-full bg-red-500 motion-safe:animate-pulse\"\n        aria-hidden\n      />\n      <Radio className=\"size-3\" aria-hidden />\n      {text}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/live-update-line.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/news-author-byline.tsx",
      "content": "import { BadgeCheck } from \"lucide-react\";\nimport type { ElementType, MouseEvent } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type {\n  NewsCardLabels,\n  NewsArticleAuthor,\n  NewsPublisher,\n} from \"../types\";\n\ninterface NewsAuthorBylineProps {\n  /**\n   * Structured author OR plain string (v0.2 soft-compat). When both an\n   * `authorEntity` and `author` string are on the item, the root component\n   * passes the structured one and this part renders it; otherwise the string\n   * fallback path is taken.\n   */\n  author: NewsArticleAuthor | string | undefined;\n  /** Publisher to render in a small sub-line below the author. */\n  publisher?: NewsPublisher | undefined;\n  /** Optional click handler — wraps the byline in a button when set. */\n  onAuthorClick?: (author: NewsArticleAuthor) => void;\n  /** Optional publisher click handler. */\n  onPublisherClick?: (publisher: NewsPublisher) => void;\n  /** Optional polymorphic element for author link (when an id-bearing author is clickable). */\n  authorComponent?: ElementType;\n  labels: Required<NewsCardLabels>;\n  className?: string;\n}\n\n/**\n * Author byline cluster.\n *\n * - Structured author: avatar (when set) + name + optional role + verified tick\n * - String fallback: just the name (no avatar, no role)\n * - Publisher (optional): rendered on a second line below the author\n *\n * RSC-compatible — no DOM state. Click handlers fire on the rendered button\n * elements which are hydrated by the consumer's React runtime.\n */\nexport function NewsAuthorByline({\n  author,\n  publisher,\n  onAuthorClick,\n  onPublisherClick,\n  authorComponent: AuthorComponent = \"button\",\n  labels,\n  className,\n}: NewsAuthorBylineProps) {\n  if (!author && !publisher) return null;\n\n  const structured = isStructuredAuthor(author) ? author : undefined;\n  const nameText = structured?.name ?? (typeof author === \"string\" ? author : undefined);\n\n  const handleAuthorClick = (event: MouseEvent) => {\n    if (!structured || !onAuthorClick) return;\n    event.preventDefault();\n    onAuthorClick(structured);\n  };\n\n  const handlePublisherClick = (event: MouseEvent) => {\n    if (!publisher || !onPublisherClick) return;\n    event.preventDefault();\n    onPublisherClick(publisher);\n  };\n\n  return (\n    <div\n      className={cn(\n        \"flex flex-col gap-0.5 text-xs text-muted-foreground\",\n        className,\n      )}\n    >\n      {nameText && (\n        <div className=\"flex items-center gap-1.5\">\n          {structured?.avatar && (\n            <img\n              src={structured.avatar}\n              alt=\"\"\n              aria-hidden\n              className=\"size-5 rounded-full object-cover\"\n            />\n          )}\n          {structured && onAuthorClick ? (\n            <AuthorComponent\n              type={AuthorComponent === \"button\" ? \"button\" : undefined}\n              onClick={handleAuthorClick}\n              className=\"relative z-10 -mx-1 cursor-pointer rounded-sm px-1 font-medium text-foreground transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n            >\n              {nameText}\n            </AuthorComponent>\n          ) : (\n            <span className=\"font-medium text-foreground\">{nameText}</span>\n          )}\n          {structured?.isVerified && (\n            <BadgeCheck\n              className=\"size-3.5 text-primary\"\n              aria-label={labels.verifiedAuthorLabel}\n            />\n          )}\n          {structured?.role && (\n            <span className=\"text-muted-foreground/80\">· {structured.role}</span>\n          )}\n        </div>\n      )}\n      {publisher && (\n        <div className=\"flex items-center gap-1.5\">\n          {publisher.logo && (\n            <img\n              src={publisher.logo}\n              alt=\"\"\n              aria-hidden\n              className=\"size-4 rounded object-contain\"\n            />\n          )}\n          {onPublisherClick ? (\n            <button\n              type=\"button\"\n              onClick={handlePublisherClick}\n              className=\"relative z-10 -mx-1 cursor-pointer rounded-sm px-1 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n            >\n              {publisher.name}\n            </button>\n          ) : (\n            <span>{publisher.name}</span>\n          )}\n        </div>\n      )}\n    </div>\n  );\n}\n\nfunction isStructuredAuthor(\n  value: NewsArticleAuthor | string | undefined,\n): value is NewsArticleAuthor {\n  return typeof value === \"object\" && value !== null && \"id\" in value && \"name\" in value;\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/news-author-byline.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/news-publisher-row.tsx",
      "content": "import type { MouseEvent } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type { NewsPublisher } from \"../types\";\n\ninterface NewsPublisherRowProps {\n  publisher: NewsPublisher | undefined;\n  onPublisherClick?: (publisher: NewsPublisher) => void;\n  /** When `true`, renders just the logo (no name). For tight variant slots. */\n  logoOnly?: boolean;\n  className?: string;\n}\n\n/**\n * Standalone publisher row — logo + name + optional click handler.\n *\n * Use case beyond the author byline: featured/large variants render this\n * inline above the title as the \"source attribution\" chip (parallels the\n * `featured`-variant category chip pattern).\n *\n * RSC-compatible — no DOM state.\n */\nexport function NewsPublisherRow({\n  publisher,\n  onPublisherClick,\n  logoOnly = false,\n  className,\n}: NewsPublisherRowProps) {\n  if (!publisher) return null;\n\n  const handleClick = (event: MouseEvent) => {\n    if (!onPublisherClick) return;\n    event.preventDefault();\n    onPublisherClick(publisher);\n  };\n\n  const content = (\n    <>\n      {publisher.logo && (\n        <img\n          src={publisher.logo}\n          alt={logoOnly ? publisher.name : \"\"}\n          aria-hidden={!logoOnly}\n          className=\"size-5 rounded object-contain\"\n        />\n      )}\n      {!logoOnly && (\n        <span className=\"text-xs font-medium\">{publisher.name}</span>\n      )}\n    </>\n  );\n\n  const baseClass =\n    \"inline-flex items-center gap-1.5 rounded-md border border-border/60 bg-card/80 px-2 py-1 backdrop-blur-sm\";\n\n  if (onPublisherClick) {\n    return (\n      <button\n        type=\"button\"\n        onClick={handleClick}\n        className={cn(\n          baseClass,\n          \"relative z-10 cursor-pointer transition-colors hover:bg-card focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n          className,\n        )}\n      >\n        {content}\n      </button>\n    );\n  }\n\n  return <span className={cn(baseClass, className)}>{content}</span>;\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/news-publisher-row.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/news-paywall-gate.tsx",
      "content": "\"use client\";\n\nimport { Lock } from \"lucide-react\";\nimport type { ElementType, MouseEvent, ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type { NewsCardLabels, ContentPaywall } from \"../types\";\n\ninterface NewsPaywallGateProps {\n  paywall: ContentPaywall | undefined;\n  /**\n   * Internal reveal handler — fires `onRevealPaywall(articleId)` analytics\n   * hook AND flips local `paywallRevealed` state. Called BEFORE navigation\n   * when `ctaHref` is set.\n   */\n  onReveal: () => void;\n  /**\n   * The content this gate wraps (the media block). Gets blurred + overlaid\n   * with the CTA when `paywall.isPaywalled === true` AND not yet revealed.\n   *\n   * **Scope (Q-PG lock):** the gate covers MEDIA only; the variant renders\n   * `paywall.preview` text in place of `item.excerpt` in the card body so the\n   * preview reads naturally inline with title + author + footer (all of which\n   * stay visible above and below the gate per the editorial paywall pattern).\n   * Wrapping the entire card body would hide everything the reader needs to\n   * recognize the article — title, byline, date — and is the bug closed in\n   * v0.3 (initial impl). See parts/medium.tsx + parts/large.tsx for the\n   * canonical integration.\n   */\n  children: ReactNode;\n  /** Has the host pushed `paywallRevealed=true` via the handle's revealPaywall? */\n  revealed?: boolean;\n  /** Element used for the CTA anchor when `ctaHref` is set. Default 'a'. */\n  linkComponent?: ElementType;\n  labels: Required<NewsCardLabels>;\n  className?: string;\n  /** Tailwind classes for the overlay (background, padding, etc). */\n  overlayClassName?: string;\n}\n\n/**\n * Paywall gate — premium-content overlay over the media area.\n *\n * Renders nothing extra when `!paywall?.isPaywalled || revealed` — the\n * children pass through unwrapped. Otherwise wraps the children in a\n * blurred copy + an absolute overlay carrying the lock icon, heading, and\n * Subscribe CTA.\n *\n * **CTA element resolution (Q-P33):** when `paywall.ctaHref` is set →\n * CTA renders as `<LinkComponent href={ctaHref}>` (consumers pass\n * `linkComponent` to swap in NextLink / RemixLink / etc.); `onClick` fires\n * `onRevealPaywall(articleId)` BEFORE navigation. When unset → `<button>`\n * that fires `onRevealPaywall` only (host shows their own paywall UI in\n * response).\n *\n * **Preview-text note (Q-PG):** the `paywall.preview` words do NOT render\n * inside this part. They render in the variant body in place of\n * `item.excerpt` so they read naturally inline with the rest of the card\n * (title above, author below). This split keeps the gate purely focused\n * on the gated media area + CTA, and prevents the \"preview at top of card\n * overlapping the badge stack\" bug from earlier implementations.\n *\n * Sub-exported as `NewsPaywallGate` for standalone use — pair it with your\n * own preview text rendering.\n */\nexport function NewsPaywallGate({\n  paywall,\n  onReveal,\n  children,\n  revealed = false,\n  linkComponent: LinkComponent = \"a\",\n  labels,\n  className,\n  overlayClassName,\n}: NewsPaywallGateProps) {\n  if (!paywall?.isPaywalled || revealed) return <>{children}</>;\n\n  const ctaLabel = paywall.ctaLabel ?? labels.paywallDefaultCta;\n  const hasHref = Boolean(paywall.ctaHref);\n\n  const handleCtaClick = (event: MouseEvent) => {\n    // Fire analytics hook BEFORE any navigation. When ctaHref is set, the\n    // browser will navigate after this callback returns; when not set, the\n    // host opens their own paywall UI in response.\n    onReveal();\n    if (!hasHref) event.preventDefault();\n  };\n\n  return (\n    <div className={cn(\"relative\", className)}>\n      {/* Blurred underlying content (decorative — actual interactions blocked) */}\n      <div\n        className=\"motion-safe:transition-[filter,opacity] pointer-events-none select-none blur-sm opacity-40\"\n        aria-hidden\n      >\n        {children}\n      </div>\n\n      {/* Overlay with CTA */}\n      <div\n        aria-label={labels.paywallBlurredOverlayAria}\n        className={cn(\n          \"absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-card/95 p-4 text-center backdrop-blur-sm\",\n          overlayClassName,\n        )}\n      >\n        <Lock className=\"size-5 text-primary\" aria-hidden />\n        <p className=\"text-sm font-semibold\">{labels.paywallHeading}</p>\n\n        {hasHref ? (\n          <LinkComponent\n            href={paywall.ctaHref}\n            onClick={handleCtaClick}\n            className=\"relative z-20 inline-flex h-11 cursor-pointer items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n          >\n            {ctaLabel}\n          </LinkComponent>\n        ) : (\n          <button\n            type=\"button\"\n            onClick={handleCtaClick}\n            className=\"relative z-20 inline-flex h-11 cursor-pointer items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n          >\n            {ctaLabel}\n          </button>\n        )}\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/news-paywall-gate.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/content-sensitive-gate.tsx",
      "content": "\"use client\";\n\nimport { AlertOctagon, Eye } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type {\n  NewsCardLabels,\n  ContentSensitivity,\n} from \"../types\";\n\ninterface ContentSensitiveGateProps {\n  sensitivity: ContentSensitivity | undefined;\n  /** Has the host pushed `sensitiveRevealed=true` via the handle's revealSensitive? */\n  revealed?: boolean;\n  /**\n   * Internal reveal handler — fires `onRevealSensitive(articleId)` analytics\n   * hook AND flips local `sensitiveRevealed` state.\n   */\n  onReveal: () => void;\n  /**\n   * The media this gate wraps. Renders normally when not sensitive, OR when\n   * already revealed; otherwise is masked behind the blur overlay.\n   */\n  children: ReactNode;\n  labels: Required<NewsCardLabels>;\n  /**\n   * Compact rendering for tight containers (used by the `small` variant's\n   * 96×96 thumb per Q-PA matrix). Drops the heading + warnings list +\n   * 44px reveal button in favor of a single icon + tiny `<button>` pill\n   * sized to fit a 96×96 container. The full overlay is too tall to fit a\n   * sidebar-density thumb (~180px content height vs 96px container) — fall\n   * back to compact when wrapping anything narrower than ~160×160.\n   */\n  compact?: boolean;\n  className?: string;\n}\n\n/**\n * Sensitive content gate — content-warning overlay over media only.\n *\n * Distinct from `NewsPaywallGate` per Q-D9 — sensitive = content warning\n * (NSFW / graphic / upsetting); paywall = monetization gate. Different\n * motivations, different CTAs, separately styleable.\n *\n * UX: heavy blur over the media + an `AlertOctagon` icon + heading +\n * optional content-warning list + reveal button. Tap the button to reveal\n * for this session (state lives in the root component's `sensitiveRevealed`\n * mirror; the host can re-gate via `ref.current.reset(item)`).\n *\n * `prefers-reduced-motion` snaps reveal instead of fading.\n *\n * Sub-exported as `ContentSensitiveGate` for standalone use.\n */\nexport function ContentSensitiveGate({\n  sensitivity,\n  revealed = false,\n  onReveal,\n  children,\n  labels,\n  compact = false,\n  className,\n}: ContentSensitiveGateProps) {\n  if (!sensitivity?.isSensitive || revealed) return <>{children}</>;\n\n  const warnings = sensitivity.contentWarnings ?? [];\n  const warningText = warnings.length\n    ? labels.sensitiveContentWarningTemplate.replace(\n        \"{warnings}\",\n        warnings.join(\", \"),\n      )\n    : sensitivity.reason;\n\n  return (\n    <div className={cn(\"relative\", className)}>\n      <div\n        className=\"motion-safe:transition-[filter,opacity] pointer-events-none select-none blur-xl opacity-30\"\n        aria-hidden\n      >\n        {children}\n      </div>\n\n      {compact ? (\n        <div className=\"absolute inset-0 z-10 flex flex-col items-center justify-center gap-1.5 rounded-md bg-card/95 p-2 text-center backdrop-blur-md\">\n          <AlertOctagon\n            className=\"size-5 text-amber-600 dark:text-amber-400\"\n            aria-hidden\n          />\n          <button\n            type=\"button\"\n            onClick={onReveal}\n            aria-label={`${labels.sensitiveHeading}: ${labels.sensitiveRevealLabel}`}\n            className=\"relative z-20 inline-flex cursor-pointer items-center gap-1 rounded-full bg-foreground/90 px-2 py-1 text-[11px] font-medium text-background transition-colors hover:bg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1\"\n          >\n            <Eye className=\"size-3\" aria-hidden />\n            {labels.sensitiveRevealLabel}\n          </button>\n        </div>\n      ) : (\n        <div className=\"absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 rounded-md bg-card/90 p-4 text-center backdrop-blur-md\">\n          <AlertOctagon\n            className=\"size-6 text-amber-600 dark:text-amber-400\"\n            aria-hidden\n          />\n          <p className=\"text-sm font-semibold\">{labels.sensitiveHeading}</p>\n          {warningText && (\n            <p className=\"text-xs text-muted-foreground\">{warningText}</p>\n          )}\n          <button\n            type=\"button\"\n            onClick={onReveal}\n            className=\"relative z-20 mt-1 inline-flex h-11 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-border bg-background px-4 text-sm font-medium transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n          >\n            <Eye className=\"size-4\" aria-hidden />\n            {labels.sensitiveRevealLabel}\n          </button>\n        </div>\n      )}\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/content-sensitive-gate.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/quoted-article-card.tsx",
      "content": "\"use client\";\n\nimport { useMemo, type ElementType, type MouseEvent } from \"react\";\nimport { Quote } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport { NewsCard } from \"../news-card\";\nimport { stripQuotedRecursion } from \"../lib/defaults\";\nimport type { NewsCardItem, NewsCardProps } from \"../types\";\n\nexport interface QuotedArticleCardProps {\n  /** The original article being quoted. */\n  quotedArticle: NewsCardItem;\n  /**\n   * Click handler — overrides default `href`-based navigation. When set,\n   * the foreground click target renders as `<button>` and fires with the\n   * quoted article. When omitted and `href` is set, renders as `<a href>`.\n   * When neither set, the card is non-interactive (visual quote only).\n   */\n  onClick?: (quotedArticle: NewsCardItem) => void;\n  /** Optional href for the default navigation case. */\n  href?: string;\n  /** Polymorphic root for the anchor case. Default 'a'. */\n  linkComponent?: NewsCardProps[\"linkComponent\"];\n  /** Forwarded to the nested `<NewsCard>` for label strings. */\n  labels?: NewsCardProps[\"labels\"];\n  className?: string;\n}\n\n/**\n * Quoted article mini-card per Q-P32 + Q-PE.\n *\n * Renders a nested `<NewsCard variant=\"small\">` with the compact\n * horizontal thumb-left, body-right layout. The small variant is the right\n * shape for a quote preview — full medium card recursion produced too much\n * vertical stack (own image header + own paywall + own author cluster) and\n * masked the parent card's own content.\n *\n * Defenses applied to the inner card:\n *  - `quotedArticle` stripped via {@link stripQuotedRecursion} (no infinite nesting)\n *  - `actions` undefined (no nested kebab; pointer-events-none wrapper blocks any leak)\n *  - `viewerMode` undefined (no role-aware UI in the nested card)\n *  - `disableQuotedRender` true (defense in depth — if recursion-strip ever drifts)\n *  - `disableEngagementCounts` true (no engagement on quoted articles)\n *  - `disablePaywallGate` true — quoted articles surface their TITLE + IMAGE\n *    for context. The paywall is a property of THIS reader's relationship to\n *    the quoted article, not relevant when previewing the quote attribution.\n *  - `disableSensitiveGate` true — same rationale (the quote preview is a\n *    citation, not the actual sensitive content; warning gates again would\n *    just hide what the reader needs to recognize the source).\n *  - `disableBadgesRender` true — initially we kept badges so quoted\n *    articles could surface their contextual state (Breaking / Live /\n *    Exclusive), but the small variant's top-right badge position\n *    overlapped the title in the compact preview. The quote should be a\n *    clean citation — if the host needs to indicate the quoted article's\n *    state, they render their own badge on the QuotedArticleCard wrapper\n *    via `className`. (Not implemented — reconsider if a quote variant\n *    with badge-on-thumb-corner lands later.)\n *\n * Inner article's own border / bg / padding flattened via `className` so the\n * QuotedArticleCard wrapper's `bg-muted/40 border border-border` styling is\n * the only \"card chrome\" — no double-frames.\n *\n * The inner card is wrapped in `pointer-events-none` so any descendant\n * interactivity cannot conflict with the foreground click target at `z-10`.\n *\n * Per the Q-PA matrix, this part renders only in `medium` + `list` variants —\n * the integration at C11 enforces that.\n */\nexport function QuotedArticleCard({\n  quotedArticle,\n  onClick,\n  href,\n  linkComponent: LinkComponent = \"a\" as ElementType,\n  labels,\n  className,\n}: QuotedArticleCardProps) {\n  const strippedItem = useMemo(\n    () => stripQuotedRecursion(quotedArticle),\n    [quotedArticle],\n  );\n\n  const handleClick = (event: MouseEvent) => {\n    if (!onClick) return;\n    event.preventDefault();\n    onClick(quotedArticle);\n  };\n\n  const isInteractive = Boolean(onClick) || Boolean(href);\n\n  return (\n    <div\n      className={cn(\n        \"relative rounded-md border border-border bg-muted/40\",\n        className,\n      )}\n    >\n      {/* Quote glyph — top-right context cue */}\n      <Quote\n        className=\"pointer-events-none absolute end-2 top-2 z-[1] size-4 text-muted-foreground/50\"\n        aria-hidden\n      />\n\n      {/* Nested card — pointer-events-none stops nested interactives competing\n          with the foreground click target below. Inner card's chrome flattened. */}\n      <div className=\"pointer-events-none\">\n        <NewsCard\n          item={strippedItem}\n          variant=\"small\"\n          labels={labels}\n          actions={undefined}\n          viewerMode={undefined}\n          disableQuotedRender\n          disableEngagementCounts\n          disablePaywallGate\n          disableSensitiveGate\n          disableBadgesRender\n          className=\"border-0 bg-transparent p-3 rounded-md shadow-none hover:shadow-none transition-none\"\n        />\n      </div>\n\n      {/* Foreground click target (when interactive) */}\n      {isInteractive && (\n        <>\n          {onClick ? (\n            <button\n              type=\"button\"\n              onClick={handleClick}\n              aria-label={`Read quoted article: ${quotedArticle.title}`}\n              className=\"absolute inset-0 z-10 cursor-pointer rounded-md transition-colors hover:bg-foreground/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n            />\n          ) : (\n            <LinkComponent\n              href={href}\n              aria-label={`Read quoted article: ${quotedArticle.title}`}\n              className=\"absolute inset-0 z-10 cursor-pointer rounded-md transition-colors hover:bg-foreground/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n            />\n          )}\n        </>\n      )}\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/quoted-article-card.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/news-engagement-counts.tsx",
      "content": "\"use client\";\n\nimport { Heart, MessageCircle, Bookmark, Share2 } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport type {\n  NewsCardItem,\n  NewsCardLabels,\n} from \"../types\";\n\ninterface EngagementHandlerBag {\n  onLike?: (nextLiked: boolean) => void;\n  onComment?: () => void;\n  onShare?: () => void;\n  onBookmark?: (nextBookmarked: boolean) => void;\n}\n\ninterface NewsEngagementCountsProps {\n  item: NewsCardItem;\n  handlers: EngagementHandlerBag;\n  labels: Required<NewsCardLabels>;\n  className?: string;\n}\n\n/**\n * Light engagement-counts row per Q-D6=(a) + Q-P35.\n *\n * Renders inline count chips for like / comment / bookmark / share. Each\n * chip:\n *   - Hides when count is missing AND its handler is missing (no data to show + no action to take)\n *   - Shows as a non-interactive count when count present but handler missing\n *   - Shows as an interactive button when handler present (count optional)\n *   - Suppresses comment chip when `item.commentsEnabled === false`\n *\n * The like chip has bistate styling — filled heart when `isLiked` true.\n * Bookmark chip same pattern.\n *\n * **Consumers wanting the full engagement-bar** (inline likers, share menu,\n * realtime subscribe) pass `<EngagementBar>` into the\n * `renderEngagementCounts` slot — this part is the *default* render, swapped\n * out per the slot pattern per description §6.2. Engagement data shape on\n * `NewsCardItem` deliberately matches engagement-bar's counts shape so\n * the slot is drop-in.\n *\n * Sub-exported as `NewsEngagementCounts`.\n */\nexport function NewsEngagementCounts({\n  item,\n  handlers,\n  labels,\n  className,\n}: NewsEngagementCountsProps) {\n  const hasLike = Number.isFinite(item.likeCount) || Boolean(handlers.onLike);\n  const hasComment =\n    item.commentsEnabled !== false &&\n    (Number.isFinite(item.commentCount) || Boolean(handlers.onComment));\n  const hasBookmark =\n    Number.isFinite(item.bookmarkCount) || Boolean(handlers.onBookmark);\n  const hasShare = Number.isFinite(item.shareCount) || Boolean(handlers.onShare);\n\n  if (!hasLike && !hasComment && !hasBookmark && !hasShare) return null;\n\n  const formatCount = (n: number | undefined): string => {\n    if (n === undefined) return \"\";\n    if (n < 1000) return String(n);\n    if (n < 1_000_000) return `${(n / 1000).toFixed(n < 10_000 ? 1 : 0)}k`;\n    return `${(n / 1_000_000).toFixed(1)}m`;\n  };\n\n  return (\n    <div\n      className={cn(\n        \"relative z-10 flex flex-wrap items-center gap-1\",\n        className,\n      )}\n    >\n      {hasLike && (\n        <EngagementChip\n          interactive={Boolean(handlers.onLike)}\n          onClick={() => handlers.onLike?.(!item.isLiked)}\n          ariaLabel={labels.likeAriaLabel.replace(\n            \"{count}\",\n            String(item.likeCount ?? 0),\n          )}\n          active={item.isLiked}\n          activeTone=\"text-red-600 dark:text-red-400\"\n        >\n          <Heart\n            className={cn(\n              \"size-3.5\",\n              item.isLiked ? \"fill-current\" : \"\",\n            )}\n            aria-hidden\n          />\n          {item.likeCount !== undefined && (\n            <span className=\"text-xs font-medium\">\n              {formatCount(item.likeCount)}\n            </span>\n          )}\n        </EngagementChip>\n      )}\n\n      {hasComment && (\n        <EngagementChip\n          interactive={Boolean(handlers.onComment)}\n          onClick={() => handlers.onComment?.()}\n          ariaLabel={labels.commentAriaLabel.replace(\n            \"{count}\",\n            String(item.commentCount ?? 0),\n          )}\n        >\n          <MessageCircle className=\"size-3.5\" aria-hidden />\n          {item.commentCount !== undefined && (\n            <span className=\"text-xs font-medium\">\n              {formatCount(item.commentCount)}\n            </span>\n          )}\n        </EngagementChip>\n      )}\n\n      {hasBookmark && (\n        <EngagementChip\n          interactive={Boolean(handlers.onBookmark)}\n          onClick={() => handlers.onBookmark?.(!item.isBookmarked)}\n          ariaLabel={labels.bookmarkAriaLabel.replace(\n            \"{count}\",\n            String(item.bookmarkCount ?? 0),\n          )}\n          active={item.isBookmarked}\n          activeTone=\"text-primary\"\n        >\n          <Bookmark\n            className={cn(\n              \"size-3.5\",\n              item.isBookmarked ? \"fill-current\" : \"\",\n            )}\n            aria-hidden\n          />\n          {item.bookmarkCount !== undefined && (\n            <span className=\"text-xs font-medium\">\n              {formatCount(item.bookmarkCount)}\n            </span>\n          )}\n        </EngagementChip>\n      )}\n\n      {hasShare && (\n        <EngagementChip\n          interactive={Boolean(handlers.onShare)}\n          onClick={() => handlers.onShare?.()}\n          ariaLabel={labels.shareAriaLabel.replace(\n            \"{count}\",\n            String(item.shareCount ?? 0),\n          )}\n        >\n          <Share2 className=\"size-3.5\" aria-hidden />\n          {item.shareCount !== undefined && (\n            <span className=\"text-xs font-medium\">\n              {formatCount(item.shareCount)}\n            </span>\n          )}\n        </EngagementChip>\n      )}\n    </div>\n  );\n}\n\ninterface EngagementChipProps {\n  interactive: boolean;\n  onClick: () => void;\n  ariaLabel: string;\n  active?: boolean;\n  activeTone?: string;\n  children: React.ReactNode;\n}\n\nfunction EngagementChip({\n  interactive,\n  onClick,\n  ariaLabel,\n  active,\n  activeTone,\n  children,\n}: EngagementChipProps) {\n  const baseClass = cn(\n    \"inline-flex h-11 min-w-11 items-center gap-1 rounded-md px-2 text-muted-foreground transition-colors\",\n    active && activeTone,\n  );\n\n  if (interactive) {\n    return (\n      <button\n        type=\"button\"\n        onClick={(e) => {\n          e.stopPropagation();\n          e.preventDefault();\n          onClick();\n        }}\n        aria-label={ariaLabel}\n        aria-pressed={active}\n        className={cn(\n          baseClass,\n          \"cursor-pointer hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n        )}\n      >\n        {children}\n      </button>\n    );\n  }\n\n  return (\n    <span className={baseClass} aria-label={ariaLabel}>\n      {children}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/news-engagement-counts.tsx"
    },
    {
      "path": "src/registry/components/data/news-card/parts/news-kebab.tsx",
      "content": "\"use client\";\n\nimport { MoreHorizontal } from \"lucide-react\";\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuSeparator,\n  DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { cn } from \"@/lib/utils\";\n\n// F-S1 lock: cross-procomp imports use RELATIVE paths to specific files.\nimport type { CommentMenuItem } from \"../../comment-thread/types\";\n\ninterface NewsKebabProps {\n  items: CommentMenuItem[];\n  /** aria-label for the trigger button. Default \"Open menu\". */\n  triggerAriaLabel?: string;\n  className?: string;\n  /** Controlled open state — lets `NewsCardHandle.openKebab()` reach the menu. */\n  open?: boolean;\n  onOpenChange?: (open: boolean) => void;\n}\n\n/**\n * Kebab dropdown shared across all 5 variant parts (except `small`, which\n * skips kebab per Q-PA matrix). Renders a 44×44 touch target with vertical\n * ellipsis icon; the menu opens via shadcn DropdownMenu.\n *\n * Items shape comes from `CommentMenuItem` (reused from comment-thread,\n * same as post-card's kebab pattern). `separatorBefore: true` injects a\n * `<DropdownMenuSeparator>` above the item.\n *\n * **F-cross-13 defensive pattern (per memory):** uses `<DropdownMenuTrigger>`\n * directly with the trigger button as its child (no `asChild` to avoid\n * Base UI's Slot composition surface). All callback contravariance handled\n * by the items' `onClick` lambdas.\n *\n * Items with `hidden: true` are left out.\n *\n * Returns `null` when no item is visible — caller's responsibility to skip\n * rendering the kebab cluster entirely when no items.\n */\nexport function NewsKebab({\n  items,\n  triggerAriaLabel = \"Open menu\",\n  className,\n  open,\n  onOpenChange,\n}: NewsKebabProps) {\n  // `hidden` items (comment-thread 0.4.0's `CommentMenuItem.hidden`) are left out; a menu whose\n  // items are all hidden is not rendered.\n  const visible = items.filter((it) => !it.hidden);\n  if (visible.length === 0) return null;\n\n  return (\n    <DropdownMenu open={open} onOpenChange={onOpenChange}>\n      <DropdownMenuTrigger\n        aria-label={triggerAriaLabel}\n        className={cn(\n          \"relative z-10 inline-flex h-11 w-11 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n          className,\n        )}\n      >\n        <MoreHorizontal className=\"size-5\" aria-hidden />\n      </DropdownMenuTrigger>\n      <DropdownMenuContent align=\"end\" className=\"w-56\">\n        {visible.map((it, idx) => (\n          <KebabRow\n            key={`${it.label}-${idx}`}\n            item={it}\n            isFirst={idx === 0}\n          />\n        ))}\n      </DropdownMenuContent>\n    </DropdownMenu>\n  );\n}\n\ninterface KebabRowProps {\n  item: CommentMenuItem;\n  isFirst: boolean;\n}\n\nfunction KebabRow({ item, isFirst }: KebabRowProps) {\n  return (\n    <>\n      {item.separatorBefore && !isFirst && <DropdownMenuSeparator />}\n      <DropdownMenuItem\n        disabled={item.disabled}\n        onClick={(e) => {\n          e.stopPropagation();\n          item.onClick?.();\n        }}\n        className={cn(\n          item.destructive &&\n            \"text-destructive focus:text-destructive focus:bg-destructive/10\",\n        )}\n      >\n        {item.icon}\n        <span>{item.label}</span>\n      </DropdownMenuItem>\n    </>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/news-card/parts/news-kebab.tsx"
    }
  ],
  "meta": {
    "version": "0.4.5",
    "status": "alpha"
  },
  "categories": [
    "data",
    "news"
  ],
  "type": "registry:block"
}