@flamingo-stack/openframe-frontend-core 0.0.288-snapshot.20260618172839 → 0.0.288

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/{chunk-LZQ4HSOR.cjs → chunk-6AW25OS6.cjs} +25 -25
  2. package/dist/{chunk-LZQ4HSOR.cjs.map → chunk-6AW25OS6.cjs.map} +1 -1
  3. package/dist/{chunk-6NL7TTDR.cjs → chunk-6CSW5TMS.cjs} +23 -23
  4. package/dist/{chunk-6NL7TTDR.cjs.map → chunk-6CSW5TMS.cjs.map} +1 -1
  5. package/dist/{chunk-UBFYGWFP.js → chunk-AISIZLZP.js} +2 -2
  6. package/dist/{chunk-OV3ZCU6X.cjs → chunk-DVUFNTI2.cjs} +4 -4
  7. package/dist/{chunk-OV3ZCU6X.cjs.map → chunk-DVUFNTI2.cjs.map} +1 -1
  8. package/dist/{chunk-P2SO7ADJ.js → chunk-EFYXPR43.js} +5 -7
  9. package/dist/{chunk-P2SO7ADJ.js.map → chunk-EFYXPR43.js.map} +1 -1
  10. package/dist/{chunk-PYHCHGM5.js → chunk-GJDXIVEQ.js} +2 -2
  11. package/dist/{chunk-DFAMTCC4.cjs → chunk-JQ4I743L.cjs} +5 -5
  12. package/dist/{chunk-DFAMTCC4.cjs.map → chunk-JQ4I743L.cjs.map} +1 -1
  13. package/dist/{chunk-KLXCXNLW.cjs → chunk-OXC72UIP.cjs} +5 -7
  14. package/dist/chunk-OXC72UIP.cjs.map +1 -0
  15. package/dist/{chunk-HIABEYRE.cjs → chunk-RG6FNZUA.cjs} +3 -3
  16. package/dist/{chunk-HIABEYRE.cjs.map → chunk-RG6FNZUA.cjs.map} +1 -1
  17. package/dist/{chunk-Q6S6DCVP.js → chunk-RWCA2ZQK.js} +2 -2
  18. package/dist/{chunk-7YLTJXMQ.js → chunk-TY2EB7VK.js} +2 -2
  19. package/dist/{chunk-BZR546EB.js → chunk-ZYLQMCHW.js} +2 -2
  20. package/dist/components/chat/hooks/use-realtime-chunk-processor.d.ts.map +1 -1
  21. package/dist/components/chat/index.cjs +2 -2
  22. package/dist/components/chat/index.js +1 -1
  23. package/dist/components/chat/types/api.types.d.ts +4 -11
  24. package/dist/components/chat/types/api.types.d.ts.map +1 -1
  25. package/dist/components/chat/utils/history-merge.d.ts +1 -5
  26. package/dist/components/chat/utils/history-merge.d.ts.map +1 -1
  27. package/dist/components/contact/index.cjs +3 -3
  28. package/dist/components/contact/index.js +2 -2
  29. package/dist/components/embeds/index.cjs +3 -3
  30. package/dist/components/embeds/index.js +2 -2
  31. package/dist/components/faq/index.cjs +3 -3
  32. package/dist/components/faq/index.js +2 -2
  33. package/dist/components/features/index.cjs +2 -2
  34. package/dist/components/features/index.js +1 -1
  35. package/dist/components/index.cjs +46 -46
  36. package/dist/components/index.js +5 -5
  37. package/dist/components/navigation/index.cjs +2 -2
  38. package/dist/components/navigation/index.js +1 -1
  39. package/dist/components/related-content/index.cjs +3 -3
  40. package/dist/components/related-content/index.js +2 -2
  41. package/dist/components/tickets/index.cjs +45 -45
  42. package/dist/components/tickets/index.js +3 -3
  43. package/dist/components/ui/index.cjs +2 -2
  44. package/dist/components/ui/index.js +1 -1
  45. package/dist/index.cjs +2 -2
  46. package/dist/index.js +1 -1
  47. package/package.json +1 -1
  48. package/src/components/chat/hooks/use-realtime-chunk-processor.ts +1 -3
  49. package/src/components/chat/types/api.types.ts +6 -9
  50. package/src/components/chat/utils/__tests__/history-merge.test.ts +0 -62
  51. package/src/components/chat/utils/history-merge.ts +1 -5
  52. package/dist/chunk-KLXCXNLW.cjs.map +0 -1
  53. /package/dist/{chunk-UBFYGWFP.js.map → chunk-AISIZLZP.js.map} +0 -0
  54. /package/dist/{chunk-PYHCHGM5.js.map → chunk-GJDXIVEQ.js.map} +0 -0
  55. /package/dist/{chunk-Q6S6DCVP.js.map → chunk-RWCA2ZQK.js.map} +0 -0
  56. /package/dist/{chunk-7YLTJXMQ.js.map → chunk-TY2EB7VK.js.map} +0 -0
  57. /package/dist/{chunk-BZR546EB.js.map → chunk-ZYLQMCHW.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-6NL7TTDR.cjs","../src/components/related-content/related-content-section.tsx"],"names":["buildListUrl"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACCA,8BAA4D;AAS5D,+CAAA,CAAA;AA+Fa,+CAAA;AA1Cb,SAAS,wBAAA,CAAyB,EAAE,IAAA,EAAM,cAAA,EAAgB,SAAS,CAAA,EAAqD;AACtH,EAAA,GAAA,CAAI,CAAC,IAAA,EAAM,OAAO,QAAA,CAAS,IAAI,CAAA;AAC/B,EAAA,MAAM,OAAA,EAAS,4CAAA,EAAe,IAAA,EAAM,cAAA,EAAgB,aAAA,EAAe,GAAG,CAAC,CAAA;AACvE,EAAA,OAAO,QAAA;AAAA,IACL,OAAA,EACI,EAAE,IAAA,EAAM,MAAA,EAAQ,QAAA,EAAU,GAAA,EAAK,sBAAsB,EAAA,EACrD,EAAE,KAAK;AAAA,EACb,CAAA;AACF;AAKA,SAAS,kBAAA,CAAmB,GAAA,EAAyE;AACnG,EAAA,OAAO,EAAE,IAAA,EAAM,GAAA,CAAI,IAAA,GAAO,IAAA,EAAM,cAAA,mBAAgB,GAAA,CAAI,cAAA,UAAkB,OAAK,CAAA;AAC7E;AAiBA,SAAS,qBAAA,CACP,IAAA,EACA,IAAA,EACA,iBAAA,EACiB;AAGjB,EAAA,MAAM,WAAA,EAA+B,KAA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AA,QACA,MAAA;AAAA,QACA,iBAAA;AAAA,QACA,OAAA,kBACE,6BAAA,IAAC,EAAA,EAAG,SAAA,EAAU,iGAAA,EACX,QAAA,EAAA,6DAAA,IAAkC,EAAA,CACrC;AAAA,MAAA,CAAA;AAAA,MAZG;AAAA,IAcP,CACD;AAAA,EAAA,EAAA,CACH,CAAA;AAEJ;ADnbA;AACA;AACE;AACA;AACF,iGAAC","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-6NL7TTDR.cjs","sourcesContent":[null,"\"use client\";\n\n/**\n * RelatedContentSection\n *\n * Renders content references grouped by type using the canonical card\n * components. MOVED from the hub (`components/shared/related-content-card.tsx`)\n * so any consuming app can embed it; the hub keeps a thin wrapper that\n * pre-binds its host-specific injections (nav hook, URL recomposition,\n * program configs, admin campaign card).\n *\n * THREE data modes (precedence top-down):\n * 1. CONTROLLED — `contentRefs` provided (even `[]`): render exactly those\n * refs, no suggestion fetch (the original investor-update behavior).\n * 2. SUGGESTION — `entityType` + `entityId` provided: self-fetch\n * `GET {apiBaseUrl}/api/related-content?entityType&entityId[&count][&excludeTypes]`\n * (the generic 5-tier engine's second web service). `minResults` maps to\n * `count`; absent → param not sent (server default applies). Each ref\n * carries a `reason` (data-only — never rendered, matching the\n * FaqSection/FaqWithReason precedent).\n * 3. SSR-HYDRATED suggestion — also pass `initialItems` (the server page\n * called the engine directly); the first client fetch is skipped per the\n * `useSelfFetch` initialData contract.\n *\n * Group layout (list vs grid) + card size (lg vs default) come from\n * `CONTENT_REF_GROUPS` in `../../utils/content-ref-groups` — single source of\n * truth, no per-type logic in this file. Skeletons come from\n * `renderSkeletonForType` so the placeholder height matches the loaded card\n * exactly (zero layout shift on resolve).\n *\n * One API call per content type via the shared list-URL builder\n * (`buildListUrl` — injectable; defaults to the lib's byte-parity-tested\n * builder prefixed with `apiBaseUrl`). Fetching uses `useSelfFetch` (plain\n * fetch, NO react-query) so third-party embedders need no QueryClientProvider;\n * cards are imported via DEEP module paths (not the chat barrel) so this\n * chunk never reaches `@tanstack/react-query`.\n *\n * LOCKSTEP NOTE: this file's per-type card/skeleton dispatch is the SIZED\n * sibling of the chat-side `CHAT_CARD_REGISTRY` (`../chat/entity-cards/\n * dispatch.tsx`), which renders compact `size='sm'` cards wired to the chat\n * runtime. Two dispatchers by design — when registering a new fetch-mode\n * content type, add it BOTH there and here (cards + skeleton + list URL).\n */\n\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport {\n CONTENT_REF_GROUPS,\n getContentRefLabelOrTitleCase,\n orderContentRefTypes,\n type ContentRefGroupConfig,\n} from '../../utils/content-ref-groups';\nimport type { ContentRef, ContentRefWithReason } from '../../types/content-ref';\nimport { useSelfFetch } from '../../hooks/use-self-fetch';\nimport { Pagination } from '../pagination';\nimport { extractItems, extractItemId } from '../../utils/extract-items';\nimport { buildListUrl as libBuildListUrl, canonicalContentRefType } from '../../utils/list-url';\nimport { buildSuggestionUrl } from '../../utils/suggestion-url';\nimport { decideNewTab } from '../chat/utils/decide-new-tab';\n// DEEP card imports — NOT the `../chat` barrel (the barrel statically reaches\n// @tanstack/react-query via embeddable-chat + its hooks). Deep paths keep this\n// component's SOURCE graph react-query-free. Note: tsup's shared-chunk\n// splitting may still colocate the cards with chat hooks in one dist chunk\n// (react-query is a required peerDep, so resolution always succeeds) — the\n// guarantee that matters here is the RUNTIME one: nothing on this path ever\n// instantiates a QueryClient, so embedders need NO QueryClientProvider.\nimport { BlogCard, BlogCardSkeleton } from '../chat/entity-cards/blog-card';\nimport { WhatIShippedCard, WhatIShippedCardSkeleton } from '../chat/entity-cards/what-i-shipped-card';\nimport { CaseStudyCard, CaseStudyCardSkeleton } from '../chat/entity-cards/case-study-card';\nimport { CustomerInterviewCard, CustomerInterviewCardSkeleton } from '../chat/entity-cards/customer-interview-card';\nimport { ProductReleaseCard, ProductReleaseCardSkeleton } from '../chat/entity-cards/product-release-card';\nimport { buildProductReleaseCardProps } from '../chat/entity-cards/product-release-card-defaults';\nimport { ProgramCard, ProgramCardSkeleton } from '../chat/entity-cards/program-card';\nimport { InvestorUpdateCard, InvestorUpdateCardSkeleton } from '../chat/entity-cards/investor-update-card';\nimport { OnboardingGuideCard, OnboardingGuideCardSkeleton } from '../chat/entity-cards/onboarding-guide-card';\nimport { RoadmapCard, RoadmapCardSkeleton } from '../chat/entity-cards/roadmap-card';\n// Type-only — erased at build, no runtime dependency on the dispatch module.\nimport type { ChatCardDispatchExtras } from '../chat/entity-cards/dispatch';\n\ntype CardSize = 'lg' | 'default' | 'sm';\n\n/** Anchor prop bundle the per-card link surface receives — same shape the\n * hub's `useNavLink` returns and the chat dispatcher's anchor builders\n * produce. `null` = non-anchor mode (no URL). */\nexport interface CardLinkAnchorProps {\n href: string;\n target?: '_blank';\n rel?: 'noopener noreferrer';\n onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;\n}\n\n/** Render-prop component injection for the navigation decision — keeps hook\n * calls legal (hooks live INSIDE the injected component; `CardForType`\n * itself calls zero hooks). The hub injects a `useNavLink`-backed provider;\n * the default is hook-free (pure `decideNewTab`). MUST be defined at module\n * scope by hosts — an inline arrow would remount every card each render. */\nexport interface CardLinkProviderProps {\n href: string | null;\n targetPlatform: string | null;\n children: (linkProps: CardLinkAnchorProps | null) => React.ReactElement | null;\n}\nexport type CardLinkProvider = React.ComponentType<CardLinkProviderProps>;\n\n/** Default link provider for standalone embeds: relative/-same-origin hrefs\n * stay same-tab, cross-origin pops a new tab (pure `decideNewTab` with no\n * platform context — `currentSource: ''` falls through to the origin\n * check). No router integration, no hooks. */\nfunction DefaultLinkPropsProvider({ href, targetPlatform, children }: CardLinkProviderProps): React.ReactElement | null {\n if (!href) return children(null);\n const newTab = decideNewTab({ href, targetPlatform, currentSource: '' });\n return children(\n newTab\n ? { href, target: '_blank', rel: 'noopener noreferrer' }\n : { href },\n );\n}\n\n/** Default href resolution: trust the ref's stored url/targetPlatform as the\n * API composed them. The hub overrides this with its `buildContentURL`\n * re-composition so dev gets localhost and prod gets platform domains. */\nfunction defaultResolveHref(ref: ContentRef): { href: string | null; targetPlatform: string | null } {\n return { href: ref.url || null, targetPlatform: ref.targetPlatform ?? null };\n}\n\n/** Host-injected renderer pair for the admin-only `marketing_campaign` type.\n * Absent (every non-hub embed) → the type renders nothing (its list URL\n * hits `/api/admin`, unreachable outside the hub anyway). */\nexport interface AdminCampaignCardSlot {\n Card: React.ComponentType<{ campaign: any }>;\n Skeleton: React.ComponentType<{ size?: 'default' | 'sm' }>;\n}\n\n/**\n * Per-type skeleton dispatch — returns the SAME colocated skeleton the\n * resolved card renders, sized to match (zero layout shift on resolve).\n * The chat-side `CHAT_CARD_REGISTRY` already does this via\n * `entry.skeleton()`; this surface exposes the same discipline to the\n * related-content rail.\n */\nfunction renderSkeletonForType(\n type: string,\n size: CardSize,\n adminCampaignCard?: AdminCampaignCardSlot,\n): React.ReactNode {\n // Most card skeletons accept only `{default, sm}`. `'lg'` collapses to\n // `'default'`. ProductReleaseCardSkeleton uses lg/sm pair.\n const legacySize: 'default' | 'sm' = size === 'sm' ? 'sm' : 'default';\n switch (type) {\n case 'blog_post_existing':\n return <BlogCardSkeleton size={legacySize} />;\n case 'case_study':\n return <CaseStudyCardSkeleton size={legacySize} />;\n case 'customer_interview':\n return <CustomerInterviewCardSkeleton size={legacySize} />;\n case 'product_release':\n return <ProductReleaseCardSkeleton size={size === 'sm' ? 'sm' : 'lg'} />;\n case 'podcast':\n case 'webinar':\n case 'event':\n return <ProgramCardSkeleton size={legacySize} />;\n case 'investor_update':\n return <InvestorUpdateCardSkeleton size={legacySize} />;\n case 'onboarding_guide':\n // The rich catalog variant (hero + author grid, clamped description) —\n // the step-numbered 'default' variant is for the guide detail page's\n // \"More in section\" rail, not this full-width row.\n return <OnboardingGuideCardSkeleton size={size === 'sm' ? 'sm' : 'catalog'} />;\n case 'what_i_shipped':\n // Matches the WhatIShippedCard (AdminContentCard 3:2) shape.\n return <WhatIShippedCardSkeleton />;\n case 'marketing_campaign':\n return adminCampaignCard ? <adminCampaignCard.Skeleton size={legacySize} /> : null;\n case 'roadmap_item':\n case 'delivery_item':\n case 'internal_task':\n return <RoadmapCardSkeleton size={legacySize} />;\n default:\n return null;\n }\n}\n\n/**\n * Per-type card dispatch — renders the right card with the right size.\n * Sized cards (`'lg'` / `'default'`) are unique to this rail — the chat\n * dispatcher only renders `'sm'`, so we go directly through the per-type\n * cards here.\n *\n * PURE FUNCTION COMPONENT WITH ZERO HOOK CALLS: the placeholder comes from a\n * plain `extras.buildOgPlaceholderUrl` call (the chat `dispatch.tsx`\n * pattern) and the anchor-prop bundle arrives via the `LinkProvider`\n * render-prop from the parent — so per-card hook legality is owned by the\n * injected provider component, not by this switch.\n *\n * `href` comes from the host's `resolveHref(ref)` (hub: live\n * `buildContentURL` recomposition; default: the ref's stored url).\n */\nfunction CardForType({\n type,\n item,\n size,\n href,\n targetPlatform,\n linkProps,\n extras,\n adminCampaignCard,\n}: {\n type: string;\n item: any;\n size: CardSize;\n href: string;\n targetPlatform: string | null;\n linkProps: CardLinkAnchorProps | null;\n extras?: ChatCardDispatchExtras;\n adminCampaignCard?: AdminCampaignCardSlot;\n}): React.ReactNode {\n // Most card variants accept only `{default, sm}`. `'lg'` collapses to\n // `'default'` for those. ProductReleaseCard uses its own lg/sm pair.\n const legacySize: 'default' | 'sm' = size === 'sm' ? 'sm' : 'default';\n // OG placeholder URL — injected into the pure-presentation cards so they\n // render a branded fallback when the row's featured image is null. Plain\n // function call (NOT a hook). Title is the universal field across all card\n // item shapes used here.\n const placeholderUrl =\n extras?.buildOgPlaceholderUrl?.((item?.title as string | undefined) ?? '') ?? undefined;\n\n // Top-level target/rel for cards that take them as separate props\n // (BlogCard, CaseStudyCard, …). ProductReleaseCard takes the bundle as a\n // single `anchorProps={...}` and uses `linkProps` directly. When the host\n // didn't surface a URL, `linkProps` is null and the card stays in\n // non-anchor mode.\n const anchorAttrs: Pick<CardLinkAnchorProps, 'target' | 'rel'> = linkProps\n ? { target: linkProps.target, rel: linkProps.rel }\n : {};\n\n switch (type) {\n case 'blog_post_existing':\n return <BlogCard post={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'case_study':\n return <CaseStudyCard study={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'customer_interview':\n return <CustomerInterviewCard interview={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'product_release': {\n // Anchor-prop pattern: build product-release lg-variant props from the\n // shared `buildProductReleaseCardProps` so this rail and the /releases\n // catalog page render byte-identically. The card wraps in\n // `<a {...anchorProps}>` ONLY when `anchorProps.href` is set — pass\n // `undefined` (not an empty object) when href is empty so the card\n // stays in non-anchor mode without rendering a dead <a> tag.\n const releaseSize = size === 'sm' ? 'sm' : 'lg';\n const buildReleaseProps = extras?.buildProductReleaseCardProps ?? buildProductReleaseCardProps;\n const releaseProps = buildReleaseProps(item);\n return (\n <ProductReleaseCard\n size={releaseSize}\n title={item.title}\n summary={item.summary}\n version={item.version}\n {...releaseProps}\n anchorProps={linkProps ?? undefined}\n />\n );\n }\n case 'podcast':\n return extras?.programConfigs?.podcast\n ? <ProgramCard config={extras.programConfigs.podcast} item={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />\n : null;\n case 'webinar':\n return extras?.programConfigs?.webinar\n ? <ProgramCard config={extras.programConfigs.webinar} item={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />\n : null;\n case 'event':\n return extras?.programConfigs?.event\n ? <ProgramCard config={extras.programConfigs.event} item={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />\n : null;\n case 'investor_update':\n return <InvestorUpdateCard update={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'onboarding_guide':\n // Catalog variant (see skeleton note) — full-width rich card with a\n // line-clamped description instead of the step-numbered rail card.\n return <OnboardingGuideCard guide={item} size={size === 'sm' ? 'sm' : 'catalog'} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'what_i_shipped':\n // THE single What I Shipped card — same lib component the people-hub\n // dashboard renders, so the card is identical in the rail and the\n // dashboard. `anchorProps` makes the whole card a click-through link\n // (rail is read-only — no owner actions).\n return (\n <WhatIShippedCard\n entry={item}\n placeholderUrl={placeholderUrl}\n // Only pass anchorProps when there's a REAL href — a fallback object\n // with `href: undefined` is still truthy and would make WhatIShippedCard\n // wrap the card in a dead <a> (no URL). Mirrors the ProductReleaseCard\n // `linkProps ?? undefined` pattern above.\n anchorProps={\n linkProps ??\n (href ? ({ href, ...anchorAttrs } as React.AnchorHTMLAttributes<HTMLAnchorElement>) : undefined)\n }\n />\n );\n case 'marketing_campaign':\n return adminCampaignCard ? <adminCampaignCard.Card campaign={item} /> : null;\n case 'roadmap_item':\n case 'delivery_item':\n case 'internal_task':\n return (\n <RoadmapCard\n item={item}\n href={href ?? ''}\n targetPlatform={targetPlatform}\n userVote={null}\n onVote={() => {}}\n size={legacySize}\n cardType={type as 'roadmap_item' | 'delivery_item' | 'internal_task'}\n {...anchorAttrs}\n />\n );\n default:\n return null;\n }\n}\n\n// =============================================================================\n// Fetch all items for a type in ONE server-sorted call, via the injectable\n// list-URL builder. `useSelfFetch` (URL = cache key) replaces the hub's old\n// react-query usage: `enabled` ≙ `url === null`, `!res.ok`/network error ≙\n// `error → items null → group renders nothing`. Accepted deltas vs\n// react-query: no retry/backoff, no focus refetch, no cross-mount cache.\n// =============================================================================\n\nfunction useGroupItems(\n type: string,\n refs: ContentRef[],\n buildUrl: (type: string, ids: string[]) => string | null,\n) {\n const ids = refs.map((r) => r.id);\n const url = ids.length > 0 ? buildUrl(type, ids) : null;\n const { data, isLoading } = useSelfFetch<unknown>(url);\n const items = data != null ? extractItems(data) : null;\n return { items, isLoading };\n}\n\n// =============================================================================\n// Per-group renderer — one API call, server-sorted, then render cards via the\n// dispatcher with per-type skeletons + per-type layout from CONTENT_REF_GROUPS.\n// =============================================================================\n\n/** Map columns prop → tailwind grid class. Only consulted for grid-layout\n * groups; list-layout groups stack vertically. */\nfunction gridClassFor(columns: 2 | 3): string {\n return columns === 3\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6'\n : 'grid grid-cols-1 sm:grid-cols-2 gap-6';\n}\n\n/** Resolve the group config for a type, falling back to a grid layout with\n * the default card size for unregistered types so the section still renders\n * rather than silently dropping them. The `label` field on the fallback is\n * intentionally a placeholder — the section heading goes through\n * `getContentRefLabelOrTitleCase(type)` instead so cross-surface labels\n * stay consistent between this rail and the investor-email builder. */\nfunction resolveGroupConfig(type: string): ContentRefGroupConfig {\n return CONTENT_REF_GROUPS[type] ?? {\n label: type,\n order: 999,\n layout: 'grid',\n gridSize: 'default',\n };\n}\n\n/** Items per page within one type group. Groups larger than this paginate\n * with the standard Pagination control (NO nested scrolling — a bounded\n * scrollbox inside the page traps wheel events and hides the sections\n * below it). MUST stay at or above the largest suggestion fill\n * (RELATED_SAME_TYPE_COUNT in the hub's lib/constants/suggestions.ts) so\n * current rails never paginate — only genuinely big groups (author pages)\n * do. Exported through the subpath barrel for the hub's module-load\n * assertion of that relation (entity-suggestion-sections.tsx). */\nexport const GROUP_PAGE_SIZE = 12;\n\nfunction ContentGroup({\n type,\n refs,\n columns,\n buildUrl,\n resolveHref,\n LinkProvider,\n extras,\n adminCampaignCard,\n heading,\n}: {\n type: string;\n refs: ContentRef[];\n columns: 2 | 3;\n buildUrl: (type: string, ids: string[]) => string | null;\n resolveHref: (ref: ContentRef) => { href: string | null; targetPlatform: string | null };\n LinkProvider: CardLinkProvider;\n extras?: ChatCardDispatchExtras;\n adminCampaignCard?: AdminCampaignCardSlot;\n /** Group heading, rendered INSIDE the group so a group that resolves to\n * nothing (fetch miss / unsupported type / missing program config) drops\n * its heading too — no orphaned titles. */\n heading: React.ReactNode;\n}) {\n const { items, isLoading } = useGroupItems(type, refs, buildUrl);\n const config = resolveGroupConfig(type);\n const isListLayout = config.layout === 'list';\n const cardSize = config.gridSize;\n\n // Per-group pagination for big groups (author pages): GROUP_PAGE_SIZE items\n // per page with the standard Pagination control below the group. Client-side\n // slicing — useGroupItems already fetched every row in one batched call, so\n // page flips are instant. Hooks live above every early return (file\n // convention). Page is clamped so a shrinking refs array (suggestion\n // refetch) can never strand the view past the last page, and RESET when the\n // ref set actually changes (shrink→grow must not return to a stale page).\n const [page, setPage] = useState(1);\n const refsKey = refs.map((r) => r.id).join('|');\n const prevRefsKeyRef = useRef(refsKey);\n useEffect(() => {\n if (prevRefsKeyRef.current !== refsKey) {\n prevRefsKeyRef.current = refsKey;\n setPage(1);\n }\n }, [refsKey]);\n const totalGroupPages = Math.max(1, Math.ceil(refs.length / GROUP_PAGE_SIZE));\n const safePage = Math.min(page, totalGroupPages);\n const visibleGroupRefs =\n refs.length > GROUP_PAGE_SIZE\n ? refs.slice((safePage - 1) * GROUP_PAGE_SIZE, safePage * GROUP_PAGE_SIZE)\n : refs;\n const groupPagination =\n totalGroupPages > 1 ? (\n <Pagination currentPage={safePage} totalPages={totalGroupPages} onPageChange={setPage} />\n ) : null;\n\n // Skeleton gate: `isLoading && !items` — SSR HTML and the client's first\n // paint render identical skeletons (useSelfFetch starts isLoading=true on\n // both sides), and once items exist they are never replaced by skeletons.\n if (isLoading && !items) {\n const skeletons = visibleGroupRefs.map((r) => (\n <div key={r.id}>{renderSkeletonForType(type, cardSize, adminCampaignCard)}</div>\n ));\n return (\n <div className=\"space-y-4\">\n {heading}\n {isListLayout ? (\n <div className=\"space-y-4\">{skeletons}</div>\n ) : (\n <div className={gridClassFor(columns)}>{skeletons}</div>\n )}\n </div>\n );\n }\n\n if (!items || items.length === 0) return null;\n\n // Index fetched rows by id, then render in REF order — refs carry the\n // intended sequence (suggestion mode: the engine's tier order, so\n // same-platform/tag-matched items lead; controlled mode: the curated\n // display_order). The list APIs return rows date-sorted, which would\n // otherwise scramble that ordering (same-platform items sinking below\n // newer cross-platform ones).\n // Shared extractor (NOT raw `.id`) — some API shapes key items differently\n // (e.g. external_id types); raw access would silently drop valid items.\n const itemById = new Map(\n (items as any[]).map((it) => [extractItemId(type, it) ?? String((it as any)?.id), it]),\n );\n\n const cards = visibleGroupRefs\n .map((contentRef) => {\n const itemId = String(contentRef.id);\n const item = itemById.get(itemId);\n if (!item) return null;\n // Re-compose the URL via the host's resolver (hub: buildContentURL so\n // dev gets localhost and prod the right platform domain; default: the\n // ref's stored url as the API composed it).\n const resolved = resolveHref(contentRef);\n const href = resolved.href ?? '';\n const targetPlatform = resolved.targetPlatform ?? contentRef.targetPlatform ?? null;\n return (\n <div key={itemId}>\n <LinkProvider href={href || null} targetPlatform={targetPlatform}>\n {(linkProps) => (\n <CardForType\n type={type}\n item={item}\n size={cardSize}\n href={href}\n targetPlatform={targetPlatform}\n linkProps={linkProps}\n extras={extras}\n adminCampaignCard={adminCampaignCard}\n />\n )}\n </LinkProvider>\n </div>\n );\n })\n .filter(Boolean);\n\n if (cards.length === 0) {\n // Current PAGE resolved zero cards (rows deleted between the ref fetch\n // and the group fetch, or a stricter list-API gate dropped them). When a\n // pager exists the user must keep the controls to navigate back —\n // dropping the whole group would strand them. A genuinely empty group\n // (no pager) still vanishes with its heading.\n if (groupPagination) {\n return (\n <div className=\"space-y-4\">\n {heading}\n {groupPagination}\n </div>\n );\n }\n return null;\n }\n\n return (\n <div className=\"space-y-4\">\n {heading}\n {isListLayout ? (\n <div className=\"space-y-4\">{cards}</div>\n ) : (\n <div className={gridClassFor(columns)}>{cards}</div>\n )}\n {groupPagination}\n </div>\n );\n}\n\n// =============================================================================\n// Main component\n// =============================================================================\n\ninterface RelatedContentResponse {\n refs: ContentRefWithReason[];\n}\n\nexport interface RelatedContentSectionProps {\n /** CONTROLLED mode (the original behavior). When defined — even `[]` — no\n * suggestion fetch runs and exactly these refs render. */\n contentRefs?: ContentRef[];\n /** SUGGESTION mode (with `entityId`): self-fetch suggestions for this host\n * entity from `{apiBaseUrl}/api/related-content`. Ignored when\n * `contentRefs` is provided. */\n entityType?: string;\n entityId?: number | string;\n /** AUTHOR mode: self-fetch ALL published content authored by this profile\n * from `{apiBaseUrl}/api/related-content?authorId=…` (grouped per type,\n * endless within each group). Ignored when `contentRefs` is provided;\n * takes precedence over the entityType/entityId suggestion scope.\n * SSR-hydrate via `initialItems`, same as suggestion mode. */\n authorId?: string;\n /** Maps to the suggestion API's `count` param — the PER-TYPE fill target\n * for every candidate type EXCEPT the host's own. Absent → param not sent\n * (server default applies). */\n minResults?: number;\n /** Maps to the suggestion API's `sameTypeCount` param — the budget for the\n * candidate type MATCHING the host's own `entityType` (same-type boost:\n * a blog post's rail leads with more blog posts). Absent → param not\n * sent (host's type uses the server's `count`). */\n sameTypeMinResults?: number;\n /** SSR hydrate for suggestion mode — the server page ran the engine and\n * drills the refs here; the first client fetch is skipped (useSelfFetch\n * initialData contract). */\n initialItems?: ContentRefWithReason[];\n /** Section title (default: \"Related Content\") */\n title?: string;\n /**\n * Grid columns at desktop. 2 = denser cards / wider summary (original\n * investor-update layout); 3 = more cards per row for dashboards.\n * Only consulted for grid-layout groups. Default: 2.\n */\n columns?: 2 | 3;\n /**\n * ContentRef.type values to exclude. Honored in ALL modes — controlled\n * mode post-filters (original behavior); suggestion mode ALSO forwards the\n * list verbatim as the API's `excludeTypes=` param so excluded types never\n * consume engine fill slots (`minResults` stays honored). The subtraction\n * happens SERVER-side — this component never mirrors the hub's candidate\n * list.\n */\n excludeTypes?: string[];\n /**\n * SUGGESTION-mode allow-list (rail vocabulary): which content types\n * participate in this rail. Sent verbatim as the API's `types=` param —\n * the SERVER intersects it with its own allowed candidate set, and\n * platform policy gates (e.g. internal-only types) ALWAYS win: the client\n * cannot request its way past them. Absent → all server-side candidates.\n */\n includeTypes?: string[];\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin). Applied to BOTH the suggestion fetch and the\n * default per-group list fetches. */\n apiBaseUrl?: string;\n /** Host injection bundle — REUSES the chat dispatcher's\n * `ChatCardDispatchExtras` (programConfigs, buildOgPlaceholderUrl,\n * buildProductReleaseCardProps override). Program groups render nothing\n * when their config is absent. */\n extras?: ChatCardDispatchExtras;\n /** Hub injects its `buildContentURL` recomposition; default uses the\n * ref's stored `url`/`targetPlatform` as the API composed them. */\n resolveHref?: (ref: ContentRef) => { href: string | null; targetPlatform: string | null };\n /** Hub injects its registry-driven entity-list-api builder; default = the\n * lib's `buildListUrl(type, ids, apiBaseUrl)`. */\n buildListUrl?: (type: string, ids: string[]) => string | null;\n /** Hub injects a `useNavLink`-backed render-prop provider; default = pure\n * anchor via `decideNewTab`. MUST be a module-scope component. */\n LinkProvider?: CardLinkProvider;\n /** Renderer pair for the admin-only `marketing_campaign` type. Absent →\n * the type renders nothing. */\n adminCampaignCard?: AdminCampaignCardSlot;\n /** When true, render the section shell (title + an empty-state line) even\n * with ZERO refs, instead of returning null. Default false (the original\n * behavior — empty rail = no shell). Opt-in per host page (e.g. people-hub's\n * \"What I Shipped\", where the section should always be present). */\n showWhenEmpty?: boolean;\n /** Empty-state copy shown under the title when `showWhenEmpty` and no refs.\n * Default: \"No related content yet.\" */\n emptyStateText?: string;\n /** Custom empty-state node (e.g. a hub `<EmptyState/>`) rendered under the\n * title when `showWhenEmpty` and there are no refs — overrides\n * `emptyStateText`. Lets a host match its canonical empty state. */\n emptyState?: React.ReactNode;\n}\n\nexport function RelatedContentSection({\n contentRefs,\n entityType,\n entityId,\n authorId,\n minResults,\n sameTypeMinResults,\n includeTypes,\n initialItems,\n title = 'Related Content',\n columns = 2,\n excludeTypes,\n apiBaseUrl = '',\n extras,\n resolveHref = defaultResolveHref,\n buildListUrl,\n LinkProvider = DefaultLinkPropsProvider,\n adminCampaignCard,\n showWhenEmpty = false,\n emptyStateText = 'No related content yet.',\n emptyState,\n}: RelatedContentSectionProps) {\n // ── Hooks above EVERY early return (the original `if (!contentRefs.length)\n // return null` guard moved below them). ──\n\n // Suggestion-mode fetch URL — null in controlled mode (contentRefs defined,\n // even []) or when the entity scope is incomplete.\n // `includeTypes: []` is an explicit \"nothing participates\" — skip the fetch\n // entirely (an empty-string `types=` param would be dropped by the URL\n // builder and read server-side as \"all candidates\") AND ignore SSR refs.\n const suggestionsDisabled = includeTypes?.length === 0;\n // Shared type-filter params — one spelling for both fetch modes so a future\n // normalization (trim/dedupe) can't diverge between them.\n const typeFilterParams = {\n types: includeTypes !== undefined ? includeTypes.join(',') : undefined,\n excludeTypes: excludeTypes && excludeTypes.length > 0 ? excludeTypes.join(',') : undefined,\n };\n // AUTHOR mode beats suggestion mode: when `authorId` is set the rail lists\n // everything that profile authored (the server returns ALL, no count).\n const authorUrl =\n contentRefs === undefined && authorId && !suggestionsDisabled\n ? buildSuggestionUrl('/api/related-content', {\n apiBaseUrl,\n extraParams: { authorId, ...typeFilterParams },\n })\n : null;\n const suggestUrl =\n authorUrl ??\n (contentRefs === undefined &&\n entityType &&\n entityId !== undefined &&\n entityId !== null &&\n entityId !== '' &&\n !suggestionsDisabled\n ? buildSuggestionUrl('/api/related-content', {\n apiBaseUrl,\n entityType,\n entityId,\n count: minResults,\n extraParams: {\n sameTypeCount: sameTypeMinResults !== undefined ? String(sameTypeMinResults) : undefined,\n ...typeFilterParams,\n },\n })\n : null);\n // Memoize the initialData wrapper — useSelfFetch re-syncs on [initialData],\n // and a fresh per-render object would loop setState under re-rendering\n // parents (the latent FaqSection bug, fixed there in the same change).\n const initialData = useMemo<RelatedContentResponse | undefined>(\n // An explicitly disabled rail (includeTypes: []) must ignore SSR-hydrated\n // refs too — otherwise useSelfFetch(null, {initialData}) keeps serving\n // initialItems and the \"nothing participates\" contract silently breaks.\n () => (!suggestionsDisabled && initialItems ? { refs: initialItems } : undefined),\n [initialItems, suggestionsDisabled],\n );\n const { data, isLoading } = useSelfFetch<RelatedContentResponse>(suggestUrl, { initialData });\n\n // Default group fetcher: the lib's byte-parity-tested builder, prefixed for\n // embeds. Memoized so group-fetch URLs stay value-stable across renders.\n const effectiveBuildListUrl = useMemo(\n () => buildListUrl ?? ((type: string, ids: string[]) => libBuildListUrl(type, ids, apiBaseUrl)),\n [buildListUrl, apiBaseUrl],\n );\n\n const refs: ContentRef[] = contentRefs ?? data?.refs ?? [];\n\n // Per-consumer type gating — drops refs whose `type` is in the exclude\n // list. In suggestion mode the server already subtracted these (the param\n // is forwarded above); the client filter stays as an idempotent guard and\n // IS the mechanism in controlled mode (original behavior).\n const exclude = new Set(excludeTypes || []);\n const visibleRefs = exclude.size > 0 ? refs.filter((r) => !exclude.has(r.type)) : refs;\n // Zero refs (still loading in suggestion mode, or genuinely empty). Default:\n // no empty shell. Opt-in (`showWhenEmpty`): render the title + an empty-state\n // line so the section is always present (e.g. people-hub \"What I Shipped\").\n if (!visibleRefs.length) {\n if (!showWhenEmpty) return null; // non-showWhenEmpty consumers stay blank (unchanged)\n // Client-fetch loading (author/suggestion mode, no SSR initialItems): render a\n // SKELETON grid — reserves height + matches the rest of the app's loading, so\n // there's no blank-then-pop jump (the prior `return null` collapsed the tab to\n // zero height during the fetch). SSR controlled mode has isLoading=false → it\n // skips straight to the empty state below. Skeleton type = the requested rail\n // type (author mode passes a single `includeTypes`).\n if (isLoading) {\n const skeletonType = includeTypes?.[0] ?? entityType ?? 'blog_post_existing';\n return (\n <div className=\"space-y-8\">\n <h2 className=\"text-2xl font-bold text-ods-text-primary\">{title}</h2>\n <div className={gridClassFor(columns)}>\n {Array.from({ length: 3 }).map((_, i) => (\n <div key={i}>{renderSkeletonForType(skeletonType, 'default', adminCampaignCard)}</div>\n ))}\n </div>\n </div>\n );\n }\n return (\n <div className=\"space-y-8\">\n <h2 className=\"text-2xl font-bold text-ods-text-primary\">{title}</h2>\n {emptyState ?? <p className=\"text-ods-text-secondary\">{emptyStateText}</p>}\n </div>\n );\n }\n\n const grouped: Record<string, ContentRef[]> = {};\n for (const ref of visibleRefs) {\n if (!grouped[ref.type]) grouped[ref.type] = [];\n grouped[ref.type].push(ref);\n }\n\n // Registered types in CONTENT_REF_GROUPS order, then any unregistered\n // types appended (same shape the investor-email builder uses — both\n // consume `orderContentRefTypes` so cross-surface ordering matches).\n // SAME-TYPE FIRST: when a host entityType is known (suggestion / SSR\n // modes), its own content-type group is hoisted to the top — a blog\n // post's rail leads with blog posts. Rail group keys are compared via\n // the shared alias canonicalizer (blog_post_existing ↔ blog_post).\n let orderedTypes = orderContentRefTypes(Object.keys(grouped));\n if (entityType) {\n // Canonicalize BOTH sides — hosts pass registry vocab ('blog_post') but\n // rail-vocab aliases ('blog_post_existing') are also legal inputs; a raw\n // comparison would silently lose the same-type-first hoist for aliases.\n const canonicalEntityType = canonicalContentRefType(entityType);\n const sameType = orderedTypes.filter((t) => canonicalContentRefType(t) === canonicalEntityType);\n if (sameType.length > 0) {\n orderedTypes = [...sameType, ...orderedTypes.filter((t) => canonicalContentRefType(t) !== canonicalEntityType)];\n }\n }\n\n return (\n <div className=\"space-y-8\">\n <h2 className=\"text-2xl font-bold text-ods-text-primary\">{title}</h2>\n {orderedTypes.map((type) => (\n <ContentGroup\n key={type}\n type={type}\n refs={grouped[type]}\n columns={columns}\n buildUrl={effectiveBuildListUrl}\n resolveHref={resolveHref}\n LinkProvider={LinkProvider}\n extras={extras}\n adminCampaignCard={adminCampaignCard}\n heading={\n <h3 className=\"font-['Azeret_Mono'] text-[14px] font-semibold uppercase text-ods-text-secondary tracking-wider\">\n {getContentRefLabelOrTitleCase(type)}\n </h3>\n }\n />\n ))}\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-6CSW5TMS.cjs","../src/components/related-content/related-content-section.tsx"],"names":["buildListUrl"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;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ist/chunk-6CSW5TMS.cjs","sourcesContent":[null,"\"use client\";\n\n/**\n * RelatedContentSection\n *\n * Renders content references grouped by type using the canonical card\n * components. MOVED from the hub (`components/shared/related-content-card.tsx`)\n * so any consuming app can embed it; the hub keeps a thin wrapper that\n * pre-binds its host-specific injections (nav hook, URL recomposition,\n * program configs, admin campaign card).\n *\n * THREE data modes (precedence top-down):\n * 1. CONTROLLED — `contentRefs` provided (even `[]`): render exactly those\n * refs, no suggestion fetch (the original investor-update behavior).\n * 2. SUGGESTION — `entityType` + `entityId` provided: self-fetch\n * `GET {apiBaseUrl}/api/related-content?entityType&entityId[&count][&excludeTypes]`\n * (the generic 5-tier engine's second web service). `minResults` maps to\n * `count`; absent → param not sent (server default applies). Each ref\n * carries a `reason` (data-only — never rendered, matching the\n * FaqSection/FaqWithReason precedent).\n * 3. SSR-HYDRATED suggestion — also pass `initialItems` (the server page\n * called the engine directly); the first client fetch is skipped per the\n * `useSelfFetch` initialData contract.\n *\n * Group layout (list vs grid) + card size (lg vs default) come from\n * `CONTENT_REF_GROUPS` in `../../utils/content-ref-groups` — single source of\n * truth, no per-type logic in this file. Skeletons come from\n * `renderSkeletonForType` so the placeholder height matches the loaded card\n * exactly (zero layout shift on resolve).\n *\n * One API call per content type via the shared list-URL builder\n * (`buildListUrl` — injectable; defaults to the lib's byte-parity-tested\n * builder prefixed with `apiBaseUrl`). Fetching uses `useSelfFetch` (plain\n * fetch, NO react-query) so third-party embedders need no QueryClientProvider;\n * cards are imported via DEEP module paths (not the chat barrel) so this\n * chunk never reaches `@tanstack/react-query`.\n *\n * LOCKSTEP NOTE: this file's per-type card/skeleton dispatch is the SIZED\n * sibling of the chat-side `CHAT_CARD_REGISTRY` (`../chat/entity-cards/\n * dispatch.tsx`), which renders compact `size='sm'` cards wired to the chat\n * runtime. Two dispatchers by design — when registering a new fetch-mode\n * content type, add it BOTH there and here (cards + skeleton + list URL).\n */\n\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport {\n CONTENT_REF_GROUPS,\n getContentRefLabelOrTitleCase,\n orderContentRefTypes,\n type ContentRefGroupConfig,\n} from '../../utils/content-ref-groups';\nimport type { ContentRef, ContentRefWithReason } from '../../types/content-ref';\nimport { useSelfFetch } from '../../hooks/use-self-fetch';\nimport { Pagination } from '../pagination';\nimport { extractItems, extractItemId } from '../../utils/extract-items';\nimport { buildListUrl as libBuildListUrl, canonicalContentRefType } from '../../utils/list-url';\nimport { buildSuggestionUrl } from '../../utils/suggestion-url';\nimport { decideNewTab } from '../chat/utils/decide-new-tab';\n// DEEP card imports — NOT the `../chat` barrel (the barrel statically reaches\n// @tanstack/react-query via embeddable-chat + its hooks). Deep paths keep this\n// component's SOURCE graph react-query-free. Note: tsup's shared-chunk\n// splitting may still colocate the cards with chat hooks in one dist chunk\n// (react-query is a required peerDep, so resolution always succeeds) — the\n// guarantee that matters here is the RUNTIME one: nothing on this path ever\n// instantiates a QueryClient, so embedders need NO QueryClientProvider.\nimport { BlogCard, BlogCardSkeleton } from '../chat/entity-cards/blog-card';\nimport { WhatIShippedCard, WhatIShippedCardSkeleton } from '../chat/entity-cards/what-i-shipped-card';\nimport { CaseStudyCard, CaseStudyCardSkeleton } from '../chat/entity-cards/case-study-card';\nimport { CustomerInterviewCard, CustomerInterviewCardSkeleton } from '../chat/entity-cards/customer-interview-card';\nimport { ProductReleaseCard, ProductReleaseCardSkeleton } from '../chat/entity-cards/product-release-card';\nimport { buildProductReleaseCardProps } from '../chat/entity-cards/product-release-card-defaults';\nimport { ProgramCard, ProgramCardSkeleton } from '../chat/entity-cards/program-card';\nimport { InvestorUpdateCard, InvestorUpdateCardSkeleton } from '../chat/entity-cards/investor-update-card';\nimport { OnboardingGuideCard, OnboardingGuideCardSkeleton } from '../chat/entity-cards/onboarding-guide-card';\nimport { RoadmapCard, RoadmapCardSkeleton } from '../chat/entity-cards/roadmap-card';\n// Type-only — erased at build, no runtime dependency on the dispatch module.\nimport type { ChatCardDispatchExtras } from '../chat/entity-cards/dispatch';\n\ntype CardSize = 'lg' | 'default' | 'sm';\n\n/** Anchor prop bundle the per-card link surface receives — same shape the\n * hub's `useNavLink` returns and the chat dispatcher's anchor builders\n * produce. `null` = non-anchor mode (no URL). */\nexport interface CardLinkAnchorProps {\n href: string;\n target?: '_blank';\n rel?: 'noopener noreferrer';\n onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;\n}\n\n/** Render-prop component injection for the navigation decision — keeps hook\n * calls legal (hooks live INSIDE the injected component; `CardForType`\n * itself calls zero hooks). The hub injects a `useNavLink`-backed provider;\n * the default is hook-free (pure `decideNewTab`). MUST be defined at module\n * scope by hosts — an inline arrow would remount every card each render. */\nexport interface CardLinkProviderProps {\n href: string | null;\n targetPlatform: string | null;\n children: (linkProps: CardLinkAnchorProps | null) => React.ReactElement | null;\n}\nexport type CardLinkProvider = React.ComponentType<CardLinkProviderProps>;\n\n/** Default link provider for standalone embeds: relative/-same-origin hrefs\n * stay same-tab, cross-origin pops a new tab (pure `decideNewTab` with no\n * platform context — `currentSource: ''` falls through to the origin\n * check). No router integration, no hooks. */\nfunction DefaultLinkPropsProvider({ href, targetPlatform, children }: CardLinkProviderProps): React.ReactElement | null {\n if (!href) return children(null);\n const newTab = decideNewTab({ href, targetPlatform, currentSource: '' });\n return children(\n newTab\n ? { href, target: '_blank', rel: 'noopener noreferrer' }\n : { href },\n );\n}\n\n/** Default href resolution: trust the ref's stored url/targetPlatform as the\n * API composed them. The hub overrides this with its `buildContentURL`\n * re-composition so dev gets localhost and prod gets platform domains. */\nfunction defaultResolveHref(ref: ContentRef): { href: string | null; targetPlatform: string | null } {\n return { href: ref.url || null, targetPlatform: ref.targetPlatform ?? null };\n}\n\n/** Host-injected renderer pair for the admin-only `marketing_campaign` type.\n * Absent (every non-hub embed) → the type renders nothing (its list URL\n * hits `/api/admin`, unreachable outside the hub anyway). */\nexport interface AdminCampaignCardSlot {\n Card: React.ComponentType<{ campaign: any }>;\n Skeleton: React.ComponentType<{ size?: 'default' | 'sm' }>;\n}\n\n/**\n * Per-type skeleton dispatch — returns the SAME colocated skeleton the\n * resolved card renders, sized to match (zero layout shift on resolve).\n * The chat-side `CHAT_CARD_REGISTRY` already does this via\n * `entry.skeleton()`; this surface exposes the same discipline to the\n * related-content rail.\n */\nfunction renderSkeletonForType(\n type: string,\n size: CardSize,\n adminCampaignCard?: AdminCampaignCardSlot,\n): React.ReactNode {\n // Most card skeletons accept only `{default, sm}`. `'lg'` collapses to\n // `'default'`. ProductReleaseCardSkeleton uses lg/sm pair.\n const legacySize: 'default' | 'sm' = size === 'sm' ? 'sm' : 'default';\n switch (type) {\n case 'blog_post_existing':\n return <BlogCardSkeleton size={legacySize} />;\n case 'case_study':\n return <CaseStudyCardSkeleton size={legacySize} />;\n case 'customer_interview':\n return <CustomerInterviewCardSkeleton size={legacySize} />;\n case 'product_release':\n return <ProductReleaseCardSkeleton size={size === 'sm' ? 'sm' : 'lg'} />;\n case 'podcast':\n case 'webinar':\n case 'event':\n return <ProgramCardSkeleton size={legacySize} />;\n case 'investor_update':\n return <InvestorUpdateCardSkeleton size={legacySize} />;\n case 'onboarding_guide':\n // The rich catalog variant (hero + author grid, clamped description) —\n // the step-numbered 'default' variant is for the guide detail page's\n // \"More in section\" rail, not this full-width row.\n return <OnboardingGuideCardSkeleton size={size === 'sm' ? 'sm' : 'catalog'} />;\n case 'what_i_shipped':\n // Matches the WhatIShippedCard (AdminContentCard 3:2) shape.\n return <WhatIShippedCardSkeleton />;\n case 'marketing_campaign':\n return adminCampaignCard ? <adminCampaignCard.Skeleton size={legacySize} /> : null;\n case 'roadmap_item':\n case 'delivery_item':\n case 'internal_task':\n return <RoadmapCardSkeleton size={legacySize} />;\n default:\n return null;\n }\n}\n\n/**\n * Per-type card dispatch — renders the right card with the right size.\n * Sized cards (`'lg'` / `'default'`) are unique to this rail — the chat\n * dispatcher only renders `'sm'`, so we go directly through the per-type\n * cards here.\n *\n * PURE FUNCTION COMPONENT WITH ZERO HOOK CALLS: the placeholder comes from a\n * plain `extras.buildOgPlaceholderUrl` call (the chat `dispatch.tsx`\n * pattern) and the anchor-prop bundle arrives via the `LinkProvider`\n * render-prop from the parent — so per-card hook legality is owned by the\n * injected provider component, not by this switch.\n *\n * `href` comes from the host's `resolveHref(ref)` (hub: live\n * `buildContentURL` recomposition; default: the ref's stored url).\n */\nfunction CardForType({\n type,\n item,\n size,\n href,\n targetPlatform,\n linkProps,\n extras,\n adminCampaignCard,\n}: {\n type: string;\n item: any;\n size: CardSize;\n href: string;\n targetPlatform: string | null;\n linkProps: CardLinkAnchorProps | null;\n extras?: ChatCardDispatchExtras;\n adminCampaignCard?: AdminCampaignCardSlot;\n}): React.ReactNode {\n // Most card variants accept only `{default, sm}`. `'lg'` collapses to\n // `'default'` for those. ProductReleaseCard uses its own lg/sm pair.\n const legacySize: 'default' | 'sm' = size === 'sm' ? 'sm' : 'default';\n // OG placeholder URL — injected into the pure-presentation cards so they\n // render a branded fallback when the row's featured image is null. Plain\n // function call (NOT a hook). Title is the universal field across all card\n // item shapes used here.\n const placeholderUrl =\n extras?.buildOgPlaceholderUrl?.((item?.title as string | undefined) ?? '') ?? undefined;\n\n // Top-level target/rel for cards that take them as separate props\n // (BlogCard, CaseStudyCard, …). ProductReleaseCard takes the bundle as a\n // single `anchorProps={...}` and uses `linkProps` directly. When the host\n // didn't surface a URL, `linkProps` is null and the card stays in\n // non-anchor mode.\n const anchorAttrs: Pick<CardLinkAnchorProps, 'target' | 'rel'> = linkProps\n ? { target: linkProps.target, rel: linkProps.rel }\n : {};\n\n switch (type) {\n case 'blog_post_existing':\n return <BlogCard post={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'case_study':\n return <CaseStudyCard study={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'customer_interview':\n return <CustomerInterviewCard interview={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'product_release': {\n // Anchor-prop pattern: build product-release lg-variant props from the\n // shared `buildProductReleaseCardProps` so this rail and the /releases\n // catalog page render byte-identically. The card wraps in\n // `<a {...anchorProps}>` ONLY when `anchorProps.href` is set — pass\n // `undefined` (not an empty object) when href is empty so the card\n // stays in non-anchor mode without rendering a dead <a> tag.\n const releaseSize = size === 'sm' ? 'sm' : 'lg';\n const buildReleaseProps = extras?.buildProductReleaseCardProps ?? buildProductReleaseCardProps;\n const releaseProps = buildReleaseProps(item);\n return (\n <ProductReleaseCard\n size={releaseSize}\n title={item.title}\n summary={item.summary}\n version={item.version}\n {...releaseProps}\n anchorProps={linkProps ?? undefined}\n />\n );\n }\n case 'podcast':\n return extras?.programConfigs?.podcast\n ? <ProgramCard config={extras.programConfigs.podcast} item={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />\n : null;\n case 'webinar':\n return extras?.programConfigs?.webinar\n ? <ProgramCard config={extras.programConfigs.webinar} item={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />\n : null;\n case 'event':\n return extras?.programConfigs?.event\n ? <ProgramCard config={extras.programConfigs.event} item={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />\n : null;\n case 'investor_update':\n return <InvestorUpdateCard update={item} size={legacySize} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'onboarding_guide':\n // Catalog variant (see skeleton note) — full-width rich card with a\n // line-clamped description instead of the step-numbered rail card.\n return <OnboardingGuideCard guide={item} size={size === 'sm' ? 'sm' : 'catalog'} href={href} targetPlatform={targetPlatform} placeholderUrl={placeholderUrl} {...anchorAttrs} />;\n case 'what_i_shipped':\n // THE single What I Shipped card — same lib component the people-hub\n // dashboard renders, so the card is identical in the rail and the\n // dashboard. `anchorProps` makes the whole card a click-through link\n // (rail is read-only — no owner actions).\n return (\n <WhatIShippedCard\n entry={item}\n placeholderUrl={placeholderUrl}\n // Only pass anchorProps when there's a REAL href — a fallback object\n // with `href: undefined` is still truthy and would make WhatIShippedCard\n // wrap the card in a dead <a> (no URL). Mirrors the ProductReleaseCard\n // `linkProps ?? undefined` pattern above.\n anchorProps={\n linkProps ??\n (href ? ({ href, ...anchorAttrs } as React.AnchorHTMLAttributes<HTMLAnchorElement>) : undefined)\n }\n />\n );\n case 'marketing_campaign':\n return adminCampaignCard ? <adminCampaignCard.Card campaign={item} /> : null;\n case 'roadmap_item':\n case 'delivery_item':\n case 'internal_task':\n return (\n <RoadmapCard\n item={item}\n href={href ?? ''}\n targetPlatform={targetPlatform}\n userVote={null}\n onVote={() => {}}\n size={legacySize}\n cardType={type as 'roadmap_item' | 'delivery_item' | 'internal_task'}\n {...anchorAttrs}\n />\n );\n default:\n return null;\n }\n}\n\n// =============================================================================\n// Fetch all items for a type in ONE server-sorted call, via the injectable\n// list-URL builder. `useSelfFetch` (URL = cache key) replaces the hub's old\n// react-query usage: `enabled` ≙ `url === null`, `!res.ok`/network error ≙\n// `error → items null → group renders nothing`. Accepted deltas vs\n// react-query: no retry/backoff, no focus refetch, no cross-mount cache.\n// =============================================================================\n\nfunction useGroupItems(\n type: string,\n refs: ContentRef[],\n buildUrl: (type: string, ids: string[]) => string | null,\n) {\n const ids = refs.map((r) => r.id);\n const url = ids.length > 0 ? buildUrl(type, ids) : null;\n const { data, isLoading } = useSelfFetch<unknown>(url);\n const items = data != null ? extractItems(data) : null;\n return { items, isLoading };\n}\n\n// =============================================================================\n// Per-group renderer — one API call, server-sorted, then render cards via the\n// dispatcher with per-type skeletons + per-type layout from CONTENT_REF_GROUPS.\n// =============================================================================\n\n/** Map columns prop → tailwind grid class. Only consulted for grid-layout\n * groups; list-layout groups stack vertically. */\nfunction gridClassFor(columns: 2 | 3): string {\n return columns === 3\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6'\n : 'grid grid-cols-1 sm:grid-cols-2 gap-6';\n}\n\n/** Resolve the group config for a type, falling back to a grid layout with\n * the default card size for unregistered types so the section still renders\n * rather than silently dropping them. The `label` field on the fallback is\n * intentionally a placeholder — the section heading goes through\n * `getContentRefLabelOrTitleCase(type)` instead so cross-surface labels\n * stay consistent between this rail and the investor-email builder. */\nfunction resolveGroupConfig(type: string): ContentRefGroupConfig {\n return CONTENT_REF_GROUPS[type] ?? {\n label: type,\n order: 999,\n layout: 'grid',\n gridSize: 'default',\n };\n}\n\n/** Items per page within one type group. Groups larger than this paginate\n * with the standard Pagination control (NO nested scrolling — a bounded\n * scrollbox inside the page traps wheel events and hides the sections\n * below it). MUST stay at or above the largest suggestion fill\n * (RELATED_SAME_TYPE_COUNT in the hub's lib/constants/suggestions.ts) so\n * current rails never paginate — only genuinely big groups (author pages)\n * do. Exported through the subpath barrel for the hub's module-load\n * assertion of that relation (entity-suggestion-sections.tsx). */\nexport const GROUP_PAGE_SIZE = 12;\n\nfunction ContentGroup({\n type,\n refs,\n columns,\n buildUrl,\n resolveHref,\n LinkProvider,\n extras,\n adminCampaignCard,\n heading,\n}: {\n type: string;\n refs: ContentRef[];\n columns: 2 | 3;\n buildUrl: (type: string, ids: string[]) => string | null;\n resolveHref: (ref: ContentRef) => { href: string | null; targetPlatform: string | null };\n LinkProvider: CardLinkProvider;\n extras?: ChatCardDispatchExtras;\n adminCampaignCard?: AdminCampaignCardSlot;\n /** Group heading, rendered INSIDE the group so a group that resolves to\n * nothing (fetch miss / unsupported type / missing program config) drops\n * its heading too — no orphaned titles. */\n heading: React.ReactNode;\n}) {\n const { items, isLoading } = useGroupItems(type, refs, buildUrl);\n const config = resolveGroupConfig(type);\n const isListLayout = config.layout === 'list';\n const cardSize = config.gridSize;\n\n // Per-group pagination for big groups (author pages): GROUP_PAGE_SIZE items\n // per page with the standard Pagination control below the group. Client-side\n // slicing — useGroupItems already fetched every row in one batched call, so\n // page flips are instant. Hooks live above every early return (file\n // convention). Page is clamped so a shrinking refs array (suggestion\n // refetch) can never strand the view past the last page, and RESET when the\n // ref set actually changes (shrink→grow must not return to a stale page).\n const [page, setPage] = useState(1);\n const refsKey = refs.map((r) => r.id).join('|');\n const prevRefsKeyRef = useRef(refsKey);\n useEffect(() => {\n if (prevRefsKeyRef.current !== refsKey) {\n prevRefsKeyRef.current = refsKey;\n setPage(1);\n }\n }, [refsKey]);\n const totalGroupPages = Math.max(1, Math.ceil(refs.length / GROUP_PAGE_SIZE));\n const safePage = Math.min(page, totalGroupPages);\n const visibleGroupRefs =\n refs.length > GROUP_PAGE_SIZE\n ? refs.slice((safePage - 1) * GROUP_PAGE_SIZE, safePage * GROUP_PAGE_SIZE)\n : refs;\n const groupPagination =\n totalGroupPages > 1 ? (\n <Pagination currentPage={safePage} totalPages={totalGroupPages} onPageChange={setPage} />\n ) : null;\n\n // Skeleton gate: `isLoading && !items` — SSR HTML and the client's first\n // paint render identical skeletons (useSelfFetch starts isLoading=true on\n // both sides), and once items exist they are never replaced by skeletons.\n if (isLoading && !items) {\n const skeletons = visibleGroupRefs.map((r) => (\n <div key={r.id}>{renderSkeletonForType(type, cardSize, adminCampaignCard)}</div>\n ));\n return (\n <div className=\"space-y-4\">\n {heading}\n {isListLayout ? (\n <div className=\"space-y-4\">{skeletons}</div>\n ) : (\n <div className={gridClassFor(columns)}>{skeletons}</div>\n )}\n </div>\n );\n }\n\n if (!items || items.length === 0) return null;\n\n // Index fetched rows by id, then render in REF order — refs carry the\n // intended sequence (suggestion mode: the engine's tier order, so\n // same-platform/tag-matched items lead; controlled mode: the curated\n // display_order). The list APIs return rows date-sorted, which would\n // otherwise scramble that ordering (same-platform items sinking below\n // newer cross-platform ones).\n // Shared extractor (NOT raw `.id`) — some API shapes key items differently\n // (e.g. external_id types); raw access would silently drop valid items.\n const itemById = new Map(\n (items as any[]).map((it) => [extractItemId(type, it) ?? String((it as any)?.id), it]),\n );\n\n const cards = visibleGroupRefs\n .map((contentRef) => {\n const itemId = String(contentRef.id);\n const item = itemById.get(itemId);\n if (!item) return null;\n // Re-compose the URL via the host's resolver (hub: buildContentURL so\n // dev gets localhost and prod the right platform domain; default: the\n // ref's stored url as the API composed it).\n const resolved = resolveHref(contentRef);\n const href = resolved.href ?? '';\n const targetPlatform = resolved.targetPlatform ?? contentRef.targetPlatform ?? null;\n return (\n <div key={itemId}>\n <LinkProvider href={href || null} targetPlatform={targetPlatform}>\n {(linkProps) => (\n <CardForType\n type={type}\n item={item}\n size={cardSize}\n href={href}\n targetPlatform={targetPlatform}\n linkProps={linkProps}\n extras={extras}\n adminCampaignCard={adminCampaignCard}\n />\n )}\n </LinkProvider>\n </div>\n );\n })\n .filter(Boolean);\n\n if (cards.length === 0) {\n // Current PAGE resolved zero cards (rows deleted between the ref fetch\n // and the group fetch, or a stricter list-API gate dropped them). When a\n // pager exists the user must keep the controls to navigate back —\n // dropping the whole group would strand them. A genuinely empty group\n // (no pager) still vanishes with its heading.\n if (groupPagination) {\n return (\n <div className=\"space-y-4\">\n {heading}\n {groupPagination}\n </div>\n );\n }\n return null;\n }\n\n return (\n <div className=\"space-y-4\">\n {heading}\n {isListLayout ? (\n <div className=\"space-y-4\">{cards}</div>\n ) : (\n <div className={gridClassFor(columns)}>{cards}</div>\n )}\n {groupPagination}\n </div>\n );\n}\n\n// =============================================================================\n// Main component\n// =============================================================================\n\ninterface RelatedContentResponse {\n refs: ContentRefWithReason[];\n}\n\nexport interface RelatedContentSectionProps {\n /** CONTROLLED mode (the original behavior). When defined — even `[]` — no\n * suggestion fetch runs and exactly these refs render. */\n contentRefs?: ContentRef[];\n /** SUGGESTION mode (with `entityId`): self-fetch suggestions for this host\n * entity from `{apiBaseUrl}/api/related-content`. Ignored when\n * `contentRefs` is provided. */\n entityType?: string;\n entityId?: number | string;\n /** AUTHOR mode: self-fetch ALL published content authored by this profile\n * from `{apiBaseUrl}/api/related-content?authorId=…` (grouped per type,\n * endless within each group). Ignored when `contentRefs` is provided;\n * takes precedence over the entityType/entityId suggestion scope.\n * SSR-hydrate via `initialItems`, same as suggestion mode. */\n authorId?: string;\n /** Maps to the suggestion API's `count` param — the PER-TYPE fill target\n * for every candidate type EXCEPT the host's own. Absent → param not sent\n * (server default applies). */\n minResults?: number;\n /** Maps to the suggestion API's `sameTypeCount` param — the budget for the\n * candidate type MATCHING the host's own `entityType` (same-type boost:\n * a blog post's rail leads with more blog posts). Absent → param not\n * sent (host's type uses the server's `count`). */\n sameTypeMinResults?: number;\n /** SSR hydrate for suggestion mode — the server page ran the engine and\n * drills the refs here; the first client fetch is skipped (useSelfFetch\n * initialData contract). */\n initialItems?: ContentRefWithReason[];\n /** Section title (default: \"Related Content\") */\n title?: string;\n /**\n * Grid columns at desktop. 2 = denser cards / wider summary (original\n * investor-update layout); 3 = more cards per row for dashboards.\n * Only consulted for grid-layout groups. Default: 2.\n */\n columns?: 2 | 3;\n /**\n * ContentRef.type values to exclude. Honored in ALL modes — controlled\n * mode post-filters (original behavior); suggestion mode ALSO forwards the\n * list verbatim as the API's `excludeTypes=` param so excluded types never\n * consume engine fill slots (`minResults` stays honored). The subtraction\n * happens SERVER-side — this component never mirrors the hub's candidate\n * list.\n */\n excludeTypes?: string[];\n /**\n * SUGGESTION-mode allow-list (rail vocabulary): which content types\n * participate in this rail. Sent verbatim as the API's `types=` param —\n * the SERVER intersects it with its own allowed candidate set, and\n * platform policy gates (e.g. internal-only types) ALWAYS win: the client\n * cannot request its way past them. Absent → all server-side candidates.\n */\n includeTypes?: string[];\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin). Applied to BOTH the suggestion fetch and the\n * default per-group list fetches. */\n apiBaseUrl?: string;\n /** Host injection bundle — REUSES the chat dispatcher's\n * `ChatCardDispatchExtras` (programConfigs, buildOgPlaceholderUrl,\n * buildProductReleaseCardProps override). Program groups render nothing\n * when their config is absent. */\n extras?: ChatCardDispatchExtras;\n /** Hub injects its `buildContentURL` recomposition; default uses the\n * ref's stored `url`/`targetPlatform` as the API composed them. */\n resolveHref?: (ref: ContentRef) => { href: string | null; targetPlatform: string | null };\n /** Hub injects its registry-driven entity-list-api builder; default = the\n * lib's `buildListUrl(type, ids, apiBaseUrl)`. */\n buildListUrl?: (type: string, ids: string[]) => string | null;\n /** Hub injects a `useNavLink`-backed render-prop provider; default = pure\n * anchor via `decideNewTab`. MUST be a module-scope component. */\n LinkProvider?: CardLinkProvider;\n /** Renderer pair for the admin-only `marketing_campaign` type. Absent →\n * the type renders nothing. */\n adminCampaignCard?: AdminCampaignCardSlot;\n /** When true, render the section shell (title + an empty-state line) even\n * with ZERO refs, instead of returning null. Default false (the original\n * behavior — empty rail = no shell). Opt-in per host page (e.g. people-hub's\n * \"What I Shipped\", where the section should always be present). */\n showWhenEmpty?: boolean;\n /** Empty-state copy shown under the title when `showWhenEmpty` and no refs.\n * Default: \"No related content yet.\" */\n emptyStateText?: string;\n /** Custom empty-state node (e.g. a hub `<EmptyState/>`) rendered under the\n * title when `showWhenEmpty` and there are no refs — overrides\n * `emptyStateText`. Lets a host match its canonical empty state. */\n emptyState?: React.ReactNode;\n}\n\nexport function RelatedContentSection({\n contentRefs,\n entityType,\n entityId,\n authorId,\n minResults,\n sameTypeMinResults,\n includeTypes,\n initialItems,\n title = 'Related Content',\n columns = 2,\n excludeTypes,\n apiBaseUrl = '',\n extras,\n resolveHref = defaultResolveHref,\n buildListUrl,\n LinkProvider = DefaultLinkPropsProvider,\n adminCampaignCard,\n showWhenEmpty = false,\n emptyStateText = 'No related content yet.',\n emptyState,\n}: RelatedContentSectionProps) {\n // ── Hooks above EVERY early return (the original `if (!contentRefs.length)\n // return null` guard moved below them). ──\n\n // Suggestion-mode fetch URL — null in controlled mode (contentRefs defined,\n // even []) or when the entity scope is incomplete.\n // `includeTypes: []` is an explicit \"nothing participates\" — skip the fetch\n // entirely (an empty-string `types=` param would be dropped by the URL\n // builder and read server-side as \"all candidates\") AND ignore SSR refs.\n const suggestionsDisabled = includeTypes?.length === 0;\n // Shared type-filter params — one spelling for both fetch modes so a future\n // normalization (trim/dedupe) can't diverge between them.\n const typeFilterParams = {\n types: includeTypes !== undefined ? includeTypes.join(',') : undefined,\n excludeTypes: excludeTypes && excludeTypes.length > 0 ? excludeTypes.join(',') : undefined,\n };\n // AUTHOR mode beats suggestion mode: when `authorId` is set the rail lists\n // everything that profile authored (the server returns ALL, no count).\n const authorUrl =\n contentRefs === undefined && authorId && !suggestionsDisabled\n ? buildSuggestionUrl('/api/related-content', {\n apiBaseUrl,\n extraParams: { authorId, ...typeFilterParams },\n })\n : null;\n const suggestUrl =\n authorUrl ??\n (contentRefs === undefined &&\n entityType &&\n entityId !== undefined &&\n entityId !== null &&\n entityId !== '' &&\n !suggestionsDisabled\n ? buildSuggestionUrl('/api/related-content', {\n apiBaseUrl,\n entityType,\n entityId,\n count: minResults,\n extraParams: {\n sameTypeCount: sameTypeMinResults !== undefined ? String(sameTypeMinResults) : undefined,\n ...typeFilterParams,\n },\n })\n : null);\n // Memoize the initialData wrapper — useSelfFetch re-syncs on [initialData],\n // and a fresh per-render object would loop setState under re-rendering\n // parents (the latent FaqSection bug, fixed there in the same change).\n const initialData = useMemo<RelatedContentResponse | undefined>(\n // An explicitly disabled rail (includeTypes: []) must ignore SSR-hydrated\n // refs too — otherwise useSelfFetch(null, {initialData}) keeps serving\n // initialItems and the \"nothing participates\" contract silently breaks.\n () => (!suggestionsDisabled && initialItems ? { refs: initialItems } : undefined),\n [initialItems, suggestionsDisabled],\n );\n const { data, isLoading } = useSelfFetch<RelatedContentResponse>(suggestUrl, { initialData });\n\n // Default group fetcher: the lib's byte-parity-tested builder, prefixed for\n // embeds. Memoized so group-fetch URLs stay value-stable across renders.\n const effectiveBuildListUrl = useMemo(\n () => buildListUrl ?? ((type: string, ids: string[]) => libBuildListUrl(type, ids, apiBaseUrl)),\n [buildListUrl, apiBaseUrl],\n );\n\n const refs: ContentRef[] = contentRefs ?? data?.refs ?? [];\n\n // Per-consumer type gating — drops refs whose `type` is in the exclude\n // list. In suggestion mode the server already subtracted these (the param\n // is forwarded above); the client filter stays as an idempotent guard and\n // IS the mechanism in controlled mode (original behavior).\n const exclude = new Set(excludeTypes || []);\n const visibleRefs = exclude.size > 0 ? refs.filter((r) => !exclude.has(r.type)) : refs;\n // Zero refs (still loading in suggestion mode, or genuinely empty). Default:\n // no empty shell. Opt-in (`showWhenEmpty`): render the title + an empty-state\n // line so the section is always present (e.g. people-hub \"What I Shipped\").\n if (!visibleRefs.length) {\n if (!showWhenEmpty) return null; // non-showWhenEmpty consumers stay blank (unchanged)\n // Client-fetch loading (author/suggestion mode, no SSR initialItems): render a\n // SKELETON grid — reserves height + matches the rest of the app's loading, so\n // there's no blank-then-pop jump (the prior `return null` collapsed the tab to\n // zero height during the fetch). SSR controlled mode has isLoading=false → it\n // skips straight to the empty state below. Skeleton type = the requested rail\n // type (author mode passes a single `includeTypes`).\n if (isLoading) {\n const skeletonType = includeTypes?.[0] ?? entityType ?? 'blog_post_existing';\n return (\n <div className=\"space-y-8\">\n <h2 className=\"text-2xl font-bold text-ods-text-primary\">{title}</h2>\n <div className={gridClassFor(columns)}>\n {Array.from({ length: 3 }).map((_, i) => (\n <div key={i}>{renderSkeletonForType(skeletonType, 'default', adminCampaignCard)}</div>\n ))}\n </div>\n </div>\n );\n }\n return (\n <div className=\"space-y-8\">\n <h2 className=\"text-2xl font-bold text-ods-text-primary\">{title}</h2>\n {emptyState ?? <p className=\"text-ods-text-secondary\">{emptyStateText}</p>}\n </div>\n );\n }\n\n const grouped: Record<string, ContentRef[]> = {};\n for (const ref of visibleRefs) {\n if (!grouped[ref.type]) grouped[ref.type] = [];\n grouped[ref.type].push(ref);\n }\n\n // Registered types in CONTENT_REF_GROUPS order, then any unregistered\n // types appended (same shape the investor-email builder uses — both\n // consume `orderContentRefTypes` so cross-surface ordering matches).\n // SAME-TYPE FIRST: when a host entityType is known (suggestion / SSR\n // modes), its own content-type group is hoisted to the top — a blog\n // post's rail leads with blog posts. Rail group keys are compared via\n // the shared alias canonicalizer (blog_post_existing ↔ blog_post).\n let orderedTypes = orderContentRefTypes(Object.keys(grouped));\n if (entityType) {\n // Canonicalize BOTH sides — hosts pass registry vocab ('blog_post') but\n // rail-vocab aliases ('blog_post_existing') are also legal inputs; a raw\n // comparison would silently lose the same-type-first hoist for aliases.\n const canonicalEntityType = canonicalContentRefType(entityType);\n const sameType = orderedTypes.filter((t) => canonicalContentRefType(t) === canonicalEntityType);\n if (sameType.length > 0) {\n orderedTypes = [...sameType, ...orderedTypes.filter((t) => canonicalContentRefType(t) !== canonicalEntityType)];\n }\n }\n\n return (\n <div className=\"space-y-8\">\n <h2 className=\"text-2xl font-bold text-ods-text-primary\">{title}</h2>\n {orderedTypes.map((type) => (\n <ContentGroup\n key={type}\n type={type}\n refs={grouped[type]}\n columns={columns}\n buildUrl={effectiveBuildListUrl}\n resolveHref={resolveHref}\n LinkProvider={LinkProvider}\n extras={extras}\n adminCampaignCard={adminCampaignCard}\n heading={\n <h3 className=\"font-['Azeret_Mono'] text-[14px] font-semibold uppercase text-ods-text-secondary tracking-wider\">\n {getContentRefLabelOrTitleCase(type)}\n </h3>\n }\n />\n ))}\n </div>\n );\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ToggleGroup,
4
4
  ToggleGroupItem
5
- } from "./chunk-P2SO7ADJ.js";
5
+ } from "./chunk-EFYXPR43.js";
6
6
  import {
7
7
  isFigmaSlidesUrl,
8
8
  toFigmaEmbedUrl,
@@ -616,4 +616,4 @@ export {
616
616
  OGLinkErrorBoundary,
617
617
  OGLinkPreview
618
618
  };
619
- //# sourceMappingURL=chunk-UBFYGWFP.js.map
619
+ //# sourceMappingURL=chunk-AISIZLZP.js.map
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkKLXCXNLWcjs = require('./chunk-KLXCXNLW.cjs');
5
+ var _chunkOXC72UIPcjs = require('./chunk-OXC72UIP.cjs');
6
6
 
7
7
 
8
8
 
@@ -202,7 +202,7 @@ function SlidesViewToggle({
202
202
  { key: "browse", label: "Browse", Icon: _lucidereact.LayoutGrid }
203
203
  ];
204
204
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
205
- _chunkKLXCXNLWcjs.ToggleGroup,
205
+ _chunkOXC72UIPcjs.ToggleGroup,
206
206
  {
207
207
  type: "single",
208
208
  value: view,
@@ -214,7 +214,7 @@ function SlidesViewToggle({
214
214
  children: options.map(({ key, label, Icon }) => {
215
215
  const active = view === key;
216
216
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
217
- _chunkKLXCXNLWcjs.ToggleGroupItem,
217
+ _chunkOXC72UIPcjs.ToggleGroupItem,
218
218
  {
219
219
  value: key,
220
220
  "aria-label": label,
@@ -616,4 +616,4 @@ var OGLinkPreview = ({
616
616
 
617
617
 
618
618
  exports.EmbedIframe = EmbedIframe; exports.PdfViewer = PdfViewer; exports.GoogleSheetsViewer = GoogleSheetsViewer; exports.FigmaEmbed = FigmaEmbed; exports.OGLinkErrorBoundary = OGLinkErrorBoundary; exports.OGLinkPreview = OGLinkPreview;
619
- //# sourceMappingURL=chunk-OV3ZCU6X.cjs.map
619
+ //# sourceMappingURL=chunk-DVUFNTI2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-OV3ZCU6X.cjs","../src/components/embeds/embed-iframe.tsx","../src/components/embeds/pdf-viewer.tsx","../src/components/embeds/google-sheets-viewer.tsx","../src/components/embeds/figma-embed.tsx","../src/components/embeds/og-link-preview.tsx"],"names":["jsx","jsxs"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACzBA,8BAAgE;AAS1D,+CAAA;AANN,SAAS,oBA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c,4BAAA;AAEuD,YAAA;AAEvE,UAAA;AACkB,0BAAA;AAAA,QAAA;AAAA,MAAA;AAEtB,IAAA;AAEJ,EAAA;AAIIA,EAAAA;AAAC,IAAA;AAAA,IAAA;AAAsB,MAAA;AAAY,MAAA;AAAa,MAAA;AACpC,MAAA;AACV,MAAA;AAAe,wBAAA;AAKX,wBAAA;AAAAD,0BAAAA;AAAC,YAAA;AAAA,YAAA;AAAS,cAAA;AAAiC,cAAA;AAAc,cAAA;AACvC,cAAA;AAAiD,gBAAA;AAAO,cAAA;AAAA,YAAA;AAAG,UAAA;AAE3E,0BAAA;AAAAA,4BAAAA;AAAC,cAAA;AAAA,cAAA;AAAa,gBAAA;AACqE,gBAAA;AAAI,gBAAA;AAAA,cAAA;AAAM,YAAA;AAE3FA,YAAAA;AAAC,cAAA;AAAA,cAAA;AAAY,gBAAA;AACsE,gBAAA;AAAI,gBAAA;AAAA,cAAA;AAAY,YAAA;AAGnG,4BAAA;AAAsD,8BAAA;AAC/C,8BAAA;AAC8B,8BAAA;AACvC,YAAA;AACF,UAAA;AAEJ,QAAA;AAAA,MAAA;AAAA,IAAA;AAEJ,EAAA;AAEJ;ALoK2I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-OV3ZCU6X.cjs","sourcesContent":[null,"\"use client\"\n\nimport React, { useState, useCallback, useRef, useEffect } from 'react'\n\n/** Loading skeleton for iframe embeds — matches project skeleton pattern */\nfunction EmbedLoadingSkeleton({ height }: { height?: string }) {\n return (\n <div\n className=\"w-full rounded-lg border border-ods-border overflow-hidden bg-ods-skeleton animate-pulse\"\n style={{ height: height || 'calc(100vh - 250px)' }}\n >\n <div className=\"flex flex-col items-center justify-center h-full gap-4\">\n <div className=\"w-12 h-12 rounded-lg bg-ods-card\" />\n <div className=\"h-4 w-48 rounded bg-ods-card\" />\n <div className=\"h-3 w-32 rounded bg-ods-card\" />\n </div>\n </div>\n )\n}\n\nexport interface EmbedIframeProps {\n /** The URL to embed */\n src: string\n /** Accessible title for the iframe */\n title: string\n /** Additional class names for the outer container */\n className?: string\n /** Container height (CSS value). Defaults to `calc(100vh - 250px)` */\n height?: string\n /** iframe `allow` attribute */\n allow?: string\n /** iframe `referrerPolicy` attribute */\n referrerPolicy?: React.IframeHTMLAttributes<HTMLIFrameElement>['referrerPolicy']\n /** iframe `loading` attribute */\n loading?: 'eager' | 'lazy'\n /** iframe `allowFullScreen` attribute */\n allowFullScreen?: boolean\n}\n\n/**\n * Base iframe wrapper with loading skeleton and proper memory cleanup.\n *\n * Prevents memory leaks by:\n * - Using `key={src}` to force full unmount/remount when src changes\n * - Setting iframe src to about:blank on unmount to release the embedded document\n * - Resetting loaded state when src changes\n */\nexport function EmbedIframe({\n src,\n title,\n className,\n height,\n allow,\n referrerPolicy,\n loading,\n allowFullScreen,\n}: EmbedIframeProps) {\n const [isLoaded, setIsLoaded] = useState(false)\n const iframeRef = useRef<HTMLIFrameElement>(null)\n const handleLoad = useCallback(() => setIsLoaded(true), [])\n\n useEffect(() => {\n setIsLoaded(false)\n }, [src])\n\n useEffect(() => {\n const iframe = iframeRef.current\n return () => {\n if (iframe) {\n try {\n iframe.src = 'about:blank'\n } catch {\n // Cross-origin iframes may throw — safe to ignore\n }\n }\n }\n }, [src])\n\n const resolvedHeight = height || 'calc(100vh - 250px)'\n\n return (\n <>\n {!isLoaded && <EmbedLoadingSkeleton height={resolvedHeight} />}\n <div\n className={`w-full rounded-lg border border-ods-border overflow-hidden ${!isLoaded ? 'h-0 overflow-hidden' : ''} ${className || ''}`}\n style={isLoaded ? { height: resolvedHeight } : undefined}\n >\n <iframe\n key={src}\n ref={iframeRef}\n src={src}\n className=\"w-full h-full border-0\"\n title={title}\n onLoad={handleLoad}\n allow={allow}\n referrerPolicy={referrerPolicy}\n loading={loading}\n allowFullScreen={allow?.includes('fullscreen') ? undefined : allowFullScreen}\n />\n </div>\n </>\n )\n}\n","\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { Download, Eye } from 'lucide-react'\nimport { AdobePdfIcon } from '../icons-v2-generated'\nimport { EmbedIframe } from './embed-iframe'\n\nexport interface PdfViewerProps {\n src: string\n fileName?: string\n onPreview?: () => void\n onDownload?: () => void\n height?: string\n}\n\nexport function PdfViewer({ src, fileName, onPreview, onDownload, height }: PdfViewerProps) {\n const displayName = fileName || 'PDF Document'\n\n if (!src) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <AdobePdfIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">PDF file not available</p>\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <AdobePdfIcon className=\"w-5 h-5 shrink-0\" />\n <h2 className=\"text-xl font-semibold text-ods-text-primary truncate\">{displayName}</h2>\n </div>\n <div className=\"flex items-center gap-2 w-full sm:w-auto\">\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onPreview ? undefined : src}\n openInNewTab={!onPreview}\n onClick={onPreview}\n leftIcon={<Eye className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Preview\n </Button>\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onDownload ? undefined : src}\n openInNewTab={!onDownload}\n onClick={onDownload}\n leftIcon={<Download className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Download\n </Button>\n </div>\n </div>\n <EmbedIframe src={src} title={displayName} height={height} />\n </div>\n )\n}\n","\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { ExternalLink } from 'lucide-react'\nimport { GoogleSheetsIcon } from '../icons-v2-generated'\nimport { EmbedIframe } from './embed-iframe'\nimport { toGoogleSheetsEmbedUrl, toGoogleSheetsOriginalUrl } from '../../utils/embed-url-converters'\n\nexport interface GoogleSheetsViewerProps {\n externalUrl: string\n fileName?: string\n height?: string\n}\n\nexport function GoogleSheetsViewer({ externalUrl, fileName, height }: GoogleSheetsViewerProps) {\n const displayName = fileName || 'Google Sheet'\n\n if (!externalUrl) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <GoogleSheetsIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">Google Sheet URL not configured</p>\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <GoogleSheetsIcon className=\"w-5 h-5 shrink-0\" />\n <h2 className=\"text-xl font-semibold text-ods-text-primary truncate\">{displayName}</h2>\n </div>\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={toGoogleSheetsOriginalUrl(externalUrl)}\n openInNewTab\n leftIcon={<GoogleSheetsIcon className=\"w-4 h-4\" />}\n rightIcon={<ExternalLink className=\"w-4 h-4\" />}\n className=\"w-full sm:w-auto\"\n >\n Open in Google Sheets\n </Button>\n </div>\n <EmbedIframe\n src={toGoogleSheetsEmbedUrl(externalUrl)}\n title={displayName}\n height={height}\n />\n </div>\n )\n}\n","'use client'\n\nimport { useState } from 'react'\nimport { Button, ToggleGroup, ToggleGroupItem } from '../ui'\nimport { FigmaIcon } from '../icons-v2-generated'\nimport { ExternalLink, Play, LayoutGrid } from 'lucide-react'\nimport { toFigmaEmbedUrl, toFigmaOriginalUrl, isFigmaSlidesUrl } from '../../utils/embed-url-converters'\nimport { EmbedIframe } from './embed-iframe'\n\nexport interface FigmaEmbedProps {\n /** Any Figma URL (design/file/proto/board/slides/deck) or an already-resolved embed URL. */\n url: string\n /** Heading shown above the embed. Defaults to \"Figma Design\". */\n title?: string\n /**\n * iframe height (CSS value). The data-room document viewer omits it (full\n * height, `calc(100vh - 250px)`); inline markdown passes e.g. `\"70vh\"` so the\n * embed sits naturally inside article content.\n */\n height?: string\n /** iframe loading strategy. Defaults to `\"lazy\"`; the data-room viewer passes `\"eager\"`. */\n loading?: 'eager' | 'lazy'\n}\n\ntype SlidesView = 'present' | 'browse'\n\n/**\n * Two-state present/browse toggle for Figma Slides. `present` (default) uses\n * Figma's deck viewer (full-bleed slide + `‹ n/N ›` nav bar + keyboard nav);\n * `browse` uses the thumbnail-rail + zoom viewer.\n */\nfunction SlidesViewToggle({\n view,\n onChange,\n}: {\n view: SlidesView\n onChange: (v: SlidesView) => void\n}) {\n const options: { key: SlidesView; label: string; Icon: typeof Play }[] = [\n { key: 'present', label: 'Present', Icon: Play },\n { key: 'browse', label: 'Browse', Icon: LayoutGrid },\n ]\n return (\n <ToggleGroup\n type=\"single\"\n value={view}\n onValueChange={(v: string) => {\n if (v && v !== view) onChange(v as SlidesView)\n }}\n aria-label=\"Figma slides view mode\"\n className=\"flex shrink-0 items-center gap-0.5 rounded-lg border border-ods-border bg-ods-card p-0.5\"\n >\n {options.map(({ key, label, Icon }) => {\n const active = view === key\n return (\n <ToggleGroupItem\n key={key}\n value={key}\n aria-label={label}\n className={`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-sm font-medium transition-colors ${\n active\n ? 'bg-ods-accent text-ods-text-on-accent'\n : 'text-ods-text-secondary hover:text-ods-text-primary hover:bg-ods-bg-hover'\n }`}\n >\n <Icon className=\"h-4 w-4 shrink-0\" />\n {label}\n </ToggleGroupItem>\n )\n })}\n </ToggleGroup>\n )\n}\n\n/**\n * Single source of truth for every Figma surface — the data-room document viewer\n * and in-article markdown both render this. A header (icon + title + \"Open in\n * Figma\") over an interactive Figma iframe, built from the canonical\n * `toFigmaEmbedUrl` / `toFigmaOriginalUrl` converters + the shared `<EmbedIframe>`.\n * Only height/loading differ per surface.\n *\n * For Slides decks, a present/browse toggle (default = present) lets viewers flip\n * slides with Figma's native nav bar + keyboard, or switch to the thumbnail-rail\n * browse view.\n */\nexport function FigmaEmbed({ url, title, height, loading = 'lazy' }: FigmaEmbedProps) {\n const [view, setView] = useState<SlidesView>('present')\n const isSlides = url ? isFigmaSlidesUrl(url) : false\n const embedSrc = url ? toFigmaEmbedUrl(url, { slidesView: view }) : null\n const originalUrl = (() => {\n if (!url) return null\n try {\n const parsed = new URL(toFigmaOriginalUrl(url))\n const host = parsed.hostname.toLowerCase()\n const okHost = host === 'figma.com' || host.endsWith('.figma.com')\n const okProtocol = parsed.protocol === 'https:' || parsed.protocol === 'http:'\n return okHost && okProtocol ? parsed.toString() : null\n } catch {\n return null\n }\n })()\n const heading = title || 'Figma Design'\n\n return (\n <div className=\"my-6 space-y-3\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <FigmaIcon className=\"w-5 h-5 shrink-0\" />\n <span className=\"font-sans text-base font-semibold text-ods-text-primary truncate\">\n {heading}\n </span>\n </div>\n <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center\">\n {isSlides && embedSrc && <SlidesViewToggle view={view} onChange={setView} />}\n {originalUrl && (\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={originalUrl}\n openInNewTab\n leftIcon={<FigmaIcon className=\"w-4 h-4\" />}\n rightIcon={<ExternalLink className=\"w-4 h-4\" />}\n className=\"w-full sm:w-auto\"\n >\n Open in Figma\n </Button>\n )}\n </div>\n </div>\n {embedSrc ? (\n <EmbedIframe\n src={embedSrc}\n title={heading}\n allow=\"clipboard-write; clipboard-read; fullscreen\"\n loading={loading}\n height={height}\n allowFullScreen\n />\n ) : (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <FigmaIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">Figma URL not configured</p>\n </div>\n )}\n </div>\n )\n}\n","\"use client\"\n\nimport React, { useState, useEffect, Component, ReactNode } from 'react'\nimport Image from '../../embed-shims/next-image'\nimport { useImageEdgeColor } from '../../hooks'\n\n/**\n * Open-Graph metadata returned by the consumer's scrape endpoint.\n *\n * The shape MUST match the JSON the OG endpoint serves at `ogEndpointPath`.\n * The hub's `/api/blog/og-scraper` returns exactly these fields — embedders\n * with a different endpoint must return the same shape (or adapt at the\n * route boundary). Keeps the consumer surface trivial: one URL → one card.\n */\nexport interface OGData {\n title: string\n description: string\n image: string\n originalImage?: string\n url: string\n siteName: string\n type: string\n favicon: string\n}\n\ninterface ErrorBoundaryProps {\n children: ReactNode\n fallback: ReactNode\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean\n}\n\n/**\n * Tiny error boundary tailored for OG link previews — caught errors quietly\n * fall back to the `fallback` prop (typically a plain hyperlink) so a single\n * broken third-party preview can't crash a whole article view.\n *\n * Named `OGLinkErrorBoundary` (not the generic `ErrorBoundary`) because the\n * lib already exports a separate `ErrorBoundary` from\n * `components/features/error-boundary.tsx`. The top-level `components/index.ts`\n * barrel re-exports both `./embeds` and `./features` via `export *`, so a\n * second `ErrorBoundary` here collides as TS2308.\n */\nexport class OGLinkErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { hasError: false }\n }\n\n static getDerivedStateFromError(): ErrorBoundaryState {\n return { hasError: true }\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n console.warn('Link preview error caught by boundary:', error, errorInfo)\n }\n\n render() {\n if (this.state.hasError) return this.props.fallback\n return this.props.children\n }\n}\n\n/**\n * Builds a placeholder image URL when the scrape returns no image. Hub passes\n * its own `buildOgPlaceholderUrl` (which resolves CSS-var ODS colors against\n * the platform's brand palette + hits `/api/og-placeholder`); other embedders\n * can omit the prop to disable the placeholder entirely.\n *\n * Receives the post-scrape `title` and `siteName` so the placeholder can echo\n * the actual card content, not a generic graphic.\n */\nexport type BuildPlaceholderUrl = (\n title: string,\n siteName: string,\n) => string | null\n\nexport interface OGLinkPreviewProps {\n /** The external URL to preview. */\n url: string\n /** Origin / base URL the OG endpoint is served from. Empty / undefined\n * means same-origin (hub-direct use). Embed contexts pass the hub's\n * origin here (e.g. `'https://hub.example.com'`) so the fetch hits\n * the hub instead of the embedder origin.\n *\n * Pattern matches lib's `useNatsDialogSubscription({apiBaseUrl})` +\n * `buildSuggestionUrl({apiBaseUrl})` so all embed-ready surfaces share\n * one configuration knob. */\n apiBaseUrl?: string\n /** Path of the OG endpoint on the configured base. Default\n * `'/api/blog/og-scraper'` matches the hub's route. Override if the\n * embedder serves the same `OGData` shape from a different path. */\n ogEndpointPath?: string\n /** Optional placeholder-builder. Omit to disable the placeholder image\n * (the card then degrades to a favicon+title chip when no scraped image\n * is available). The hub injects its `buildOgPlaceholderUrl` here. */\n buildPlaceholderUrl?: BuildPlaceholderUrl\n /** Override the scraped title (used by publication cards that already know\n * the title locally — e.g. a CMS-managed press link). */\n fallbackTitle?: string\n /** Override the scraped description. */\n fallbackDescription?: string\n /** Override the scraped image — useful when the scrape returns no image but\n * the embedder has a CMS-stored hero image to fall back to. */\n fallbackImage?: string\n /** Publication / source name shown alongside the favicon (e.g. \"TechCrunch\"). */\n publicationName?: string\n /** Publication logo URL shown alongside the title (defaults to favicon). */\n publicationLogo?: string\n /** Card variant. `compact` = horizontal layout (~120px tall) suited for\n * in-doc placements; `default` = larger vertical layout for press / hero\n * positions. */\n variant?: 'default' | 'compact'\n /** Disable the synthesized placeholder image even when `buildPlaceholderUrl`\n * is provided — used by the markdown renderer to keep doc cards lighter. */\n enablePlaceholder?: boolean\n}\n\nfunction getDomain(urlStr: string): string {\n try { return new URL(urlStr).hostname.replace('www.', '') }\n catch { return 'External Link' }\n}\n\nfunction domainToTitle(domain: string): string {\n return domain.split('.')[0].replace(/-/g, ' ').replace(/\\b\\w/g, c => c.toUpperCase())\n}\n\nconst ExternalLinkIcon = ({ size = 16 }: { size?: number }) => (\n <svg width={size} height={size} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" className=\"text-ods-text-secondary group-hover:text-ods-accent transition-colors flex-shrink-0\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" />\n </svg>\n)\n\nconst Favicon = ({ src, size = 'w-6 h-6' }: { src: string; size?: string }) => (\n <img src={src} alt=\"\" className={size} onError={(e) => { (e.target as HTMLImageElement).style.display = 'none' }} />\n)\n\n/**\n * Rich Open-Graph link preview card with skeleton, fallback, and image-edge\n * background detection.\n *\n * Flow:\n * 1. Validate URL early (no network for malformed input, localhost, or\n * RFC1918 ranges — those render as plain `<a>` tags).\n * 2. `GET ogEndpointPath?url=<encoded>` — embedder serves the shape declared\n * in `OGData`.\n * 3. Resolve image: scraped og:image → `originalImage` fallback → `fallbackImage`\n * prop → `buildPlaceholderUrl(title, siteName)`. Each step has its own\n * error toggle so a 404 / CORS-tainted image gracefully degrades.\n * 4. Extract a letterbox background color from the resolved image via\n * `useImageEdgeColor`. Same-origin proxy is REQUIRED for cross-origin\n * images so the `<canvas>` extraction doesn't taint.\n * 5. Render compact (h-[120px] horizontal) or default (vertical w/ aspect-video\n * hero) variant, with image-less degraded variants for each.\n */\nexport const OGLinkPreview: React.FC<OGLinkPreviewProps> = ({\n url,\n apiBaseUrl,\n ogEndpointPath = '/api/blog/og-scraper',\n buildPlaceholderUrl,\n fallbackTitle,\n fallbackDescription,\n fallbackImage,\n publicationName,\n publicationLogo,\n variant = 'default',\n enablePlaceholder = true,\n}) => {\n const [ogData, setOgData] = useState<OGData | null>(null)\n const [loading, setLoading] = useState(true)\n const [error, setError] = useState(false)\n const [imageError, setImageError] = useState(false)\n const [originalImageError, setOriginalImageError] = useState(false)\n const [fallbackImageError, setFallbackImageError] = useState(false)\n\n let isValidUrl = true\n let isLocalhost = false\n try {\n if (url && typeof url === 'string') {\n const urlObj = new URL(url)\n if (['localhost', '127.0.0.1', '0.0.0.0'].includes(urlObj.hostname) ||\n urlObj.hostname.startsWith('192.168.') || urlObj.hostname.startsWith('10.') || urlObj.hostname.startsWith('172.')) {\n isLocalhost = true\n }\n } else {\n isValidUrl = false\n }\n } catch {\n isValidUrl = false\n }\n\n useEffect(() => {\n if (!isValidUrl || isLocalhost) return\n\n const fetchOGData = async () => {\n try {\n new URL(url)\n setLoading(true)\n // Compose `${base}${path}?url=…`. Empty base → relative path\n // (same-origin); absolute base → cross-origin embed against the hub.\n // Plain string concat is safer than `new URL(path, base)` because\n // the latter resolves `path` against the BASE's pathname when\n // `path` is relative, producing surprising URLs when the embedder\n // serves the lib from a subpath.\n const endpoint = `${apiBaseUrl ?? ''}${ogEndpointPath}?url=${encodeURIComponent(url)}`\n const response = await fetch(endpoint)\n if (response.ok) {\n const data = await response.json()\n if (data?.title && data.title !== 'Link Preview Unavailable') {\n setOgData(data)\n } else {\n setError(true)\n }\n } else {\n setError(true)\n }\n } catch {\n setError(true)\n } finally {\n setLoading(false)\n }\n }\n\n fetchOGData()\n }, [url, isValidUrl, isLocalhost, apiBaseUrl, ogEndpointPath])\n\n const isCompact = variant === 'compact'\n const domain = getDomain(url)\n\n const effectiveData: OGData | null = ogData ?? (error ? {\n title: fallbackTitle || domainToTitle(domain),\n description: fallbackDescription || domain,\n image: '',\n url,\n siteName: publicationName || domain,\n type: 'website',\n favicon: `https://www.google.com/s2/favicons?domain=${domain}&sz=32`,\n } : null)\n\n // Hub-injected placeholder builder — fires only when the post-scrape image\n // chain is empty AND `enablePlaceholder` is true. `null` when unprovided.\n const placeholderImageUrl =\n enablePlaceholder && buildPlaceholderUrl && effectiveData?.title\n ? buildPlaceholderUrl(effectiveData.title, effectiveData.siteName || domain)\n : null\n\n const resolvedImageUrl = (effectiveData?.image && !imageError)\n ? effectiveData.image\n : (effectiveData?.originalImage && !originalImageError)\n ? effectiveData.originalImage\n : (fallbackImage && !fallbackImageError)\n ? fallbackImage\n : placeholderImageUrl\n\n const hasImage = !!resolvedImageUrl\n const isFallbackImage = resolvedImageUrl === fallbackImage\n const isPlaceholder = resolvedImageUrl === placeholderImageUrl && !isFallbackImage\n const bgColor = useImageEdgeColor(resolvedImageUrl ?? null, 'var(--ods-bg-secondary)')\n\n const renderSkeleton = () => isCompact ? (\n <div className=\"my-4\">\n <div className=\"flex flex-row border border-ods-border rounded-lg overflow-hidden bg-ods-card h-[120px]\">\n <div className=\"w-[200px] h-full flex-shrink-0 bg-ods-skeleton animate-pulse\" />\n <div className=\"flex-1 p-3 flex flex-col justify-center\">\n <div className=\"bg-ods-skeleton rounded animate-pulse h-4 w-3/4 mb-2\" />\n <div className=\"bg-ods-skeleton rounded animate-pulse h-3 w-full mb-1\" />\n <div className=\"bg-ods-skeleton rounded animate-pulse h-3 w-2/3 mb-2\" />\n <div className=\"bg-ods-skeleton rounded animate-pulse h-3 w-1/3\" />\n </div>\n </div>\n </div>\n ) : (\n <div className=\"my-6\">\n <div className=\"block border border-ods-border rounded-lg overflow-hidden bg-ods-card\">\n <div className=\"aspect-video w-full bg-ods-skeleton overflow-hidden relative animate-pulse\" />\n <div className=\"p-4\">\n <div className=\"flex items-start gap-3\">\n <div className=\"w-6 h-6 bg-ods-skeleton rounded flex-shrink-0 mt-0.5 animate-pulse\" />\n <div className=\"flex-1 min-w-0\">\n <div className=\"h-[2.5rem] leading-[1.25rem] mb-2 overflow-hidden\">\n <div className=\"bg-ods-skeleton rounded animate-pulse\" style={{ height: '1.25rem', marginBottom: '0.25rem' }} />\n <div className=\"bg-ods-skeleton rounded animate-pulse w-3/4\" style={{ height: '1.25rem' }} />\n </div>\n <div className=\"h-[2.5rem] leading-[1.25rem] mb-2 overflow-hidden\">\n <div className=\"bg-ods-skeleton rounded animate-pulse\" style={{ height: '1.25rem', marginBottom: '0.25rem' }} />\n <div className=\"bg-ods-skeleton rounded animate-pulse w-5/6\" style={{ height: '1.25rem' }} />\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"bg-ods-skeleton rounded animate-pulse\" style={{ height: '0.75rem', width: '6rem' }} />\n <div className=\"bg-ods-skeleton rounded animate-pulse\" style={{ height: '0.75rem', width: '5rem' }} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n )\n\n if (!url || typeof url !== 'string' || !isValidUrl) return renderSkeleton()\n\n if (isLocalhost) {\n return (\n <div className=\"my-6\">\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-2 text-ods-accent hover:text-ods-accent-hover transition-colors\">\n <span className=\"underline\">{url}</span>\n <ExternalLinkIcon size={14} />\n </a>\n </div>\n )\n }\n\n if (loading) return renderSkeleton()\n if (!effectiveData) return renderSkeleton()\n\n const title = fallbackTitle || effectiveData.title\n // Empty string when the scrape returned nothing — descriptions render\n // conditionally below. Avoids the legacy `'No description available'` filler\n // that signaled \"broken card\" to users.\n const description = fallbackDescription || effectiveData.description || ''\n const ogDomain = getDomain(effectiveData.url)\n const faviconSrc = effectiveData.favicon || `https://www.google.com/s2/favicons?domain=${ogDomain}&sz=32`\n const logoSrc = publicationLogo || faviconSrc\n\n const handleImageError = () => {\n if (effectiveData.image && !imageError) setImageError(true)\n else if (effectiveData.originalImage && !originalImageError) setOriginalImageError(true)\n else setFallbackImageError(true)\n }\n\n const renderImage = () => {\n if (!resolvedImageUrl) return null\n if (isPlaceholder) {\n return (\n <img src={resolvedImageUrl} alt={title}\n className=\"absolute inset-0 w-full h-full object-cover rounded-md\" />\n )\n }\n if (isFallbackImage) {\n return (\n <Image src={resolvedImageUrl} alt={title} fill\n className=\"object-contain rounded-md group-hover:scale-105 transition-transform duration-300\"\n onError={handleImageError}\n unoptimized={resolvedImageUrl.includes('/render/image/')} />\n )\n }\n return (\n <img src={resolvedImageUrl} alt={title}\n className=\"absolute inset-0 w-full h-full object-contain rounded-md group-hover:scale-105 transition-transform duration-300\"\n onError={handleImageError} />\n )\n }\n\n if (isCompact) {\n if (!hasImage) {\n return (\n <div className=\"my-4\">\n <a href={effectiveData.url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"flex flex-row items-center gap-3 border border-ods-border rounded-lg overflow-hidden bg-ods-card hover:border-ods-accent transition-all duration-200 group px-4 py-3\">\n <div className=\"w-8 h-8 bg-ods-bg-secondary rounded-lg flex items-center justify-center flex-shrink-0\">\n <Favicon src={faviconSrc} size=\"w-5 h-5\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <h3 className=\"font-sans text-sm font-semibold text-ods-text-primary group-hover:text-ods-accent transition-colors truncate\">{title}</h3>\n {description && (\n <p className=\"font-sans text-xs text-ods-text-secondary truncate\">{description}</p>\n )}\n </div>\n <ExternalLinkIcon size={14} />\n </a>\n </div>\n )\n }\n return (\n <div className=\"my-4\">\n <a href={effectiveData.url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"flex flex-row border border-ods-border rounded-lg overflow-hidden bg-ods-card hover:border-ods-accent transition-colors group h-[120px]\">\n <div className=\"w-[200px] h-full flex-shrink-0 overflow-hidden relative flex items-center justify-center rounded-lg transition-colors duration-300\" style={{ backgroundColor: bgColor }}>\n {renderImage()}\n </div>\n <div className=\"flex-1 p-3 flex flex-col justify-center min-w-0\">\n <h3 className=\"font-sans text-sm font-semibold text-ods-text-primary overflow-hidden group-hover:text-ods-accent transition-colors\"\n style={{ display: '-webkit-box', WebkitLineClamp: 1, WebkitBoxOrient: 'vertical' }}>{title}</h3>\n {description && (\n <p className=\"font-sans text-xs text-ods-text-secondary overflow-hidden mt-1\"\n style={{ display: '-webkit-box', WebkitLineClamp: 2, WebkitBoxOrient: 'vertical' }}>{description}</p>\n )}\n <div className=\"text-xs text-ods-text-secondary mt-1 truncate\">{effectiveData.siteName || ogDomain}</div>\n </div>\n </a>\n </div>\n )\n }\n\n if (!hasImage) {\n return (\n <div className=\"my-6\">\n <a href={effectiveData.url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"flex items-center gap-3 border border-ods-border rounded-lg overflow-hidden bg-ods-card hover:border-ods-accent transition-all duration-200 group px-4 py-3\">\n <div className=\"w-10 h-10 bg-ods-bg-secondary rounded-lg flex items-center justify-center flex-shrink-0\">\n <Favicon src={faviconSrc} />\n </div>\n <div className=\"flex-1 min-w-0\">\n <h3 className=\"font-sans font-semibold text-ods-text-primary text-base group-hover:text-ods-accent transition-colors truncate\">{title}</h3>\n {description && (\n <p className=\"font-sans text-sm text-ods-text-secondary truncate\">{description}</p>\n )}\n </div>\n <ExternalLinkIcon />\n </a>\n </div>\n )\n }\n\n return (\n <div className=\"my-6\">\n <a href={effectiveData.url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"block border border-ods-border rounded-lg overflow-hidden bg-ods-card hover:border-ods-accent transition-colors group\">\n <div className=\"aspect-video w-full overflow-hidden relative flex items-center justify-center rounded-lg transition-colors duration-300\" style={{ backgroundColor: bgColor }}>\n {renderImage()}\n </div>\n <div className=\"p-4\">\n <div className=\"flex items-start gap-3\">\n <img src={logoSrc} alt={publicationName || ''} className=\"w-6 h-6 rounded object-contain flex-shrink-0 mt-0.5\"\n onError={(e) => { (e.target as HTMLImageElement).style.display = 'none' }} />\n <div className=\"flex-1 min-w-0\">\n <h3 className=\"font-sans font-semibold text-ods-text-primary text-base overflow-hidden group-hover:text-ods-accent transition-colors h-[2.5rem] leading-[1.25rem] mb-2\"\n style={{ display: '-webkit-box', WebkitLineClamp: 2, WebkitBoxOrient: 'vertical' }}>{title}</h3>\n {description && (\n <p className=\"font-sans text-sm text-ods-text-secondary overflow-hidden h-[2.5rem] leading-[1.25rem] mb-2\"\n style={{ display: '-webkit-box', WebkitLineClamp: 2, WebkitBoxOrient: 'vertical' }}>{description}</p>\n )}\n <div className=\"flex items-center gap-2 text-xs text-ods-text-secondary\">\n <span className=\"font-medium\">{effectiveData.siteName}</span>\n <span>•</span>\n <span className=\"truncate\">{ogDomain}</span>\n </div>\n </div>\n </div>\n </div>\n </a>\n </div>\n )\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-DVUFNTI2.cjs","../src/components/embeds/embed-iframe.tsx","../src/components/embeds/pdf-viewer.tsx","../src/components/embeds/google-sheets-viewer.tsx","../src/components/embeds/figma-embed.tsx","../src/components/embeds/og-link-preview.tsx"],"names":["jsx","jsxs"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACzBA,8BAAgE;AAS1D,+CAAA;AANN,SAAS,oBAAA,CAAqB,EAAE,OAAO,CAAA,EAAwB;AAC7D,EAAA,uBACE,6BAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAU,0FAAA;AAAA,MACV,KAAA,EAAO,EAAE,MAAA,EAAQ,OAAA,GAAU,sBAAsB,CAAA;AAAA,MAEjD,QAAA,kBAAA,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,wDAAA,EACb,QAAA,EAAA;AAAA,wBAAA,6BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,mCAAA,CAAmC,CAAA;AAAA,wBAClD,6BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,+BAAA,CAA+B,CAAA;AAAA,wBAC9C,6BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,+BAAA,CAA+B;AAAA,MAAA,EAAA,CAChD;AAAA,IAAA;AAAA,EACF,CAAA;AAEJ;AA6BO,SAAS,WAAA,CAAY;AAAA,EAC1B,GAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,cAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,EAAA,EAAI,6BAAA,KAAc,CAAA;AAC9C,EAAA,MAAM,UAAA,EAAY,2BAAA,IAA8B,CAAA;AAChD,EAAA,MAAM,WAAA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import React, { useState, useCallback, useRef, useEffect } from 'react'\n\n/** Loading skeleton for iframe embeds — matches project skeleton pattern */\nfunction EmbedLoadingSkeleton({ height }: { height?: string }) {\n return (\n <div\n className=\"w-full rounded-lg border border-ods-border overflow-hidden bg-ods-skeleton animate-pulse\"\n style={{ height: height || 'calc(100vh - 250px)' }}\n >\n <div className=\"flex flex-col items-center justify-center h-full gap-4\">\n <div className=\"w-12 h-12 rounded-lg bg-ods-card\" />\n <div className=\"h-4 w-48 rounded bg-ods-card\" />\n <div className=\"h-3 w-32 rounded bg-ods-card\" />\n </div>\n </div>\n )\n}\n\nexport interface EmbedIframeProps {\n /** The URL to embed */\n src: string\n /** Accessible title for the iframe */\n title: string\n /** Additional class names for the outer container */\n className?: string\n /** Container height (CSS value). Defaults to `calc(100vh - 250px)` */\n height?: string\n /** iframe `allow` attribute */\n allow?: string\n /** iframe `referrerPolicy` attribute */\n referrerPolicy?: React.IframeHTMLAttributes<HTMLIFrameElement>['referrerPolicy']\n /** iframe `loading` attribute */\n loading?: 'eager' | 'lazy'\n /** iframe `allowFullScreen` attribute */\n allowFullScreen?: boolean\n}\n\n/**\n * Base iframe wrapper with loading skeleton and proper memory cleanup.\n *\n * Prevents memory leaks by:\n * - Using `key={src}` to force full unmount/remount when src changes\n * - Setting iframe src to about:blank on unmount to release the embedded document\n * - Resetting loaded state when src changes\n */\nexport function EmbedIframe({\n src,\n title,\n className,\n height,\n allow,\n referrerPolicy,\n loading,\n allowFullScreen,\n}: EmbedIframeProps) {\n const [isLoaded, setIsLoaded] = useState(false)\n const iframeRef = useRef<HTMLIFrameElement>(null)\n const handleLoad = useCallback(() => setIsLoaded(true), [])\n\n useEffect(() => {\n setIsLoaded(false)\n }, [src])\n\n useEffect(() => {\n const iframe = iframeRef.current\n return () => {\n if (iframe) {\n try {\n iframe.src = 'about:blank'\n } catch {\n // Cross-origin iframes may throw — safe to ignore\n }\n }\n }\n }, [src])\n\n const resolvedHeight = height || 'calc(100vh - 250px)'\n\n return (\n <>\n {!isLoaded && <EmbedLoadingSkeleton height={resolvedHeight} />}\n <div\n className={`w-full rounded-lg border border-ods-border overflow-hidden ${!isLoaded ? 'h-0 overflow-hidden' : ''} ${className || ''}`}\n style={isLoaded ? { height: resolvedHeight } : undefined}\n >\n <iframe\n key={src}\n ref={iframeRef}\n src={src}\n className=\"w-full h-full border-0\"\n title={title}\n onLoad={handleLoad}\n allow={allow}\n referrerPolicy={referrerPolicy}\n loading={loading}\n allowFullScreen={allow?.includes('fullscreen') ? undefined : allowFullScreen}\n />\n </div>\n </>\n )\n}\n","\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { Download, Eye } from 'lucide-react'\nimport { AdobePdfIcon } from '../icons-v2-generated'\nimport { EmbedIframe } from './embed-iframe'\n\nexport interface PdfViewerProps {\n src: string\n fileName?: string\n onPreview?: () => void\n onDownload?: () => void\n height?: string\n}\n\nexport function PdfViewer({ src, fileName, onPreview, onDownload, height }: PdfViewerProps) {\n const displayName = fileName || 'PDF Document'\n\n if (!src) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <AdobePdfIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">PDF file not available</p>\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <AdobePdfIcon className=\"w-5 h-5 shrink-0\" />\n <h2 className=\"text-xl font-semibold text-ods-text-primary truncate\">{displayName}</h2>\n </div>\n <div className=\"flex items-center gap-2 w-full sm:w-auto\">\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onPreview ? undefined : src}\n openInNewTab={!onPreview}\n onClick={onPreview}\n leftIcon={<Eye className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Preview\n </Button>\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onDownload ? undefined : src}\n openInNewTab={!onDownload}\n onClick={onDownload}\n leftIcon={<Download className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Download\n </Button>\n </div>\n </div>\n <EmbedIframe src={src} title={displayName} height={height} />\n </div>\n )\n}\n","\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { ExternalLink } from 'lucide-react'\nimport { GoogleSheetsIcon } from '../icons-v2-generated'\nimport { EmbedIframe } from './embed-iframe'\nimport { toGoogleSheetsEmbedUrl, toGoogleSheetsOriginalUrl } from '../../utils/embed-url-converters'\n\nexport interface GoogleSheetsViewerProps {\n externalUrl: string\n fileName?: string\n height?: string\n}\n\nexport function GoogleSheetsViewer({ externalUrl, fileName, height }: GoogleSheetsViewerProps) {\n const displayName = fileName || 'Google Sheet'\n\n if (!externalUrl) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <GoogleSheetsIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">Google Sheet URL not configured</p>\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <GoogleSheetsIcon className=\"w-5 h-5 shrink-0\" />\n <h2 className=\"text-xl font-semibold text-ods-text-primary truncate\">{displayName}</h2>\n </div>\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={toGoogleSheetsOriginalUrl(externalUrl)}\n openInNewTab\n leftIcon={<GoogleSheetsIcon className=\"w-4 h-4\" />}\n rightIcon={<ExternalLink className=\"w-4 h-4\" />}\n className=\"w-full sm:w-auto\"\n >\n Open in Google Sheets\n </Button>\n </div>\n <EmbedIframe\n src={toGoogleSheetsEmbedUrl(externalUrl)}\n title={displayName}\n height={height}\n />\n </div>\n )\n}\n","'use client'\n\nimport { useState } from 'react'\nimport { Button, ToggleGroup, ToggleGroupItem } from '../ui'\nimport { FigmaIcon } from '../icons-v2-generated'\nimport { ExternalLink, Play, LayoutGrid } from 'lucide-react'\nimport { toFigmaEmbedUrl, toFigmaOriginalUrl, isFigmaSlidesUrl } from '../../utils/embed-url-converters'\nimport { EmbedIframe } from './embed-iframe'\n\nexport interface FigmaEmbedProps {\n /** Any Figma URL (design/file/proto/board/slides/deck) or an already-resolved embed URL. */\n url: string\n /** Heading shown above the embed. Defaults to \"Figma Design\". */\n title?: string\n /**\n * iframe height (CSS value). The data-room document viewer omits it (full\n * height, `calc(100vh - 250px)`); inline markdown passes e.g. `\"70vh\"` so the\n * embed sits naturally inside article content.\n */\n height?: string\n /** iframe loading strategy. Defaults to `\"lazy\"`; the data-room viewer passes `\"eager\"`. */\n loading?: 'eager' | 'lazy'\n}\n\ntype SlidesView = 'present' | 'browse'\n\n/**\n * Two-state present/browse toggle for Figma Slides. `present` (default) uses\n * Figma's deck viewer (full-bleed slide + `‹ n/N ›` nav bar + keyboard nav);\n * `browse` uses the thumbnail-rail + zoom viewer.\n */\nfunction SlidesViewToggle({\n view,\n onChange,\n}: {\n view: SlidesView\n onChange: (v: SlidesView) => void\n}) {\n const options: { key: SlidesView; label: string; Icon: typeof Play }[] = [\n { key: 'present', label: 'Present', Icon: Play },\n { key: 'browse', label: 'Browse', Icon: LayoutGrid },\n ]\n return (\n <ToggleGroup\n type=\"single\"\n value={view}\n onValueChange={(v: string) => {\n if (v && v !== view) onChange(v as SlidesView)\n }}\n aria-label=\"Figma slides view mode\"\n className=\"flex shrink-0 items-center gap-0.5 rounded-lg border border-ods-border bg-ods-card p-0.5\"\n >\n {options.map(({ key, label, Icon }) => {\n const active = view === key\n return (\n <ToggleGroupItem\n key={key}\n value={key}\n aria-label={label}\n className={`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-sm font-medium transition-colors ${\n active\n ? 'bg-ods-accent text-ods-text-on-accent'\n : 'text-ods-text-secondary hover:text-ods-text-primary hover:bg-ods-bg-hover'\n }`}\n >\n <Icon className=\"h-4 w-4 shrink-0\" />\n {label}\n </ToggleGroupItem>\n )\n })}\n </ToggleGroup>\n )\n}\n\n/**\n * Single source of truth for every Figma surface — the data-room document viewer\n * and in-article markdown both render this. A header (icon + title + \"Open in\n * Figma\") over an interactive Figma iframe, built from the canonical\n * `toFigmaEmbedUrl` / `toFigmaOriginalUrl` converters + the shared `<EmbedIframe>`.\n * Only height/loading differ per surface.\n *\n * For Slides decks, a present/browse toggle (default = present) lets viewers flip\n * slides with Figma's native nav bar + keyboard, or switch to the thumbnail-rail\n * browse view.\n */\nexport function FigmaEmbed({ url, title, height, loading = 'lazy' }: FigmaEmbedProps) {\n const [view, setView] = useState<SlidesView>('present')\n const isSlides = url ? isFigmaSlidesUrl(url) : false\n const embedSrc = url ? toFigmaEmbedUrl(url, { slidesView: view }) : null\n const originalUrl = (() => {\n if (!url) return null\n try {\n const parsed = new URL(toFigmaOriginalUrl(url))\n const host = parsed.hostname.toLowerCase()\n const okHost = host === 'figma.com' || host.endsWith('.figma.com')\n const okProtocol = parsed.protocol === 'https:' || parsed.protocol === 'http:'\n return okHost && okProtocol ? parsed.toString() : null\n } catch {\n return null\n }\n })()\n const heading = title || 'Figma Design'\n\n return (\n <div className=\"my-6 space-y-3\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <FigmaIcon className=\"w-5 h-5 shrink-0\" />\n <span className=\"font-sans text-base font-semibold text-ods-text-primary truncate\">\n {heading}\n </span>\n </div>\n <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center\">\n {isSlides && embedSrc && <SlidesViewToggle view={view} onChange={setView} />}\n {originalUrl && (\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={originalUrl}\n openInNewTab\n leftIcon={<FigmaIcon className=\"w-4 h-4\" />}\n rightIcon={<ExternalLink className=\"w-4 h-4\" />}\n className=\"w-full sm:w-auto\"\n >\n Open in Figma\n </Button>\n )}\n </div>\n </div>\n {embedSrc ? (\n <EmbedIframe\n src={embedSrc}\n title={heading}\n allow=\"clipboard-write; clipboard-read; fullscreen\"\n loading={loading}\n height={height}\n allowFullScreen\n />\n ) : (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <FigmaIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">Figma URL not configured</p>\n </div>\n )}\n </div>\n )\n}\n","\"use client\"\n\nimport React, { useState, useEffect, Component, ReactNode } from 'react'\nimport Image from '../../embed-shims/next-image'\nimport { useImageEdgeColor } from '../../hooks'\n\n/**\n * Open-Graph metadata returned by the consumer's scrape endpoint.\n *\n * The shape MUST match the JSON the OG endpoint serves at `ogEndpointPath`.\n * The hub's `/api/blog/og-scraper` returns exactly these fields — embedders\n * with a different endpoint must return the same shape (or adapt at the\n * route boundary). Keeps the consumer surface trivial: one URL → one card.\n */\nexport interface OGData {\n title: string\n description: string\n image: string\n originalImage?: string\n url: string\n siteName: string\n type: string\n favicon: string\n}\n\ninterface ErrorBoundaryProps {\n children: ReactNode\n fallback: ReactNode\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean\n}\n\n/**\n * Tiny error boundary tailored for OG link previews — caught errors quietly\n * fall back to the `fallback` prop (typically a plain hyperlink) so a single\n * broken third-party preview can't crash a whole article view.\n *\n * Named `OGLinkErrorBoundary` (not the generic `ErrorBoundary`) because the\n * lib already exports a separate `ErrorBoundary` from\n * `components/features/error-boundary.tsx`. The top-level `components/index.ts`\n * barrel re-exports both `./embeds` and `./features` via `export *`, so a\n * second `ErrorBoundary` here collides as TS2308.\n */\nexport class OGLinkErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { hasError: false }\n }\n\n static getDerivedStateFromError(): ErrorBoundaryState {\n return { hasError: true }\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n console.warn('Link preview error caught by boundary:', error, errorInfo)\n }\n\n render() {\n if (this.state.hasError) return this.props.fallback\n return this.props.children\n }\n}\n\n/**\n * Builds a placeholder image URL when the scrape returns no image. Hub passes\n * its own `buildOgPlaceholderUrl` (which resolves CSS-var ODS colors against\n * the platform's brand palette + hits `/api/og-placeholder`); other embedders\n * can omit the prop to disable the placeholder entirely.\n *\n * Receives the post-scrape `title` and `siteName` so the placeholder can echo\n * the actual card content, not a generic graphic.\n */\nexport type BuildPlaceholderUrl = (\n title: string,\n siteName: string,\n) => string | null\n\nexport interface OGLinkPreviewProps {\n /** The external URL to preview. */\n url: string\n /** Origin / base URL the OG endpoint is served from. Empty / undefined\n * means same-origin (hub-direct use). Embed contexts pass the hub's\n * origin here (e.g. `'https://hub.example.com'`) so the fetch hits\n * the hub instead of the embedder origin.\n *\n * Pattern matches lib's `useNatsDialogSubscription({apiBaseUrl})` +\n * `buildSuggestionUrl({apiBaseUrl})` so all embed-ready surfaces share\n * one configuration knob. */\n apiBaseUrl?: string\n /** Path of the OG endpoint on the configured base. Default\n * `'/api/blog/og-scraper'` matches the hub's route. Override if the\n * embedder serves the same `OGData` shape from a different path. */\n ogEndpointPath?: string\n /** Optional placeholder-builder. Omit to disable the placeholder image\n * (the card then degrades to a favicon+title chip when no scraped image\n * is available). The hub injects its `buildOgPlaceholderUrl` here. */\n buildPlaceholderUrl?: BuildPlaceholderUrl\n /** Override the scraped title (used by publication cards that already know\n * the title locally — e.g. a CMS-managed press link). */\n fallbackTitle?: string\n /** Override the scraped description. */\n fallbackDescription?: string\n /** Override the scraped image — useful when the scrape returns no image but\n * the embedder has a CMS-stored hero image to fall back to. */\n fallbackImage?: string\n /** Publication / source name shown alongside the favicon (e.g. \"TechCrunch\"). */\n publicationName?: string\n /** Publication logo URL shown alongside the title (defaults to favicon). */\n publicationLogo?: string\n /** Card variant. `compact` = horizontal layout (~120px tall) suited for\n * in-doc placements; `default` = larger vertical layout for press / hero\n * positions. */\n variant?: 'default' | 'compact'\n /** Disable the synthesized placeholder image even when `buildPlaceholderUrl`\n * is provided — used by the markdown renderer to keep doc cards lighter. */\n enablePlaceholder?: boolean\n}\n\nfunction getDomain(urlStr: string): string {\n try { return new URL(urlStr).hostname.replace('www.', '') }\n catch { return 'External Link' }\n}\n\nfunction domainToTitle(domain: string): string {\n return domain.split('.')[0].replace(/-/g, ' ').replace(/\\b\\w/g, c => c.toUpperCase())\n}\n\nconst ExternalLinkIcon = ({ size = 16 }: { size?: number }) => (\n <svg width={size} height={size} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" className=\"text-ods-text-secondary group-hover:text-ods-accent transition-colors flex-shrink-0\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" />\n </svg>\n)\n\nconst Favicon = ({ src, size = 'w-6 h-6' }: { src: string; size?: string }) => (\n <img src={src} alt=\"\" className={size} onError={(e) => { (e.target as HTMLImageElement).style.display = 'none' }} />\n)\n\n/**\n * Rich Open-Graph link preview card with skeleton, fallback, and image-edge\n * background detection.\n *\n * Flow:\n * 1. Validate URL early (no network for malformed input, localhost, or\n * RFC1918 ranges — those render as plain `<a>` tags).\n * 2. `GET ogEndpointPath?url=<encoded>` — embedder serves the shape declared\n * in `OGData`.\n * 3. Resolve image: scraped og:image → `originalImage` fallback → `fallbackImage`\n * prop → `buildPlaceholderUrl(title, siteName)`. Each step has its own\n * error toggle so a 404 / CORS-tainted image gracefully degrades.\n * 4. Extract a letterbox background color from the resolved image via\n * `useImageEdgeColor`. Same-origin proxy is REQUIRED for cross-origin\n * images so the `<canvas>` extraction doesn't taint.\n * 5. Render compact (h-[120px] horizontal) or default (vertical w/ aspect-video\n * hero) variant, with image-less degraded variants for each.\n */\nexport const OGLinkPreview: React.FC<OGLinkPreviewProps> = ({\n url,\n apiBaseUrl,\n ogEndpointPath = '/api/blog/og-scraper',\n buildPlaceholderUrl,\n fallbackTitle,\n fallbackDescription,\n fallbackImage,\n publicationName,\n publicationLogo,\n variant = 'default',\n enablePlaceholder = true,\n}) => {\n const [ogData, setOgData] = useState<OGData | null>(null)\n const [loading, setLoading] = useState(true)\n const [error, setError] = useState(false)\n const [imageError, setImageError] = useState(false)\n const [originalImageError, setOriginalImageError] = useState(false)\n const [fallbackImageError, setFallbackImageError] = useState(false)\n\n let isValidUrl = true\n let isLocalhost = false\n try {\n if (url && typeof url === 'string') {\n const urlObj = new URL(url)\n if (['localhost', '127.0.0.1', '0.0.0.0'].includes(urlObj.hostname) ||\n urlObj.hostname.startsWith('192.168.') || urlObj.hostname.startsWith('10.') || urlObj.hostname.startsWith('172.')) {\n isLocalhost = true\n }\n } else {\n isValidUrl = false\n }\n } catch {\n isValidUrl = false\n }\n\n useEffect(() => {\n if (!isValidUrl || isLocalhost) return\n\n const fetchOGData = async () => {\n try {\n new URL(url)\n setLoading(true)\n // Compose `${base}${path}?url=…`. Empty base → relative path\n // (same-origin); absolute base → cross-origin embed against the hub.\n // Plain string concat is safer than `new URL(path, base)` because\n // the latter resolves `path` against the BASE's pathname when\n // `path` is relative, producing surprising URLs when the embedder\n // serves the lib from a subpath.\n const endpoint = `${apiBaseUrl ?? ''}${ogEndpointPath}?url=${encodeURIComponent(url)}`\n const response = await fetch(endpoint)\n if (response.ok) {\n const data = await response.json()\n if (data?.title && data.title !== 'Link Preview Unavailable') {\n setOgData(data)\n } else {\n setError(true)\n }\n } else {\n setError(true)\n }\n } catch {\n setError(true)\n } finally {\n setLoading(false)\n }\n }\n\n fetchOGData()\n }, [url, isValidUrl, isLocalhost, apiBaseUrl, ogEndpointPath])\n\n const isCompact = variant === 'compact'\n const domain = getDomain(url)\n\n const effectiveData: OGData | null = ogData ?? (error ? {\n title: fallbackTitle || domainToTitle(domain),\n description: fallbackDescription || domain,\n image: '',\n url,\n siteName: publicationName || domain,\n type: 'website',\n favicon: `https://www.google.com/s2/favicons?domain=${domain}&sz=32`,\n } : null)\n\n // Hub-injected placeholder builder — fires only when the post-scrape image\n // chain is empty AND `enablePlaceholder` is true. `null` when unprovided.\n const placeholderImageUrl =\n enablePlaceholder && buildPlaceholderUrl && effectiveData?.title\n ? buildPlaceholderUrl(effectiveData.title, effectiveData.siteName || domain)\n : null\n\n const resolvedImageUrl = (effectiveData?.image && !imageError)\n ? effectiveData.image\n : (effectiveData?.originalImage && !originalImageError)\n ? effectiveData.originalImage\n : (fallbackImage && !fallbackImageError)\n ? fallbackImage\n : placeholderImageUrl\n\n const hasImage = !!resolvedImageUrl\n const isFallbackImage = resolvedImageUrl === fallbackImage\n const isPlaceholder = resolvedImageUrl === placeholderImageUrl && !isFallbackImage\n const bgColor = useImageEdgeColor(resolvedImageUrl ?? null, 'var(--ods-bg-secondary)')\n\n const renderSkeleton = () => isCompact ? (\n <div className=\"my-4\">\n <div className=\"flex flex-row border border-ods-border rounded-lg overflow-hidden bg-ods-card h-[120px]\">\n <div className=\"w-[200px] h-full flex-shrink-0 bg-ods-skeleton animate-pulse\" />\n <div className=\"flex-1 p-3 flex flex-col justify-center\">\n <div className=\"bg-ods-skeleton rounded animate-pulse h-4 w-3/4 mb-2\" />\n <div className=\"bg-ods-skeleton rounded animate-pulse h-3 w-full mb-1\" />\n <div className=\"bg-ods-skeleton rounded animate-pulse h-3 w-2/3 mb-2\" />\n <div className=\"bg-ods-skeleton rounded animate-pulse h-3 w-1/3\" />\n </div>\n </div>\n </div>\n ) : (\n <div className=\"my-6\">\n <div className=\"block border border-ods-border rounded-lg overflow-hidden bg-ods-card\">\n <div className=\"aspect-video w-full bg-ods-skeleton overflow-hidden relative animate-pulse\" />\n <div className=\"p-4\">\n <div className=\"flex items-start gap-3\">\n <div className=\"w-6 h-6 bg-ods-skeleton rounded flex-shrink-0 mt-0.5 animate-pulse\" />\n <div className=\"flex-1 min-w-0\">\n <div className=\"h-[2.5rem] leading-[1.25rem] mb-2 overflow-hidden\">\n <div className=\"bg-ods-skeleton rounded animate-pulse\" style={{ height: '1.25rem', marginBottom: '0.25rem' }} />\n <div className=\"bg-ods-skeleton rounded animate-pulse w-3/4\" style={{ height: '1.25rem' }} />\n </div>\n <div className=\"h-[2.5rem] leading-[1.25rem] mb-2 overflow-hidden\">\n <div className=\"bg-ods-skeleton rounded animate-pulse\" style={{ height: '1.25rem', marginBottom: '0.25rem' }} />\n <div className=\"bg-ods-skeleton rounded animate-pulse w-5/6\" style={{ height: '1.25rem' }} />\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"bg-ods-skeleton rounded animate-pulse\" style={{ height: '0.75rem', width: '6rem' }} />\n <div className=\"bg-ods-skeleton rounded animate-pulse\" style={{ height: '0.75rem', width: '5rem' }} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n )\n\n if (!url || typeof url !== 'string' || !isValidUrl) return renderSkeleton()\n\n if (isLocalhost) {\n return (\n <div className=\"my-6\">\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-2 text-ods-accent hover:text-ods-accent-hover transition-colors\">\n <span className=\"underline\">{url}</span>\n <ExternalLinkIcon size={14} />\n </a>\n </div>\n )\n }\n\n if (loading) return renderSkeleton()\n if (!effectiveData) return renderSkeleton()\n\n const title = fallbackTitle || effectiveData.title\n // Empty string when the scrape returned nothing — descriptions render\n // conditionally below. Avoids the legacy `'No description available'` filler\n // that signaled \"broken card\" to users.\n const description = fallbackDescription || effectiveData.description || ''\n const ogDomain = getDomain(effectiveData.url)\n const faviconSrc = effectiveData.favicon || `https://www.google.com/s2/favicons?domain=${ogDomain}&sz=32`\n const logoSrc = publicationLogo || faviconSrc\n\n const handleImageError = () => {\n if (effectiveData.image && !imageError) setImageError(true)\n else if (effectiveData.originalImage && !originalImageError) setOriginalImageError(true)\n else setFallbackImageError(true)\n }\n\n const renderImage = () => {\n if (!resolvedImageUrl) return null\n if (isPlaceholder) {\n return (\n <img src={resolvedImageUrl} alt={title}\n className=\"absolute inset-0 w-full h-full object-cover rounded-md\" />\n )\n }\n if (isFallbackImage) {\n return (\n <Image src={resolvedImageUrl} alt={title} fill\n className=\"object-contain rounded-md group-hover:scale-105 transition-transform duration-300\"\n onError={handleImageError}\n unoptimized={resolvedImageUrl.includes('/render/image/')} />\n )\n }\n return (\n <img src={resolvedImageUrl} alt={title}\n className=\"absolute inset-0 w-full h-full object-contain rounded-md group-hover:scale-105 transition-transform duration-300\"\n onError={handleImageError} />\n )\n }\n\n if (isCompact) {\n if (!hasImage) {\n return (\n <div className=\"my-4\">\n <a href={effectiveData.url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"flex flex-row items-center gap-3 border border-ods-border rounded-lg overflow-hidden bg-ods-card hover:border-ods-accent transition-all duration-200 group px-4 py-3\">\n <div className=\"w-8 h-8 bg-ods-bg-secondary rounded-lg flex items-center justify-center flex-shrink-0\">\n <Favicon src={faviconSrc} size=\"w-5 h-5\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <h3 className=\"font-sans text-sm font-semibold text-ods-text-primary group-hover:text-ods-accent transition-colors truncate\">{title}</h3>\n {description && (\n <p className=\"font-sans text-xs text-ods-text-secondary truncate\">{description}</p>\n )}\n </div>\n <ExternalLinkIcon size={14} />\n </a>\n </div>\n )\n }\n return (\n <div className=\"my-4\">\n <a href={effectiveData.url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"flex flex-row border border-ods-border rounded-lg overflow-hidden bg-ods-card hover:border-ods-accent transition-colors group h-[120px]\">\n <div className=\"w-[200px] h-full flex-shrink-0 overflow-hidden relative flex items-center justify-center rounded-lg transition-colors duration-300\" style={{ backgroundColor: bgColor }}>\n {renderImage()}\n </div>\n <div className=\"flex-1 p-3 flex flex-col justify-center min-w-0\">\n <h3 className=\"font-sans text-sm font-semibold text-ods-text-primary overflow-hidden group-hover:text-ods-accent transition-colors\"\n style={{ display: '-webkit-box', WebkitLineClamp: 1, WebkitBoxOrient: 'vertical' }}>{title}</h3>\n {description && (\n <p className=\"font-sans text-xs text-ods-text-secondary overflow-hidden mt-1\"\n style={{ display: '-webkit-box', WebkitLineClamp: 2, WebkitBoxOrient: 'vertical' }}>{description}</p>\n )}\n <div className=\"text-xs text-ods-text-secondary mt-1 truncate\">{effectiveData.siteName || ogDomain}</div>\n </div>\n </a>\n </div>\n )\n }\n\n if (!hasImage) {\n return (\n <div className=\"my-6\">\n <a href={effectiveData.url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"flex items-center gap-3 border border-ods-border rounded-lg overflow-hidden bg-ods-card hover:border-ods-accent transition-all duration-200 group px-4 py-3\">\n <div className=\"w-10 h-10 bg-ods-bg-secondary rounded-lg flex items-center justify-center flex-shrink-0\">\n <Favicon src={faviconSrc} />\n </div>\n <div className=\"flex-1 min-w-0\">\n <h3 className=\"font-sans font-semibold text-ods-text-primary text-base group-hover:text-ods-accent transition-colors truncate\">{title}</h3>\n {description && (\n <p className=\"font-sans text-sm text-ods-text-secondary truncate\">{description}</p>\n )}\n </div>\n <ExternalLinkIcon />\n </a>\n </div>\n )\n }\n\n return (\n <div className=\"my-6\">\n <a href={effectiveData.url} target=\"_blank\" rel=\"noopener noreferrer\"\n className=\"block border border-ods-border rounded-lg overflow-hidden bg-ods-card hover:border-ods-accent transition-colors group\">\n <div className=\"aspect-video w-full overflow-hidden relative flex items-center justify-center rounded-lg transition-colors duration-300\" style={{ backgroundColor: bgColor }}>\n {renderImage()}\n </div>\n <div className=\"p-4\">\n <div className=\"flex items-start gap-3\">\n <img src={logoSrc} alt={publicationName || ''} className=\"w-6 h-6 rounded object-contain flex-shrink-0 mt-0.5\"\n onError={(e) => { (e.target as HTMLImageElement).style.display = 'none' }} />\n <div className=\"flex-1 min-w-0\">\n <h3 className=\"font-sans font-semibold text-ods-text-primary text-base overflow-hidden group-hover:text-ods-accent transition-colors h-[2.5rem] leading-[1.25rem] mb-2\"\n style={{ display: '-webkit-box', WebkitLineClamp: 2, WebkitBoxOrient: 'vertical' }}>{title}</h3>\n {description && (\n <p className=\"font-sans text-sm text-ods-text-secondary overflow-hidden h-[2.5rem] leading-[1.25rem] mb-2\"\n style={{ display: '-webkit-box', WebkitLineClamp: 2, WebkitBoxOrient: 'vertical' }}>{description}</p>\n )}\n <div className=\"flex items-center gap-2 text-xs text-ods-text-secondary\">\n <span className=\"font-medium\">{effectiveData.siteName}</span>\n <span>•</span>\n <span className=\"truncate\">{ogDomain}</span>\n </div>\n </div>\n </div>\n </div>\n </a>\n </div>\n )\n}\n"]}
@@ -34809,15 +34809,14 @@ function useRealtimeChunkProcessor(options) {
34809
34809
  break;
34810
34810
  }
34811
34811
  case "system": {
34812
- callbacks.onSystemMessage?.(action.text, { streamSeq });
34812
+ callbacks.onSystemMessage?.(action.text);
34813
34813
  break;
34814
34814
  }
34815
34815
  case "direct_message": {
34816
34816
  callbacks.onDirectMessage?.(action.text, {
34817
34817
  ownerType: action.ownerType,
34818
34818
  displayName: action.displayName,
34819
- userId: action.userId,
34820
- streamSeq
34819
+ userId: action.userId
34821
34820
  });
34822
34821
  break;
34823
34822
  }
@@ -34825,8 +34824,7 @@ function useRealtimeChunkProcessor(options) {
34825
34824
  callbacks.onUserMessage?.(action.text, {
34826
34825
  ownerType: action.ownerType,
34827
34826
  displayName: action.displayName,
34828
- userId: action.userId,
34829
- streamSeq
34827
+ userId: action.userId
34830
34828
  });
34831
34829
  break;
34832
34830
  case "token_usage":
@@ -37491,7 +37489,7 @@ function extractIncompleteMessageState(lastMessage) {
37491
37489
  }
37492
37490
 
37493
37491
  // src/components/chat/utils/history-merge.ts
37494
- var SYNTHETIC_REALTIME_ID_PREFIXES = ["assistant-", "user-", "direct-", "system-", "error-"];
37492
+ var SYNTHETIC_REALTIME_ID_PREFIXES = ["assistant-", "user-", "error-"];
37495
37493
  function isSyntheticRealtimeId(id) {
37496
37494
  return SYNTHETIC_REALTIME_ID_PREFIXES.some((prefix) => id.startsWith(prefix));
37497
37495
  }
@@ -39436,4 +39434,4 @@ export {
39436
39434
  LogsList,
39437
39435
  assets
39438
39436
  };
39439
- //# sourceMappingURL=chunk-P2SO7ADJ.js.map
39437
+ //# sourceMappingURL=chunk-EFYXPR43.js.map