@flamingo-stack/openframe-frontend-core 0.0.291 → 0.0.292-snapshot.20260619040151
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.
- package/dist/{chunk-ODR6A6FC.js → chunk-26PKDALD.js} +7 -67
- package/dist/chunk-26PKDALD.js.map +1 -0
- package/dist/{chunk-EGSAB76W.js → chunk-2U2M2TG2.js} +4 -4
- package/dist/{chunk-EI4WALN2.cjs → chunk-4W7NYJ3B.cjs} +39 -29
- package/dist/chunk-4W7NYJ3B.cjs.map +1 -0
- package/dist/{chunk-KBKZYJRI.cjs → chunk-5E2HOSSH.cjs} +66 -19
- package/dist/chunk-5E2HOSSH.cjs.map +1 -0
- package/dist/{chunk-6BWZFRUG.cjs → chunk-6G2INVGG.cjs} +24 -22
- package/dist/chunk-6G2INVGG.cjs.map +1 -0
- package/dist/{chunk-7NM7DEUK.js → chunk-6GCI7JOE.js} +2 -2
- package/dist/{chunk-N6ZM5PYZ.js → chunk-7RIYT7ZH.js} +49 -2
- package/dist/chunk-7RIYT7ZH.js.map +1 -0
- package/dist/{chunk-AGRSALEN.js → chunk-BRNHX6C6.js} +15 -13
- package/dist/chunk-BRNHX6C6.js.map +1 -0
- package/dist/{chunk-Z2EOXZBW.js → chunk-DOMJSNXW.js} +262 -162
- package/dist/chunk-DOMJSNXW.js.map +1 -0
- package/dist/{chunk-7EYWERFT.js → chunk-E4XABBSU.js} +16 -8
- package/dist/{chunk-7EYWERFT.js.map → chunk-E4XABBSU.js.map} +1 -1
- package/dist/{chunk-ZLN6SM2U.js → chunk-EJXHZX2E.js} +3 -3
- package/dist/{chunk-3SDBXXDP.cjs → chunk-EYEW6PTA.cjs} +44 -36
- package/dist/chunk-EYEW6PTA.cjs.map +1 -0
- package/dist/{chunk-D4R2MUPA.js → chunk-FJDPUPXC.js} +5 -5
- package/dist/{chunk-VRSXJ5QJ.js → chunk-FQJK446R.js} +10 -3
- package/dist/chunk-FQJK446R.js.map +1 -0
- package/dist/{chunk-I6ZPGKZ2.cjs → chunk-FT4FCV7L.cjs} +6 -6
- package/dist/{chunk-I6ZPGKZ2.cjs.map → chunk-FT4FCV7L.cjs.map} +1 -1
- package/dist/{chunk-Y4JNA4W6.cjs → chunk-J54Z3OCR.cjs} +10 -3
- package/dist/chunk-J54Z3OCR.cjs.map +1 -0
- package/dist/{chunk-ZYBUFVQV.cjs → chunk-JSOMFVEV.cjs} +30 -30
- package/dist/{chunk-ZYBUFVQV.cjs.map → chunk-JSOMFVEV.cjs.map} +1 -1
- package/dist/{chunk-D6RK5YXX.cjs → chunk-KXCRGTRN.cjs} +10 -70
- package/dist/chunk-KXCRGTRN.cjs.map +1 -0
- package/dist/{chunk-5KD3S25X.cjs → chunk-LFGGF7OT.cjs} +139 -2
- package/dist/chunk-LFGGF7OT.cjs.map +1 -0
- package/dist/{chunk-R2KT5GDD.js → chunk-NSPOYUBH.js} +14 -4
- package/dist/chunk-NSPOYUBH.js.map +1 -0
- package/dist/{chunk-TYZEMPPH.js → chunk-OQ6X7ZOC.js} +138 -1
- package/dist/chunk-OQ6X7ZOC.js.map +1 -0
- package/dist/{chunk-2YSC3API.cjs → chunk-RJL6PIOK.cjs} +1091 -991
- package/dist/chunk-RJL6PIOK.cjs.map +1 -0
- package/dist/{chunk-CSL3ECOF.js → chunk-SOJCR63T.js} +4 -4
- package/dist/{chunk-BVNYQDZE.cjs → chunk-TYMUKFP2.cjs} +40 -40
- package/dist/{chunk-BVNYQDZE.cjs.map → chunk-TYMUKFP2.cjs.map} +1 -1
- package/dist/{chunk-VMRPM24G.cjs → chunk-VTY7S2QG.cjs} +25 -19
- package/dist/chunk-VTY7S2QG.cjs.map +1 -0
- package/dist/{chunk-Z4GAFSNM.cjs → chunk-X3TSMCKX.cjs} +12 -12
- package/dist/{chunk-Z4GAFSNM.cjs.map → chunk-X3TSMCKX.cjs.map} +1 -1
- package/dist/{chunk-RSIFEDZX.js → chunk-YICTMMXP.js} +13 -7
- package/dist/{chunk-RSIFEDZX.js.map → chunk-YICTMMXP.js.map} +1 -1
- package/dist/{chunk-EL5GCMPU.cjs → chunk-YIGPRLQY.cjs} +9 -9
- package/dist/{chunk-EL5GCMPU.cjs.map → chunk-YIGPRLQY.cjs.map} +1 -1
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.d.ts +15 -0
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/roadmap-card.d.ts +7 -1
- package/dist/components/chat/entity-cards/roadmap-card.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-realtime-chunk-processor.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +9 -7
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +8 -6
- package/dist/components/chat/remark-mention-chips.d.ts +30 -0
- package/dist/components/chat/remark-mention-chips.d.ts.map +1 -0
- package/dist/components/chat/types/api.types.d.ts +4 -0
- package/dist/components/chat/types/api.types.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +24 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/context-item.types.d.ts +5 -0
- package/dist/components/chat/types/context-item.types.d.ts.map +1 -1
- package/dist/components/chat/types/processing.types.d.ts +4 -0
- package/dist/components/chat/types/processing.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chunk-parser.d.ts.map +1 -1
- package/dist/components/chat/utils/nav-anchor-props.d.ts +8 -3
- package/dist/components/chat/utils/nav-anchor-props.d.ts.map +1 -1
- package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +8 -8
- package/dist/components/contact/index.js +7 -7
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/docs/use-document-tree.d.ts.map +1 -1
- package/dist/components/embeds/index.cjs +8 -8
- package/dist/components/embeds/index.js +7 -7
- package/dist/components/faq/faq-section.d.ts.map +1 -1
- package/dist/components/faq/index.cjs +8 -8
- package/dist/components/faq/index.js +7 -7
- package/dist/components/features/index.cjs +7 -7
- package/dist/components/features/index.js +6 -6
- package/dist/components/index.cjs +216 -193
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +52 -29
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/navigation/index.js +6 -6
- package/dist/components/onboarding-guides/index.cjs +24 -24
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +8 -8
- package/dist/components/related-content/index.js +7 -7
- package/dist/components/shared/delivery/delivery-lists.d.ts.map +1 -1
- package/dist/components/shared/delivery/delivery-row.d.ts +8 -1
- package/dist/components/shared/delivery/delivery-row.d.ts.map +1 -1
- package/dist/components/shared/delivery/delivery-table.d.ts.map +1 -1
- package/dist/components/shared/roadmap/roadmap-grid.d.ts.map +1 -1
- package/dist/components/shared/roadmap/roadmap-view.d.ts.map +1 -1
- package/dist/components/tickets/help-center-card.d.ts +7 -1
- package/dist/components/tickets/help-center-card.d.ts.map +1 -1
- package/dist/components/tickets/help-center-list.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +82 -73
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +24 -15
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/tickets/ticket-center.d.ts.map +1 -1
- package/dist/components/tickets/ticket-row.d.ts +6 -1
- package/dist/components/tickets/ticket-row.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +9 -7
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +8 -6
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/components/ui/tag.d.ts +10 -1
- package/dist/components/ui/tag.d.ts.map +1 -1
- package/dist/hooks/index.cjs +5 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/use-scroll-to-hash.d.ts +17 -0
- package/dist/hooks/use-scroll-to-hash.d.ts.map +1 -0
- package/dist/index.cjs +21 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -7
- package/dist/utils/dev-sections/dev-section-param-keys.d.ts +10 -0
- package/dist/utils/dev-sections/dev-section-param-keys.d.ts.map +1 -1
- package/dist/utils/index.cjs +92 -10
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +88 -11
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/same-page-hash-nav.d.ts +37 -0
- package/dist/utils/same-page-hash-nav.d.ts.map +1 -0
- package/dist/utils/scroll-into-view.d.ts +12 -0
- package/dist/utils/scroll-into-view.d.ts.map +1 -1
- package/dist/utils/source-icons.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-message-enhanced.tsx +71 -9
- package/src/components/chat/chat-message-list.tsx +2 -0
- package/src/components/chat/embeddable-chat.tsx +50 -6
- package/src/components/chat/entity-cards/roadmap-card.tsx +8 -1
- package/src/components/chat/hooks/use-realtime-chunk-processor.ts +1 -0
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/remark-mention-chips.ts +72 -0
- package/src/components/chat/types/api.types.ts +1 -1
- package/src/components/chat/types/component.types.ts +18 -0
- package/src/components/chat/types/context-item.types.ts +5 -0
- package/src/components/chat/types/processing.types.ts +8 -1
- package/src/components/chat/utils/chunk-parser.ts +11 -0
- package/src/components/chat/utils/nav-anchor-props.ts +22 -4
- package/src/components/chat/utils/process-historical-messages.ts +22 -0
- package/src/components/docs/use-document-tree.ts +45 -3
- package/src/components/faq/faq-section.tsx +22 -9
- package/src/components/shared/delivery/delivery-lists.tsx +9 -0
- package/src/components/shared/delivery/delivery-row.tsx +15 -2
- package/src/components/shared/delivery/delivery-table.tsx +7 -1
- package/src/components/shared/roadmap/roadmap-grid.tsx +7 -0
- package/src/components/shared/roadmap/roadmap-view.tsx +11 -0
- package/src/components/tickets/help-center-card.tsx +9 -17
- package/src/components/tickets/help-center-list.tsx +13 -0
- package/src/components/tickets/ticket-center.tsx +2 -0
- package/src/components/tickets/ticket-row.tsx +7 -1
- package/src/components/ui/simple-markdown-renderer.tsx +14 -11
- package/src/components/ui/tag.tsx +12 -2
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-scroll-to-hash.ts +74 -0
- package/src/utils/.source-icons.md +1 -1
- package/src/utils/dev-sections/dev-section-param-keys.ts +14 -0
- package/src/utils/index.ts +17 -1
- package/src/utils/same-page-hash-nav.ts +115 -0
- package/src/utils/scroll-into-view.ts +51 -9
- package/src/utils/source-icons.ts +7 -1
- package/dist/chunk-2YSC3API.cjs.map +0 -1
- package/dist/chunk-3SDBXXDP.cjs.map +0 -1
- package/dist/chunk-5KD3S25X.cjs.map +0 -1
- package/dist/chunk-6BWZFRUG.cjs.map +0 -1
- package/dist/chunk-AGRSALEN.js.map +0 -1
- package/dist/chunk-D6RK5YXX.cjs.map +0 -1
- package/dist/chunk-EI4WALN2.cjs.map +0 -1
- package/dist/chunk-KBKZYJRI.cjs.map +0 -1
- package/dist/chunk-N6ZM5PYZ.js.map +0 -1
- package/dist/chunk-ODR6A6FC.js.map +0 -1
- package/dist/chunk-R2KT5GDD.js.map +0 -1
- package/dist/chunk-TYZEMPPH.js.map +0 -1
- package/dist/chunk-VMRPM24G.cjs.map +0 -1
- package/dist/chunk-VRSXJ5QJ.js.map +0 -1
- package/dist/chunk-Y4JNA4W6.cjs.map +0 -1
- package/dist/chunk-Z2EOXZBW.js.map +0 -1
- /package/dist/{chunk-EGSAB76W.js.map → chunk-2U2M2TG2.js.map} +0 -0
- /package/dist/{chunk-7NM7DEUK.js.map → chunk-6GCI7JOE.js.map} +0 -0
- /package/dist/{chunk-ZLN6SM2U.js.map → chunk-EJXHZX2E.js.map} +0 -0
- /package/dist/{chunk-D4R2MUPA.js.map → chunk-FJDPUPXC.js.map} +0 -0
- /package/dist/{chunk-CSL3ECOF.js.map → chunk-SOJCR63T.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-3SDBXXDP.cjs","../src/components/docs/doc-viewer.tsx","../src/components/persistent-filter-controls.tsx","../src/components/loading/page-layout-skeleton.tsx","../src/components/loading/unified-skeleton.tsx","../src/components/loading/card-skeleton.tsx","../src/components/docs/use-document-tree.ts","../src/components/docs/doc-navigation-context.tsx","../src/components/docs/use-scroll-spy.ts"],"names":["jsx","jsxs","Fragment","useRef","useCallback","pathParts","currentPath","useState","useMemo"],"mappings":"AAAA,6xBAAY;AACZ;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACrBA,4EAA+B;ADuB/B;AACA;AEvBA,uCAAA,CAAA;AA4DI,+CAAA;AATG,SAAS,wBAAA,CAAyB;AAAA,EACvC,SAAA;AAAA,EACA,QAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAA,EAAkB,GAAA;AAAA,EAClB,mBAAA,EAAqB,GAAA;AAAA,EACrB,mBAAA,EAAqB;AACvB,CAAA,EAAkC;AAChC,EAAA,uBACE,8BAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,kCAAA;AAAA,QACT,qCAAA;AAAA,QACA,UAAA,GAAa,mBAAA,GAAsB,qBAAA;AAAA,QACnC;AAAA,MACF,CAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACL,OAAA,EAAS,UAAA,EAAY,gBAAA,EAAkB,CAAA;AAAA,QACvC,kBAAA,EAAoB,CAAA,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AA;AACA,sBAAA;AAAY,oBAAA;AACd,kBAAA;AAEJ,gBAAA;AAAA,cAAA;AAAA,YAAA;AAGR,UAAA;AACF,QAAA;AAEJ,MAAA;AAAA,IAAA;AAEJ,EAAA;AAEJ;ADksC6B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-3SDBXXDP.cjs","sourcesContent":[null,"\"use client\"\n\nimport React, { useMemo } from \"react\"\nimport { MultiLevelNavigation, MobileNavigationDropdown } from \"../navigation/multi-level-navigation\"\nimport { PageHeading } from \"../layout/page-heading\"\nimport { PersistentSidebar, PersistentMobileDropdown } from \"../persistent-filter-controls\"\nimport { CategorySidebarSkeleton } from \"../loading/page-layout-skeleton\"\nimport { DocSearchBar, useDocSearch } from \"../shared/doc-search\"\nimport { StickySectionNav } from \"../navigation/sticky-section-nav\"\nimport { useDocumentTree } from \"./use-document-tree\"\nimport { useScrollSpy } from \"./use-scroll-spy\"\nimport { useDocNavigation } from \"./doc-navigation-context\"\nimport { findDocNodeByPath } from \"../../utils/doc-tree-nav\"\nimport type { DocContent, DocNode, DocRenderHandlers, DocSourceId } from \"../../types/doc-source\"\n\n/** Color tokens for the doc-viewer chrome. Hub-side `DocViewer` callers share\n * this constant; no need to override per source — the palette is intentionally\n * uniform across knowledge-base + data-room (both use ODS dark tokens). */\nexport const DEFAULT_DOC_VIEWER_PALETTE = {\n background: \"bg-ods-bg\",\n containerBackground: \"transparent\",\n headerText: \"text-ods-text-primary\",\n primaryText: \"text-ods-text-primary\",\n secondaryText: \"text-ods-text-secondary\",\n accent: \"var(--ods-accent)\",\n border: \"border-ods-border\",\n cardBackground: \"bg-ods-card\",\n} as const\n\nexport interface DocViewerProps {\n /**\n * Registry source id (`'openframe-docs'`, `'data-room-docs'`, …). Flowed through\n * `renderContent`'s handlers for `/api/resolve-link` POSTs.\n */\n sourceId: DocSourceId\n\n /**\n * Render the content body. The page shell owns this — it picks the markdown\n * renderer, dispatches PDF/Figma/Sheets/file branches, etc. No renderer\n * interface in between.\n */\n renderContent: (content: DocContent, handlers: DocRenderHandlers) => React.ReactNode\n\n /**\n * Render the loading skeleton. Receives the selected node's `documentType`\n * (undefined while structure is still loading) so the caller can return a\n * markdown-shaped skeleton vs an embed-shaped skeleton.\n */\n renderSkeleton: (documentType: DocNode['documentType']) => React.ReactNode\n\n /**\n * Chat-source identifier — passed in by the page shell from server-side\n * `currentPlatform()`. Lib has no platform context; the page shell is the\n * trusted boundary that wires this. NEVER pass user input here.\n */\n chatSource: string\n\n title: string | React.ReactNode\n /** Override the default ODS palette. Optional — most callers should omit. */\n colorPalette?: typeof DEFAULT_DOC_VIEWER_PALETTE\n className?: string\n\n /** Initial doc path (URL `[...path]`). */\n docPath?: string\n\n /** Sidebar header copy (`'DOCUMENTATION'`, `'DATA ROOM'`). */\n sidebarLabel?: string\n\n /**\n * API endpoint for fetching the document tree structure. Defaults to the\n * dispatcher path `/api/docs/sources/${sourceId}/structure`. Override only\n * if hosting the viewer behind a different route.\n */\n structureEndpoint?: string\n /** Same shape as `structureEndpoint`. Defaults to `/api/docs/sources/${sourceId}/content`. */\n contentEndpoint?: string\n /** Base route path for URL navigation. */\n baseRoute: string\n\n /** Empty state copy when no doc is selected. */\n emptyStateText?: string\n\n /** Whether to render the doc-search bar (bound to chat). */\n showAIChat?: boolean\n\n /** Folder-index filename (default `'README.md'`). */\n folderIndexFile?: string\n}\n\nexport function DocViewer(props: DocViewerProps) {\n return <DocViewerContent {...props} />\n}\n\nfunction DocViewerContent({\n sourceId,\n renderContent,\n renderSkeleton,\n chatSource,\n title,\n colorPalette = DEFAULT_DOC_VIEWER_PALETTE,\n className = \"\",\n docPath,\n sidebarLabel = \"DOCUMENTATION\",\n structureEndpoint,\n contentEndpoint,\n baseRoute,\n emptyStateText,\n showAIChat = false,\n folderIndexFile,\n}: DocViewerProps) {\n // Default endpoints derived from sourceId. Hub callers omit the props in 99%\n // of cases; the override is for embed contexts where the doc-viewer sits\n // behind a non-standard route.\n const resolvedStructureEndpoint =\n structureEndpoint ?? `/api/docs/sources/${sourceId}/structure`\n const resolvedContentEndpoint =\n contentEndpoint ?? `/api/docs/sources/${sourceId}/content`\n const {\n structure,\n selectedPath,\n content,\n isLoadingStructure,\n isLoadingContent,\n error,\n expandedNodes,\n selectNode,\n toggleNode,\n navigateToDoc,\n } = useDocumentTree(\n {\n structureEndpoint: resolvedStructureEndpoint,\n contentEndpoint: resolvedContentEndpoint,\n baseRoute,\n folderIndexFile,\n },\n docPath,\n )\n\n const { activeSection, handleSectionClick } = useScrollSpy(content?.sections)\n\n const docNav = useDocNavigation()\n const docSearch = useDocSearch({\n source: chatSource,\n baseRoute,\n onNavigate: (path) => navigateToDoc(path, { fromInternalLink: true }),\n onInPageSwap: (path) => docNav.navigate(path),\n })\n\n const renderedContent = useMemo(() => {\n if (!content) return null\n return renderContent(content, {\n onInternalLinkClick: navigateToDoc,\n currentPath: selectedPath,\n sourceId,\n })\n }, [content, selectedPath, renderContent, navigateToDoc, sourceId])\n\n // Selected node's documentType drives:\n // - which skeleton the caller renders during fetch (markdown vs embed)\n // - the article max-width + sticky-nav visibility (markdown only)\n // `undefined` documentType is treated as `'markdown'` (per the DocNode\n // discriminator's documented default).\n const selectedNodeDocType =\n selectedPath && structure.length > 0\n ? findDocNodeByPath(selectedPath, structure)?.documentType\n : undefined\n // During loading, the in-flight content's type isn't known yet — fall back\n // to the selected node's type (or markdown if neither is set).\n const activeDocType = content?.documentType ?? selectedNodeDocType\n const isMarkdownContent = !activeDocType || activeDocType === 'markdown'\n const showStickyNav = isMarkdownContent\n\n const stickyNavSections =\n content?.sections?.map((s) => ({ id: s.id, label: s.title })) ?? []\n\n const isColorValue =\n colorPalette.background.startsWith('#') ||\n colorPalette.background.startsWith('rgb') ||\n colorPalette.background.startsWith('var(')\n\n const bgStyle = isColorValue ? { backgroundColor: colorPalette.background } : {}\n const bgClass = !isColorValue ? colorPalette.background : ''\n const containerBgStyle =\n colorPalette.containerBackground !== 'transparent'\n ? { backgroundColor: colorPalette.containerBackground }\n : {}\n\n const defaultEmptyText =\n structure.length > 0\n ? 'Select a document from the sidebar to view'\n : 'No documents yet. Add content from the admin panel.'\n const resolvedEmptyText = emptyStateText || defaultEmptyText\n\n return (\n <section className={`${bgClass} ${className}`} style={bgStyle}>\n <div\n className=\"max-w-[1920px] px-6 md:px-20 py-6 md:py-10 mx-auto\"\n style={containerBgStyle}\n >\n <div className=\"flex flex-col gap-6\">\n <div className=\"flex flex-col gap-4\">\n {typeof title === 'string' ? <PageHeading>{title}</PageHeading> : title}\n </div>\n\n {showAIChat && (\n <DocSearchBar\n placeholder={`Search ${sidebarLabel?.toLowerCase() || 'documents'}...`}\n query={docSearch.query}\n onQueryChange={docSearch.setQuery}\n results={docSearch.results}\n isLoading={docSearch.isLoading}\n onResultSelect={docSearch.handleResultSelect}\n showDropdown={docSearch.keepDropdownOpen}\n />\n )}\n\n {error && (\n <div className=\"flex justify-center\">\n <div className=\"rounded-lg border bg-ods-card p-8 text-center max-w-md border-ods-border\">\n <h2 className=\"text-xl font-semibold text-ods-text-primary\">\n Error Loading Documents\n </h2>\n <p className=\"mt-2 text-ods-text-secondary\">{error}. Please try again later.</p>\n </div>\n </div>\n )}\n\n {!error && (\n <div className=\"flex flex-col lg:flex-row gap-6 lg:gap-10 items-start flex-1\">\n <div className=\"w-full lg:w-[320px] lg:shrink-0\">\n <div className=\"lg:sticky lg:top-20\">\n {isLoadingStructure ? (\n <CategorySidebarSkeleton />\n ) : (\n <>\n <PersistentMobileDropdown isLoading={false}>\n <MobileNavigationDropdown\n nodes={structure}\n selectedPath={selectedPath}\n expandedNodes={expandedNodes}\n onNodeClick={selectNode}\n onToggleExpand={toggleNode}\n isLoading={false}\n folderIndexFile={folderIndexFile}\n />\n </PersistentMobileDropdown>\n\n <PersistentSidebar isLoading={false}>\n <div className=\"hidden lg:block\">\n <div className=\"space-y-4\">\n <h3 className=\"text-[14px] font-['Azeret_Mono'] font-semibold uppercase text-ods-text-secondary tracking-[-0.02em] leading-[1.43em]\">\n {sidebarLabel}\n </h3>\n <MultiLevelNavigation\n nodes={structure}\n selectedPath={selectedPath}\n expandedNodes={expandedNodes}\n onNodeClick={selectNode}\n onToggleExpand={toggleNode}\n isLoading={false}\n folderIndexFile={folderIndexFile}\n />\n </div>\n </div>\n </PersistentSidebar>\n </>\n )}\n </div>\n </div>\n\n <div className=\"flex-1 min-w-0 w-full\">\n <div\n className={`grid grid-cols-1 ${\n (showStickyNav && stickyNavSections.length > 0) ||\n isLoadingContent ||\n isLoadingStructure\n ? 'lg:grid-cols-[1fr_280px]'\n : ''\n } gap-8`}\n >\n <div className={`w-full ${isMarkdownContent ? 'max-w-4xl mx-auto' : ''}`}>\n <article className=\"space-y-2\">\n {(isLoadingContent || isLoadingStructure) ? (\n renderSkeleton(selectedNodeDocType)\n ) : !content ? (\n <div className=\"text-center py-16\">\n <p className=\"text-xl text-ods-text-secondary\">{resolvedEmptyText}</p>\n </div>\n ) : (\n renderedContent\n )}\n </article>\n </div>\n\n {(isLoadingContent || isLoadingStructure) && (\n <div className=\"hidden lg:block\">\n <div className=\"sticky top-24\">\n <div className=\"h-[14px] w-28 bg-ods-border rounded animate-pulse mb-5\" />\n <div className=\"space-y-0\">\n {[130, 170, 190, 220, 110, 200, 80, 100, 120, 140, 90].map((w, i) => (\n <div\n key={i}\n className={`py-[13px] pl-3 border-l-2 ${\n i === 0 ? 'border-ods-accent' : 'border-transparent'\n }`}\n >\n <div\n className=\"h-[13px] bg-ods-border rounded animate-pulse\"\n style={{ width: w }}\n />\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n\n {showStickyNav &&\n content &&\n stickyNavSections.length > 0 &&\n !isLoadingContent && (\n <div className=\"hidden lg:block\">\n <div className=\"sticky top-24\">\n <h3 className=\"text-[14px] font-['Azeret_Mono'] font-semibold uppercase text-ods-text-secondary tracking-[-0.02em] leading-[1.43em] mb-4\">\n ON THIS PAGE\n </h3>\n <StickySectionNav\n sections={stickyNavSections}\n activeSection={activeSection}\n onSectionClick={handleSectionClick}\n ribbonPosition=\"left\"\n ribbonColor=\"var(--ods-accent)\"\n />\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n )}\n </div>\n </div>\n </section>\n )\n}\n","\"use client\"\n\nimport { ReactNode } from \"react\"\nimport { cn } from \"../utils/cn\"\n\ninterface PersistentFilterControlsProps {\n /**\n * Whether the filters are currently in a loading state\n */\n isLoading: boolean\n /**\n * The filter control components (search, sidebar, mobile dropdown)\n */\n children: ReactNode\n /**\n * Additional CSS classes\n */\n className?: string\n /**\n * Disabled opacity (0-1)\n */\n disabledOpacity?: number\n /**\n * Transition duration in milliseconds\n */\n transitionDuration?: number\n /**\n * Whether to prevent pointer events during loading\n */\n preventInteraction?: boolean\n}\n\n/**\n * PersistentFilterControls\n * \n * A wrapper component that keeps filter controls visible during loading states\n * but provides visual feedback that they are temporarily disabled.\n * \n * Features:\n * - Reduces opacity and disables pointer events during loading\n * - Maintains layout and accessibility during loading states\n * - Provides smooth transitions between enabled/disabled states\n * - Preserves keyboard navigation and screen reader functionality\n * - Applies consistent disabled styling across all filter types\n * \n * Usage:\n * ```tsx\n * <PersistentFilterControls isLoading={isLoadingVendors}>\n * <SearchContainer />\n * <CategoryFilterSidebar />\n * <MobileDropdown />\n * </PersistentFilterControls>\n * ```\n */\nexport function PersistentFilterControls({\n isLoading,\n children,\n className,\n disabledOpacity = 0.6,\n transitionDuration = 300,\n preventInteraction = true,\n}: PersistentFilterControlsProps) {\n return (\n <div \n className={cn(\n \"relative transition-all ease-in-out\",\n isLoading && preventInteraction && \"pointer-events-none\",\n className\n )}\n style={{\n opacity: isLoading ? disabledOpacity : 1,\n transitionDuration: `${transitionDuration}ms`\n }}\n role=\"region\"\n aria-label=\"Filter controls\"\n aria-busy={isLoading}\n data-loading={isLoading}\n >\n {/* Loading indicator overlay for screen readers */}\n {isLoading && (\n <div \n className=\"sr-only\" \n role=\"status\" \n aria-live=\"polite\"\n >\n Filters temporarily disabled while loading content\n </div>\n )}\n\n {/* Filter controls with disabled state styling */}\n <div \n className={cn(\n \"transition-all ease-in-out\",\n isLoading && \"cursor-not-allowed\"\n )}\n style={{\n transitionDuration: `${transitionDuration}ms`\n }}\n >\n {children}\n </div>\n\n {/* Visual loading indicator */}\n {isLoading && (\n <div \n className=\"absolute top-2 right-2 z-10\"\n role=\"status\"\n aria-label=\"Loading filters\"\n >\n <div className=\"w-4 h-4 border-2 border-ods-border border-t-[#FFC008] rounded-full animate-spin\" />\n </div>\n )}\n </div>\n )\n}\n\n/**\n * Enhanced SearchContainer wrapper that integrates with persistent loading\n */\ninterface PersistentSearchContainerProps {\n isLoading: boolean\n children: ReactNode\n className?: string\n}\n\nexport function PersistentSearchContainer({\n isLoading,\n children,\n className\n}: PersistentSearchContainerProps) {\n return (\n <PersistentFilterControls \n isLoading={isLoading}\n preventInteraction={false} // Keep search interactive during loading\n className={className}\n >\n {children}\n </PersistentFilterControls>\n )\n}\n\n/**\n * Enhanced sidebar wrapper for desktop filter controls\n */\ninterface PersistentSidebarProps {\n isLoading: boolean\n children: ReactNode\n className?: string\n}\n\nexport function PersistentSidebar({\n isLoading,\n children,\n className\n}: PersistentSidebarProps) {\n return (\n <PersistentFilterControls \n isLoading={isLoading}\n disabledOpacity={0.5}\n className={cn(\"lg:sticky lg:top-20\", className)}\n >\n {children}\n </PersistentFilterControls>\n )\n}\n\n/**\n * Enhanced mobile dropdown wrapper\n */\ninterface PersistentMobileDropdownProps {\n isLoading: boolean\n children: ReactNode\n className?: string\n}\n\nexport function PersistentMobileDropdown({\n isLoading,\n children,\n className\n}: PersistentMobileDropdownProps) {\n return (\n <PersistentFilterControls \n isLoading={isLoading}\n disabledOpacity={0.7}\n className={cn(\"lg:hidden\", className)}\n >\n {children}\n </PersistentFilterControls>\n )\n} ","import type React from \"react\"\nimport { cn } from \"../../utils/cn\"\nimport { UnifiedSkeleton, TextSkeleton, MediaSkeleton, InteractiveSkeleton } from \"./unified-skeleton\"\nimport { CardSkeletonGrid } from \"./card-skeleton\"\n\ninterface PageLayoutSkeletonProps {\n className?: string\n}\n\n/**\n * Announcement bar skeleton that matches the AnnouncementBar component\n */\nexport function AnnouncementBarSkeleton() {\n return (\n <div className=\"bg-[#2A2A2A] relative w-full animate-pulse\">\n <div className=\"flex flex-row items-center relative w-full\">\n <div className=\"box-border flex flex-row gap-4 md:gap-6 items-center justify-start pl-4 md:pl-6 pr-12 md:pr-16 py-3 md:py-4 relative w-full\">\n {/* Logo skeleton */}\n <div className=\"relative shrink-0 w-6 h-6 md:w-8 md:h-8 bg-ods-border rounded\"></div>\n \n {/* Text content skeleton */}\n <div className=\"flex-1 min-w-0 space-y-1 md:space-y-2\">\n <div className=\"h-[14px] md:h-[18px] bg-ods-border rounded w-3/4 max-w-md\"></div>\n <div className=\"h-[12px] md:h-[18px] bg-ods-border rounded w-full max-w-lg hidden md:block\"></div>\n </div>\n \n {/* Close button skeleton */}\n <div className=\"absolute right-2 top-2 w-6 h-6 bg-ods-border rounded\"></div>\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * Header skeleton that matches the ClientOnlyHeader placeholder but with proper animations\n */\nexport function HeaderSkeleton() {\n return (\n <header className=\"sticky top-0 z-40 w-full flex items-center justify-between border-b border-ods-border bg-ods-card backdrop-blur-sm bg-ods-card/95 px-4 md:px-[80px] py-3 md:py-[12px] animate-pulse\">\n {/* Left: Logo skeleton */}\n <div className=\"flex items-center justify-start flex-1 min-w-0\">\n <div className=\"w-[110px] h-[26px] md:w-[137px] md:h-8 bg-[#2A2A2A] rounded\"></div>\n </div>\n\n {/* Center: Navigation skeleton - hidden on mobile, visible on desktop */}\n <nav className=\"hidden md:flex flex-1 basis-1/3 justify-center items-center gap-2 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <InteractiveSkeleton.Button className=\"w-24 h-10\" />\n <InteractiveSkeleton.Button className=\"w-24 h-10\" />\n <InteractiveSkeleton.Button className=\"w-24 h-10\" />\n </div>\n </nav>\n\n {/* Right: Actions skeleton */}\n <div className=\"flex items-center justify-end gap-4 flex-1 min-w-0\">\n {/* Mobile: Show hamburger skeleton */}\n <div className=\"md:hidden\">\n <InteractiveSkeleton.Button className=\"h-10 w-10\" />\n </div>\n \n {/* Desktop: Show action buttons skeletons */}\n <div className=\"hidden md:flex items-center gap-4\">\n <InteractiveSkeleton.Button className=\"w-10 h-10\" />\n <InteractiveSkeleton.Button className=\"w-32 h-10\" />\n <InteractiveSkeleton.Button className=\"w-20 h-10\" />\n </div>\n </div>\n </header>\n )\n}\n\n/**\n * Hero section skeleton for static content areas\n */\nexport function HeroSkeleton() {\n return (\n <section\n className=\"w-full flex flex-col items-center justify-center py-12 px-4 md:py-20 md:px-8 text-center animate-pulse\"\n style={{\n background: 'radial-gradient(circle at 50% 0%, #242323 0%, #1A1A1A 100%)'\n }}\n >\n {/* Title skeleton */}\n <TextSkeleton.Heading className=\"h-12 md:h-20 lg:h-24 mb-4 md:mb-6 max-w-4xl w-full\" />\n \n {/* Subtitle skeleton */}\n <div className=\"space-y-3 mb-8 md:mb-10 max-w-4xl w-full px-2\">\n <TextSkeleton.Body className=\"h-5 md:h-7\" />\n <TextSkeleton.Body className=\"h-5 md:h-7 w-3/4 mx-auto\" />\n </div>\n \n {/* CTA Button skeleton */}\n <InteractiveSkeleton.Button className=\"w-full md:w-64 h-12\" />\n </section>\n )\n}\n\n/**\n * Search container skeleton with filters\n */\nexport function SearchContainerSkeleton({ \n className,\n showFilters = true \n}: PageLayoutSkeletonProps & { showFilters?: boolean }) {\n return (\n <div className={cn(\"space-y-4\", className || \"\")}>\n {/* Search input and button */}\n <div className=\"flex gap-2 md:gap-4\">\n <InteractiveSkeleton.Input className=\"flex-1\" />\n <InteractiveSkeleton.Button className=\"w-32 md:w-40\" />\n </div>\n\n {/* Filter chips */}\n {showFilters && (\n <div className=\"flex gap-2 flex-wrap\">\n <InteractiveSkeleton.Chip />\n <InteractiveSkeleton.Chip className=\"w-24\" />\n <InteractiveSkeleton.Chip className=\"w-16\" />\n <InteractiveSkeleton.Chip className=\"w-20\" />\n </div>\n )}\n </div>\n )\n}\n\n/**\n * Category sidebar skeleton for filtering pages\n */\nexport function CategorySidebarSkeleton({ className }: PageLayoutSkeletonProps) {\n // Matches the actual MultiLevelNavigation sidebar with folder/file icons, README badges, and chevrons\n const items = [\n { type: 'file', width: 'w-20', hasBadge: false },\n { type: 'folder', width: 'w-24', hasBadge: true },\n { type: 'folder', width: 'w-20', hasBadge: true },\n { type: 'folder', width: 'w-24', hasBadge: true },\n { type: 'folder', width: 'w-16', hasBadge: true },\n { type: 'folder', width: 'w-20', hasBadge: true },\n { type: 'folder', width: 'w-28', hasBadge: true },\n { type: 'folder', width: 'w-16', hasBadge: true },\n { type: 'folder', width: 'w-24', hasBadge: true },\n { type: 'file', width: 'w-28' },\n { type: 'file', width: 'w-36' },\n ]\n\n return (\n <div className={cn(\"w-full lg:w-[320px]\", className)}>\n {/* DATA ROOM label */}\n <UnifiedSkeleton className=\"h-[14px] w-24 rounded mb-4\" />\n\n {/* Navigation items — each has card background matching actual MultiLevelNavigation */}\n <div className=\"space-y-1.5\">\n {items.map((item, index) => (\n <div\n key={index}\n className={cn(\n \"flex items-center justify-between py-4 px-4 rounded-lg border border-ods-border min-h-[50px]\",\n index === 0 ? \"bg-ods-accent/20\" : \"bg-ods-card\"\n )}\n >\n <div className=\"flex items-center gap-2.5\">\n <UnifiedSkeleton className=\"w-4 h-4 shrink-0 rounded\" />\n <UnifiedSkeleton className={`h-[14px] ${item.width} rounded`} />\n </div>\n <div className=\"flex items-center gap-2 h-[18px]\">\n {item.hasBadge && <UnifiedSkeleton className=\"h-[18px] w-14 rounded\" />}\n {item.type === 'folder' && <UnifiedSkeleton className=\"w-4 h-4 rounded\" />}\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\n/**\n * Breadcrumb navigation skeleton\n */\nexport function BreadcrumbSkeleton({ className }: PageLayoutSkeletonProps) {\n return (\n <div className={cn(\"flex items-center space-x-1 mb-6\", className)}>\n <TextSkeleton.Caption className=\"w-16\" />\n <UnifiedSkeleton variant=\"default\" className=\"w-4 h-4 rounded-full\" />\n <TextSkeleton.Caption className=\"w-24\" />\n <UnifiedSkeleton variant=\"default\" className=\"w-4 h-4 rounded-full\" />\n <TextSkeleton.Caption className=\"w-32\" />\n <UnifiedSkeleton variant=\"default\" className=\"w-4 h-4 rounded-full\" />\n <TextSkeleton.Caption className=\"w-24\" />\n </div>\n )\n}\n\n/**\n * Results header skeleton with count and sorting\n */\nexport function ResultsHeaderSkeleton({ className }: PageLayoutSkeletonProps) {\n return (\n <div className={cn(\"flex flex-col md:flex-row justify-between items-start md:items-center gap-4 mb-6\", className)}>\n <div className=\"space-y-1\">\n <TextSkeleton.Body className=\"w-48\" />\n {/* <TextSkeleton.Caption className=\"w-32\" /> */}\n </div>\n </div>\n )\n}\n\n/**\n * Two-column layout skeleton (sidebar + main content)\n */\nexport function TwoColumnLayoutSkeleton({\n className,\n sidebarContent,\n mainContent,\n sidebarPosition = 'left'\n}: PageLayoutSkeletonProps & {\n sidebarContent?: React.ReactNode\n mainContent?: React.ReactNode\n sidebarPosition?: 'left' | 'right'\n}) {\n const sidebar = sidebarContent || <CategorySidebarSkeleton />\n const main = mainContent || <CardSkeletonGrid count={6} />\n\n return (\n <div className={cn(\n \"grid grid-cols-1 lg:grid-cols-[320px_1fr] gap-6 lg:gap-8\",\n sidebarPosition === 'right' && \"lg:grid-cols-[1fr_320px]\",\n className\n )}>\n {sidebarPosition === 'left' ? (\n <>\n <aside className=\"order-2 lg:order-1\">{sidebar}</aside>\n <main className=\"order-1 lg:order-2\">{main}</main>\n </>\n ) : (\n <>\n <main className=\"order-1\">{main}</main>\n <aside className=\"order-2\">{sidebar}</aside>\n </>\n )}\n </div>\n )\n}\n\n/**\n * Article/blog post layout skeleton\n */\nexport function ArticleLayoutSkeleton({ className }: PageLayoutSkeletonProps) {\n return (\n <article className={cn(\"max-w-4xl mx-auto\", className)}>\n {/* Article header */}\n <header className=\"mb-8 md:mb-12 space-y-4 md:space-y-6\">\n {/* Category/tags */}\n <div className=\"flex gap-2\">\n <InteractiveSkeleton.Chip />\n <InteractiveSkeleton.Chip className=\"w-16\" />\n </div>\n \n {/* Title */}\n <div className=\"space-y-3\">\n <TextSkeleton.Heading className=\"w-full\" />\n <TextSkeleton.Heading className=\"w-3/4\" />\n </div>\n \n {/* Metadata */}\n <div className=\"flex items-center gap-4 pt-4 border-t border-ods-divider\">\n <div className=\"flex items-center gap-2\">\n <MediaSkeleton.Avatar size=\"sm\" />\n <TextSkeleton.Caption className=\"w-24\" />\n </div>\n <TextSkeleton.Caption className=\"w-20\" />\n <TextSkeleton.Caption className=\"w-16\" />\n </div>\n </header>\n\n {/* Featured image */}\n <div className=\"mb-8 md:mb-12\">\n <MediaSkeleton.CardImage className=\"w-full h-64 md:h-96\" />\n </div>\n\n {/* Article content */}\n <div className=\"prose prose-invert max-w-none space-y-6\">\n {/* Paragraphs */}\n {Array.from({ length: 12 }).map((_, index) => (\n <div key={index} className=\"space-y-2\">\n <TextSkeleton.Body className=\"w-full\" />\n <TextSkeleton.Body className=\"w-full\" />\n <TextSkeleton.Body className=\"w-5/6\" />\n <TextSkeleton.Body className=\"w-3/4\" />\n </div>\n ))}\n \n {/* Subheading in content */}\n <div className=\"py-4\">\n <TextSkeleton.Subheading className=\"w-2/3 mb-4\" />\n <div className=\"space-y-2\">\n <TextSkeleton.Body className=\"w-full\" />\n <TextSkeleton.Body className=\"w-4/5\" />\n </div>\n </div>\n </div>\n </article>\n )\n}\n\n/**\n * Vendor Detail Layout Skeleton - Complete vendor detail page structure\n * Matches the refactored vendor detail page with proper platform colors and responsive layout\n */\nexport function VendorDetailLayoutSkeleton({ className }: PageLayoutSkeletonProps) {\n return (\n <main className={cn(\"bg-ods-bg min-h-screen\", className)}>\n <div className=\"max-w-[1920px] mx-auto px-6 md:px-20 py-6 md:py-10\">\n {/* Breadcrumb */}\n <BreadcrumbSkeleton className=\"mb-6\" />\n\n {/* Main Layout Container */}\n <div className=\"flex flex-col lg:flex-row lg:gap-10\">\n {/* Left Content Area */}\n <div className=\"flex-1 min-w-0\">\n \n {/* Vendor Hero Section */}\n <div className=\"mb-10\">\n {/* Header - Logo and Title Side by Side */}\n <div className=\"flex gap-6 mb-6\">\n <div className=\"w-20 h-20 bg-ods-card border border-ods-border rounded-lg animate-pulse flex-shrink-0\"></div>\n \n <div className=\"flex flex-col gap-3\">\n <div className=\"flex flex-col gap-2\">\n {/* Large title skeleton */}\n <div className=\"h-12 md:h-16 lg:h-20 bg-[#2A2A2A] rounded animate-pulse w-80 max-w-full\"></div>\n {/* Category text */}\n <div className=\"h-5 md:h-6 bg-[#2A2A2A] rounded animate-pulse w-32\"></div>\n </div>\n \n {/* Pricing tags */}\n <div className=\"flex items-center gap-2\">\n <div className=\"h-8 bg-[#2A2A2A] rounded animate-pulse w-20\"></div>\n <div className=\"h-8 bg-[#2A2A2A] rounded animate-pulse w-16\"></div>\n </div>\n </div>\n </div>\n\n {/* Vendor Image Display Skeleton */}\n <div className=\"w-full h-[300px] md:h-[400px] lg:h-[500px] bg-ods-card border border-ods-border rounded-lg animate-pulse mb-2\"></div>\n <div className=\"text-center\">\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-24 mx-auto\"></div>\n </div>\n </div>\n\n {/* Mobile Sidebar - Show on mobile only, positioned after title */}\n <div className=\"lg:hidden mb-10\">\n <div className=\"space-y-4\">\n {/* Deploy Button */}\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n \n {/* Voting Buttons */}\n <div className=\"space-y-2\">\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n </div>\n \n {/* GitHub Score Section */}\n <div className=\"border border-ods-border rounded-lg overflow-hidden\">\n {/* Header */}\n <div className=\"bg-ods-card p-4 flex items-center gap-3\">\n <div className=\"w-8 h-8 bg-[#2A2A2A] rounded animate-pulse\"></div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-20\"></div>\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse w-12\"></div>\n </div>\n </div>\n \n {/* Stats */}\n <div className=\"p-4 space-y-3\">\n {Array.from({ length: 4 }).map((_, i) => (\n <div key={i} className=\"flex items-center gap-3\">\n <div className=\"w-6 h-6 bg-[#2A2A2A] rounded animate-pulse\"></div>\n <div className=\"flex items-end gap-1\">\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-12\"></div>\n <div className=\"h-3 bg-[#2A2A2A] rounded animate-pulse w-8\"></div>\n </div>\n </div>\n ))}\n </div>\n </div>\n \n {/* Action Buttons */}\n <div className=\"space-y-3\">\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n </div>\n </div>\n </div>\n\n {/* Alternatives Container */}\n <div className=\"flex flex-col gap-6 mb-20\">\n <div className=\"h-8 md:h-10 bg-[#2A2A2A] rounded animate-pulse w-48\"></div>\n \n {/* Open Source Alternatives */}\n <div className=\"flex flex-col gap-4\">\n <div className=\"h-5 bg-[#2A2A2A] rounded animate-pulse w-48\"></div>\n <div className=\"flex flex-wrap gap-2\">\n {Array.from({ length: 6 }).map((_, i) => (\n <div key={i} className=\"h-10 bg-ods-card border border-ods-border rounded-lg animate-pulse w-24\"></div>\n ))}\n </div>\n </div>\n\n {/* Commercial Alternatives */}\n <div className=\"flex flex-col gap-4\">\n <div className=\"h-5 bg-[#2A2A2A] rounded animate-pulse w-52\"></div>\n <div className=\"flex flex-wrap gap-2\">\n {Array.from({ length: 4 }).map((_, i) => (\n <div key={i} className=\"h-10 bg-ods-card border border-ods-border rounded-lg animate-pulse w-28\"></div>\n ))}\n </div>\n </div>\n </div>\n\n {/* About Section */}\n <div className=\"flex flex-col gap-6 mb-20\">\n <div className=\"h-8 md:h-10 bg-[#2A2A2A] rounded animate-pulse w-64\"></div>\n \n <div className=\"bg-ods-card border border-ods-border rounded-lg p-6 md:p-8\">\n <div className=\"space-y-4\">\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse\"></div>\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse\"></div>\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse w-5/6\"></div>\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse w-4/5\"></div>\n </div>\n </div>\n </div>\n\n {/* Key Features Section */}\n <div className=\"flex flex-col gap-6 mb-20\">\n <div className=\"h-8 md:h-10 bg-[#2A2A2A] rounded animate-pulse w-72\"></div>\n <div className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6\">\n {Array.from({ length: 6 }).map((_, i) => (\n <div key={i} className=\"bg-ods-card border border-ods-border rounded-lg p-4 flex gap-4\">\n <div className=\"w-12 h-12 bg-[#2A2A2A] rounded flex-shrink-0 animate-pulse\"></div>\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-5 bg-[#2A2A2A] rounded animate-pulse w-3/4\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse\"></div>\n </div>\n </div>\n ))}\n </div>\n </div>\n\n {/* Pros and Cons Section */}\n <div className=\"flex flex-col gap-6 mb-20\">\n <div className=\"h-8 md:h-10 bg-[#2A2A2A] rounded animate-pulse w-80\"></div>\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-6\">\n {/* Pros Column */}\n <div className=\"flex flex-col gap-6\">\n <div className=\"h-5 bg-[#2A2A2A] rounded animate-pulse w-16\"></div>\n {Array.from({ length: 3 }).map((_, i) => (\n <div key={i} className=\"bg-ods-card border border-ods-border rounded-lg p-4 flex gap-3\">\n <div className=\"w-12 h-12 bg-ods-bg border border-ods-border rounded flex-shrink-0 animate-pulse\"></div>\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-5 bg-[#2A2A2A] rounded animate-pulse w-2/3\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse\"></div>\n </div>\n </div>\n ))}\n </div>\n {/* Cons Column */}\n <div className=\"flex flex-col gap-6\">\n <div className=\"h-5 bg-[#2A2A2A] rounded animate-pulse w-16\"></div>\n {Array.from({ length: 3 }).map((_, i) => (\n <div key={i} className=\"bg-ods-card border border-ods-border rounded-lg p-4 flex gap-3\">\n <div className=\"w-12 h-12 bg-ods-bg border border-ods-border rounded flex-shrink-0 animate-pulse\"></div>\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-5 bg-[#2A2A2A] rounded animate-pulse w-2/3\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse\"></div>\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n\n {/* Alternatives Section */}\n <div className=\"flex flex-col gap-6 mb-20\">\n <div className=\"h-8 md:h-10 bg-[#2A2A2A] rounded animate-pulse w-72\"></div>\n <div className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6\">\n {Array.from({ length: 6 }).map((_, i) => (\n <div key={i} className=\"bg-ods-card border border-ods-border rounded-lg p-6 space-y-4\">\n {/* Header */}\n <div className=\"flex items-start gap-4\">\n <div className=\"w-16 h-16 bg-ods-bg border border-ods-border rounded-lg animate-pulse flex-shrink-0\"></div>\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse w-3/4\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-1/2\"></div>\n </div>\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse w-20\"></div>\n </div>\n \n {/* Description */}\n <div className=\"space-y-2\">\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-5/6\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-4/5\"></div>\n </div>\n \n {/* Footer */}\n <div className=\"flex items-center justify-between pt-2 border-t border-ods-border\">\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-16\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-20\"></div>\n </div>\n </div>\n ))}\n </div>\n {/* Show All Button */}\n <div className=\"h-12 bg-[#2A2A2A] rounded-md animate-pulse\"></div>\n </div>\n\n {/* Comments Section */}\n <div className=\"flex flex-col gap-6 mb-20\">\n <div className=\"h-8 md:h-10 bg-[#2A2A2A] rounded animate-pulse w-64\"></div>\n \n {/* Comment Form Skeleton */}\n <div className=\"space-y-3\">\n <div className=\"flex gap-3\">\n <div className=\"flex-1 bg-ods-bg border border-ods-border rounded-lg overflow-hidden\">\n {/* Title Section */}\n <div className=\"border-b border-ods-border p-3\">\n <div className=\"h-3 bg-[#2A2A2A] rounded animate-pulse w-8 mb-2\"></div>\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse w-full\"></div>\n </div>\n \n {/* Description Section */}\n <div className=\"p-3\">\n <div className=\"h-3 bg-[#2A2A2A] rounded animate-pulse w-16 mb-2\"></div>\n <div className=\"space-y-2\">\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-full\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-3/4\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-1/2\"></div>\n </div>\n </div>\n </div>\n \n {/* Send Button */}\n <div className=\"flex items-stretch\">\n <div className=\"h-[120px] w-20 bg-[#2A2A2A] rounded-lg animate-pulse\"></div>\n </div>\n </div>\n </div>\n \n {/* Sample Comment Cards */}\n <div className=\"space-y-4\">\n {Array.from({ length: 3 }).map((_, i) => (\n <div key={i} className=\"bg-ods-card border border-ods-border rounded-lg p-4\">\n {/* Comment Header */}\n <div className=\"flex flex-col gap-3 mb-3 min-[420px]:flex-row min-[420px]:items-center min-[420px]:justify-between min-[420px]:gap-2\">\n <div className=\"flex items-center gap-2\">\n {/* User Info */}\n <div className=\"flex items-center gap-2 bg-ods-card border border-ods-border rounded-lg py-2 px-3\">\n <div className=\"w-8 h-8 bg-[#2A2A2A] rounded-lg animate-pulse\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-20\"></div>\n </div>\n \n {/* Timestamp */}\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-12\"></div>\n </div>\n </div>\n \n {/* Comment Content */}\n <div className=\"space-y-2\">\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse w-2/3\"></div>\n <div className=\"space-y-1\">\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-full\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-4/5\"></div>\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-3/5\"></div>\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n\n {/* Right Sidebar - Desktop Only */}\n <div className=\"hidden lg:block w-[290px] flex-shrink-0\">\n <div className=\"space-y-4\">\n {/* Deploy Button */}\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n \n {/* Voting Buttons */}\n <div className=\"space-y-2\">\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n </div>\n \n {/* GitHub Score Section */}\n <div className=\"border border-ods-border rounded-lg overflow-hidden\">\n {/* Header */}\n <div className=\"bg-ods-card p-4 flex items-center gap-3\">\n <div className=\"w-8 h-8 bg-[#2A2A2A] rounded animate-pulse\"></div>\n <div className=\"flex flex-col gap-1\">\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-20\"></div>\n <div className=\"h-6 bg-[#2A2A2A] rounded animate-pulse w-12\"></div>\n </div>\n </div>\n \n {/* Stats */}\n <div className=\"p-4 space-y-3\">\n {Array.from({ length: 4 }).map((_, i) => (\n <div key={i} className=\"flex items-center gap-3\">\n <div className=\"w-6 h-6 bg-[#2A2A2A] rounded animate-pulse\"></div>\n <div className=\"flex items-end gap-1\">\n <div className=\"h-4 bg-[#2A2A2A] rounded animate-pulse w-12\"></div>\n <div className=\"h-3 bg-[#2A2A2A] rounded animate-pulse w-8\"></div>\n </div>\n </div>\n ))}\n </div>\n </div>\n \n {/* Action Buttons */}\n <div className=\"space-y-3\">\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n <div className=\"h-12 bg-ods-card border border-ods-border rounded-lg animate-pulse\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </main>\n )\n}\n\n/**\n * Stats/features section skeleton for homepage\n */\nexport function StatsSectionSkeleton({ \n className,\n columns = 3 \n}: PageLayoutSkeletonProps & { columns?: number }) {\n return (\n <div className={cn(\n \"grid gap-6 mb-12 md:mb-16\",\n columns === 3 && \"grid-cols-1 md:grid-cols-3\",\n columns === 4 && \"grid-cols-1 md:grid-cols-2 lg:grid-cols-4\",\n className\n )}>\n {Array.from({ length: columns }).map((_, i) => (\n <div key={i} className=\"bg-ods-card border border-ods-border rounded-lg p-6\">\n <div className=\"space-y-4\">\n <MediaSkeleton.Icon size=\"lg\" />\n <TextSkeleton.Subheading className=\"w-3/4\" />\n <div className=\"space-y-2\">\n <TextSkeleton.Body className=\"w-full\" />\n <TextSkeleton.Body className=\"w-3/4\" />\n </div>\n </div>\n </div>\n ))}\n </div>\n )\n}\n\n\n/**\n * Blog Card Grid Skeleton - Always displays exactly 4 blog card skeletons\n * Used for consistent blog page layout with predictable height\n */\nexport function BlogCardGridSkeleton({ className }: PageLayoutSkeletonProps) {\n return (\n <div className={cn(\"space-y-6\", className)}>\n <CardSkeletonGrid \n count={4}\n variant=\"blog\"\n className=\"grid-cols-1 md:grid-cols-2\"\n />\n </div>\n )\n}\n\n/**\n * Vendor Grid Skeleton - Always displays exactly 12 vendor card skeletons\n * Used for consistent vendor page layout with predictable height\n */\nexport function VendorGridSkeleton({ className }: PageLayoutSkeletonProps) {\n return (\n <div className={cn(\"space-y-6\", className)}>\n <CardSkeletonGrid \n count={12}\n variant=\"vendor\"\n className=\"grid-cols-1 md:grid-cols-2 lg:grid-cols-3\"\n />\n </div>\n )\n}\n\n/**\n * Slack Community Section Skeleton\n * Matches SlackCommunity component structure with title, channel list, and chat interface\n */\nexport function SlackCommunitySkeleton() {\n return (\n <section \n className=\"w-full bg-ods-bg px-4 md:px-20 lg:px-20 py-12 md:py-20\"\n aria-label=\"Slack Community Loading\"\n >\n {/* Frame 651 Container */}\n <div className=\"w-full flex flex-col gap-4 md:gap-6\">\n \n {/* Title Skeleton */}\n <div className=\"w-full\">\n <div className=\"h-8 md:h-12 lg:h-14 bg-[#2A2A2A] rounded-lg animate-pulse max-w-md\"></div>\n </div>\n\n {/* Content Area - Channel List + Chat Interface */}\n <div className=\"w-full flex flex-col lg:flex-row lg:justify-end lg:items-start gap-4 md:gap-6 min-w-0\">\n \n {/* Channel List Skeleton */}\n <div className=\"w-full lg:w-[290px] lg:max-w-[290px] bg-ods-bg border border-ods-border rounded flex flex-col flex-shrink-0 overflow-hidden animate-pulse\">\n <div className=\"p-4 space-y-4\">\n {/* Header */}\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex items-center justify-between\">\n <div className=\"h-4 bg-[#2A2A2A] rounded w-24\"></div>\n <div className=\"h-3 bg-[#2A2A2A] rounded w-16\"></div>\n </div>\n <div className=\"h-3 bg-[#2A2A2A] rounded w-32\"></div>\n </div>\n\n {/* Channels */}\n <div className=\"flex flex-col gap-1\">\n <div className=\"h-3 bg-[#2A2A2A] rounded w-16 mb-2\"></div>\n {Array.from({ length: 5 }).map((_, i) => (\n <div key={i} className=\"flex items-center gap-2 px-2 py-3 min-h-[48px]\">\n <div className=\"w-4 h-4 bg-[#2A2A2A] rounded\"></div>\n <div className=\"flex-1\">\n <div className=\"h-3 bg-[#2A2A2A] rounded w-24 mb-1\"></div>\n <div className=\"h-2 bg-[#2A2A2A] rounded w-16\"></div>\n </div>\n </div>\n ))}\n </div>\n\n {/* Stats */}\n <div className=\"border-t border-ods-border pt-3 mt-2\">\n <div className=\"space-y-2\">\n <div className=\"flex justify-between\">\n <div className=\"h-3 bg-[#2A2A2A] rounded w-16\"></div>\n <div className=\"h-3 bg-[#2A2A2A] rounded w-8\"></div>\n </div>\n <div className=\"flex justify-between\">\n <div className=\"h-3 bg-[#2A2A2A] rounded w-20\"></div>\n <div className=\"h-3 bg-[#2A2A2A] rounded w-8\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n {/* Chat Interface Skeleton */}\n <div className=\"flex-1 min-h-[450px] h-[450px] md:min-h-[500px] md:h-[500px] lg:min-h-[600px] lg:h-[600px] bg-ods-card border border-ods-border rounded-lg flex flex-col min-w-0 animate-pulse\">\n \n {/* Header */}\n <div className=\"flex items-center justify-between p-4 md:p-6 border-b border-ods-border bg-ods-bg h-[56px] md:h-[60px] flex-shrink-0\">\n <div className=\"flex items-center gap-2\">\n <div className=\"h-3 md:h-4 bg-[#2A2A2A] rounded w-3 md:w-4\"></div>\n <div className=\"h-3 md:h-4 bg-[#2A2A2A] rounded w-24 md:w-32\"></div>\n </div>\n <div className=\"h-3 bg-[#2A2A2A] rounded w-12 md:w-16\"></div>\n </div>\n\n {/* Messages */}\n <div className=\"flex-1 bg-ods-bg p-4 md:p-6 space-y-3 md:space-y-4 overflow-hidden min-h-[280px] md:min-h-[320px] lg:min-h-[420px]\">\n {Array.from({ length: 6 }).map((_, i) => (\n <div key={i} className=\"flex gap-2 md:gap-3\">\n <div className=\"w-10 h-10 md:w-12 md:h-12 bg-[#2A2A2A] rounded-lg flex-shrink-0\"></div>\n <div className=\"flex-1\">\n <div className=\"flex items-center gap-2 mb-1\">\n <div className=\"h-3 bg-[#2A2A2A] rounded w-16 md:w-20\"></div>\n <div className=\"h-3 bg-[#2A2A2A] rounded w-12 md:w-16\"></div>\n </div>\n <div className=\"h-3 md:h-4 bg-[#2A2A2A] rounded w-full\"></div>\n </div>\n </div>\n ))}\n </div>\n\n {/* Input Area */}\n <div className=\"p-4 md:p-6 border-t border-ods-border bg-ods-card h-[72px] md:h-[80px] flex-shrink-0\">\n <div className=\"flex items-end gap-3 justify-center md:justify-end\">\n <div className=\"h-10 md:h-12 bg-[#2A2A2A] rounded-lg w-28 md:w-32\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n );\n} ","import type React from \"react\"\nimport { cn } from \"../../utils/cn\"\n\ninterface UnifiedSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n className?: string\n variant?: 'default' | 'text' | 'circular' | 'rectangular'\n width?: string | number\n height?: string | number\n /**\n * Disable animation for users who prefer reduced motion\n */\n animate?: boolean\n /**\n * Accessibility label for screen readers\n */\n 'aria-label'?: string\n}\n\n/**\n * UnifiedSkeleton Component\n * \n * Base skeleton component with consistent styling across the application.\n * \n * Design Specifications:\n * - Color: #2A2A2A base with #3A3A3A pulse highlight\n * - Animation: 1.5s pulse duration, ease-in-out timing\n * - Responsive: Mobile-first approach with proper scaling\n * - Accessibility: ARIA labels and reduced motion support\n * \n * @param variant - Shape variant: default (rounded), text (rounded-sm), circular, rectangular\n * @param width - Custom width (defaults to full width)\n * @param height - Custom height (defaults to auto based on variant)\n * @param animate - Enable/disable animation (respects prefers-reduced-motion)\n * @param aria-label - Accessibility label for screen readers\n */\nexport function UnifiedSkeleton({\n className,\n variant = 'default',\n width,\n height,\n animate = true,\n 'aria-label': ariaLabel,\n ...props\n}: UnifiedSkeletonProps) {\n const baseClasses = \"bg-[#2A2A2A]\"\n \n const variantClasses = {\n default: \"rounded-md\",\n text: \"rounded-sm\",\n circular: \"rounded-full\",\n rectangular: \"rounded-none\"\n }\n \n const defaultHeights = {\n default: \"h-4\",\n text: \"h-4\", \n circular: \"h-12 w-12\",\n rectangular: \"h-4\"\n }\n \n const animationClasses = animate \n ? \"animate-pulse motion-reduce:animate-none\" \n : \"\"\n \n const style: React.CSSProperties = {\n width: width,\n height: height,\n }\n \n return (\n <div\n className={cn(\n baseClasses,\n variantClasses[variant],\n !height && !style.height && defaultHeights[variant],\n !width && !style.width && variant !== 'circular' && \"w-full\",\n animationClasses,\n className\n )}\n style={style}\n role=\"status\"\n aria-label={ariaLabel || \"Loading content\"}\n {...props}\n />\n )\n}\n\n/**\n * Text skeleton variants for consistent typography loading\n */\nexport const TextSkeleton = {\n /**\n * Large heading skeleton (h1, h2)\n */\n Heading: ({ className, ...props }: Omit<UnifiedSkeletonProps, 'variant'>) => (\n <UnifiedSkeleton \n variant=\"text\" \n className={cn(\"h-8 md:h-10 lg:h-12\", className)} \n aria-label=\"Loading heading\"\n {...props} \n />\n ),\n \n /**\n * Medium heading skeleton (h3, h4)\n */\n Subheading: ({ className, ...props }: Omit<UnifiedSkeletonProps, 'variant'>) => (\n <UnifiedSkeleton \n variant=\"text\" \n className={cn(\"h-6 md:h-7 lg:h-8\", className)} \n aria-label=\"Loading subheading\"\n {...props} \n />\n ),\n \n /**\n * Body text skeleton\n */\n Body: ({ className, ...props }: Omit<UnifiedSkeletonProps, 'variant'>) => (\n <UnifiedSkeleton \n variant=\"text\" \n className={cn(\"h-4 md:h-5\", className)} \n aria-label=\"Loading text\"\n {...props} \n />\n ),\n \n /**\n * Small text skeleton (captions, metadata)\n */\n Caption: ({ className, ...props }: Omit<UnifiedSkeletonProps, 'variant'>) => (\n <UnifiedSkeleton \n variant=\"text\" \n className={cn(\"h-3 md:h-4\", className)} \n aria-label=\"Loading caption\"\n {...props} \n />\n ),\n}\n\n/**\n * Interactive element skeletons\n */\nexport const InteractiveSkeleton = {\n /**\n * Button skeleton with proper touch targets\n */\n Button: ({ className, ...props }: Omit<UnifiedSkeletonProps, 'variant'>) => (\n <UnifiedSkeleton \n variant=\"default\" \n className={cn(\"h-10 md:h-12 w-32 md:w-40\", className)} \n aria-label=\"Loading button\"\n {...props} \n />\n ),\n \n /**\n * Input field skeleton\n */\n Input: ({ className, ...props }: Omit<UnifiedSkeletonProps, 'variant'>) => (\n <UnifiedSkeleton \n variant=\"default\" \n className={cn(\"h-10 md:h-12 w-full\", className)} \n aria-label=\"Loading input field\"\n {...props} \n />\n ),\n \n /**\n * Filter chip skeleton\n */\n Chip: ({ className, ...props }: Omit<UnifiedSkeletonProps, 'variant'>) => (\n <UnifiedSkeleton \n variant=\"default\" \n className={cn(\"h-8 w-20 rounded-full\", className)} \n aria-label=\"Loading filter\"\n {...props} \n />\n ),\n}\n\n/**\n * Media skeletons for images and icons\n */\nexport const MediaSkeleton = {\n /**\n * Avatar/profile image skeleton\n */\n Avatar: ({ size = 'md', className, ...props }: Omit<UnifiedSkeletonProps, 'variant'> & { size?: 'sm' | 'md' | 'lg' }) => {\n const sizeClasses = {\n sm: \"h-8 w-8\",\n md: \"h-12 w-12\", \n lg: \"h-16 w-16\"\n }\n \n return (\n <UnifiedSkeleton \n variant=\"circular\" \n className={cn(sizeClasses[size], className)} \n aria-label=\"Loading profile image\"\n {...props} \n />\n )\n },\n \n /**\n * Card image skeleton (1200×630 OG aspect — matches entity-cards default\n * so loading state never causes a height shift when card data arrives)\n */\n CardImage: ({ className, ...props }: Omit<UnifiedSkeletonProps, 'variant'>) => (\n <UnifiedSkeleton\n variant=\"default\"\n className={cn(\"aspect-[1200/630] w-full\", className)}\n aria-label=\"Loading image\"\n {...props}\n />\n ),\n \n /**\n * Icon skeleton\n */\n Icon: ({ size = 'md', className, ...props }: Omit<UnifiedSkeletonProps, 'variant'> & { size?: 'sm' | 'md' | 'lg' }) => {\n const sizeClasses = {\n sm: \"h-4 w-4\",\n md: \"h-6 w-6\",\n lg: \"h-8 w-8\"\n }\n \n return (\n <UnifiedSkeleton \n variant=\"default\" \n className={cn(sizeClasses[size], className)} \n aria-label=\"Loading icon\"\n {...props} \n />\n )\n },\n} ","import type React from \"react\"\nimport { cn } from \"../../utils/cn\"\nimport { UnifiedSkeleton, TextSkeleton, MediaSkeleton, InteractiveSkeleton } from \"./unified-skeleton\"\n\ninterface CardSkeletonProps {\n className?: string\n /**\n * Card layout variant\n */\n variant?: 'vendor' | 'blog' | 'category' | 'alternative'\n /**\n * Show action buttons area\n */\n showActions?: boolean\n /**\n * Show metadata footer\n */\n showMetadata?: boolean\n /** Optional tailwind classes to override the card container background & border */\n containerClassName?: string\n}\n \n/**\n * Unified card skeleton component for consistent card loading states\n * \n * Supports different card types used across the application:\n * - vendor: Vendor cards with logo, title, description, and actions\n * - blog: Blog post cards with image, title, summary, and metadata \n * - category: Category cards with icon, title, and description\n * - alternative: Alternative vendor cards in comparison lists\n */\nexport function CardSkeleton({\n className,\n containerClassName,\n variant = 'vendor',\n showActions = true,\n showMetadata = true,\n ...props\n}: CardSkeletonProps) {\n const cardContent = {\n vendor: <VendorCardContent showActions={showActions} showMetadata={showMetadata} />,\n blog: <BlogCardContent showActions={showActions} showMetadata={showMetadata} />,\n category: <CategoryCardContent />,\n alternative: <AlternativeCardContent showActions={showActions} />\n }\n\n return (\n <div \n className={cn(\n containerClassName || \"bg-ods-card border border-ods-border\",\n \"rounded-lg overflow-hidden\",\n // Flex layouts for certain variants\n variant === 'blog' && \"h-full flex flex-col\",\n variant === 'vendor' && \"h-full flex flex-col\",\n className\n )}\n role=\"status\"\n aria-label={`Loading ${variant} card`}\n {...props}\n >\n {cardContent[variant]}\n </div>\n )\n}\n\n/**\n * Vendor card skeleton content - matches exact VendorCard structure\n */\nfunction VendorCardContent({ showActions, showMetadata }: { showActions: boolean; showMetadata: boolean }) {\n return (\n <div className=\"p-4 gap-3 flex flex-col\">\n {/* Header Section - Row layout matching actual VendorCard */}\n <div className=\"flex items-start gap-3 w-full\">\n {/* Logo Frame - 60px width fixed, matching actual structure */}\n <div className=\"w-[60px] h-[60px] bg-ods-bg border border-ods-border rounded-lg p-2 flex items-center justify-center flex-shrink-0\">\n <MediaSkeleton.Avatar size=\"sm\" className=\"w-11 h-11\" />\n </div>\n \n {/* Text Container - Column layout, matching actual structure */}\n <div className=\"flex-1 flex flex-col justify-center py-2 min-w-0 space-y-1\">\n {/* Title - Single line with proper width */}\n <TextSkeleton.Subheading className=\"w-3/4\" />\n {/* Category - Single line, shorter */}\n <TextSkeleton.Caption className=\"w-1/2\" />\n </div>\n </div>\n\n {/* Description Section - Fixed 48px height matching actual VendorCard */}\n <div className=\"w-full h-12 overflow-hidden flex items-center\">\n <div className=\"space-y-1 w-full\">\n <TextSkeleton.Body className=\"w-full\" />\n <TextSkeleton.Body className=\"w-2/3\" />\n </div>\n </div>\n\n {/* Footer Section - Responsive layout matching actual structure */}\n <div className=\"flex items-center justify-between gap-2 w-full min-w-0\">\n {/* Stats Container - Flexible width, no overflow */}\n <div className=\"flex items-center gap-3 md:gap-4 min-w-0 flex-shrink\">\n {/* OpenMSP Score skeleton */}\n <div className=\"flex items-center gap-1 flex-shrink-0\">\n <MediaSkeleton.Icon size=\"sm\" className=\"w-5 h-5\" />\n <TextSkeleton.Caption className=\"w-8\" />\n </div>\n \n {/* GitHub Stats skeleton */}\n <div className=\"flex items-center gap-1 flex-shrink-0\">\n <MediaSkeleton.Icon size=\"sm\" className=\"w-5 h-5\" />\n <TextSkeleton.Caption className=\"w-10\" />\n </div>\n </div>\n\n {/* Tag Section - Contained within card boundaries */}\n <div className=\"flex-shrink-0\">\n <div className=\"flex items-center gap-1.5 bg-ods-bg border border-ods-border rounded px-2.5 py-1.5\">\n <div className=\"w-4 h-4 bg-ods-border rounded-sm flex items-center justify-center flex-shrink-0\">\n <MediaSkeleton.Icon size=\"sm\" className=\"w-2.5 h-2.5\" />\n </div>\n <TextSkeleton.Caption className=\"w-16\" />\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * Blog card skeleton content - matches fixed height structure\n */\nfunction BlogCardContent({ showActions, showMetadata }: { showActions: boolean; showMetadata: boolean }) {\n return (\n <>\n {/* Image Section — OG 1200×630 aspect (matches blog-card.tsx loaded state) */}\n <div className=\"blog-card-image-container relative w-full aspect-[1200/630] overflow-hidden bg-ods-bg\">\n <MediaSkeleton.CardImage />\n </div>\n \n {/* Content - Fixed height structure to match BlogCard */}\n <div className=\"p-4 flex flex-col flex-grow\">\n {/* Title Section - Fixed 2 lines with vertical centering */}\n <div className=\"mb-3 flex items-center min-h-[50.4px] md:min-h-[56px] lg:min-h-[61.6px]\">\n <div className=\"space-y-1 w-full\">\n <TextSkeleton.Subheading className=\"w-full\" />\n <TextSkeleton.Subheading className=\"w-3/4\" />\n </div>\n </div>\n \n {/* Chips Section - Fixed single line height */}\n <div className=\"mb-3 flex gap-2 h-[28px] items-center\">\n <InteractiveSkeleton.Chip className=\"w-16\" />\n <InteractiveSkeleton.Chip className=\"w-12\" />\n </div>\n \n {/* Description Section - Fixed 2 lines with vertical centering */}\n <div className=\"mb-3 flex items-center min-h-[42px] md:min-h-[45px] lg:min-h-[48px]\">\n <div className=\"space-y-1 w-full\">\n <TextSkeleton.Body className=\"w-full\" />\n <TextSkeleton.Body className=\"w-1/2\" />\n </div>\n </div>\n\n {/* Actions - only if requested */}\n {showActions && (\n <div className=\"pt-2\">\n <InteractiveSkeleton.Button className=\"w-24 h-8\" />\n </div>\n )}\n \n {/* Metadata footer - Matches BlogMeta horizontal layout */}\n {showMetadata && (\n <div className=\"mt-auto\">\n <div className=\"flex items-center justify-between gap-4 pt-4 border-t border-ods-border\">\n {/* Author section - matches AuthorMeta */}\n <div className=\"flex items-center gap-2 min-w-0 flex-1\">\n <MediaSkeleton.Avatar size=\"sm\" />\n <TextSkeleton.Caption className=\"w-16\" />\n </div>\n \n {/* Date and reading time section - matches BlogMeta right side */}\n <div className=\"flex items-center gap-3 text-[#767676] shrink-0\">\n <TextSkeleton.Caption className=\"w-12\" />\n {/* Separator dot */}\n <div className=\"w-1 h-1 bg-[#767676] rounded-full\"></div>\n <TextSkeleton.Caption className=\"w-16\" />\n </div>\n </div>\n </div>\n )}\n </div>\n </>\n )\n}\n\n/**\n * Category card skeleton content\n */\nfunction CategoryCardContent() {\n return (\n <div className=\"p-4 md:p-6 space-y-4\">\n {/* Icon grid */}\n <div className=\"flex gap-2 md:gap-3\">\n {Array.from({ length: 6 }).map((_, index) => (\n <MediaSkeleton.Icon \n key={index}\n size=\"lg\"\n className=\"flex-shrink-0\"\n />\n ))}\n </div>\n\n {/* Content */}\n <div className=\"space-y-2\">\n <div className=\"space-y-1\">\n <TextSkeleton.Subheading className=\"w-3/4\" />\n <TextSkeleton.Caption className=\"w-1/2\" />\n </div>\n \n <div className=\"flex items-start md:items-end justify-between gap-4 md:gap-6\">\n <div className=\"flex-1 space-y-2\">\n <TextSkeleton.Body className=\"w-full\" />\n <TextSkeleton.Body className=\"w-2/3\" />\n </div>\n \n <InteractiveSkeleton.Button className=\"w-10 h-10 md:w-12 md:h-12 flex-shrink-0\" />\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * Alternative card skeleton content (for vendor alternatives/comparisons)\n */\nfunction AlternativeCardContent({ showActions }: { showActions: boolean }) {\n return (\n <div className=\"flex items-start gap-4 p-4\">\n <MediaSkeleton.Avatar size=\"md\" className=\"flex-shrink-0\" />\n \n <div className=\"flex-1 space-y-2\">\n <div className=\"flex items-center justify-between\">\n <TextSkeleton.Subheading className=\"w-1/3\" />\n <TextSkeleton.Caption className=\"w-16\" />\n </div>\n \n <div className=\"space-y-1\">\n <TextSkeleton.Body className=\"w-full\" />\n <TextSkeleton.Body className=\"w-5/6\" />\n </div>\n\n {showActions && (\n <div className=\"pt-2\">\n <InteractiveSkeleton.Button className=\"w-20 h-8\" />\n </div>\n )}\n </div>\n </div>\n )\n}\n\n/**\n * Grid of card skeletons for loading lists\n */\nexport function CardSkeletonGrid({\n count = 6,\n variant = 'vendor',\n className,\n containerClassName,\n ...props\n}: {\n count?: number\n variant?: CardSkeletonProps['variant']\n className?: string\n containerClassName?: string\n} & Omit<CardSkeletonProps, 'variant'>) {\n return (\n <div \n className={cn(\n \"grid gap-4 md:gap-6\",\n // Responsive grid based on card type\n variant === 'vendor' && \"grid-cols-1 md:grid-cols-2 lg:grid-cols-3\",\n variant === 'blog' && \"grid-cols-1 md:grid-cols-2\",\n variant === 'category' && \"grid-cols-1 md:grid-cols-2 lg:grid-cols-4\",\n variant === 'alternative' && \"grid-cols-1\",\n className\n )}\n role=\"status\"\n aria-label={`Loading ${count} ${variant} cards`}\n >\n {Array.from({ length: count }, (_, index) => (\n <CardSkeleton \n key={index} \n variant={variant}\n containerClassName={containerClassName}\n {...props}\n />\n ))}\n </div>\n )\n} ","\"use client\"\n\nimport { useState, useEffect, useCallback, useRef } from 'react'\nimport type { DocNode, DocContent } from '../../types/doc-source'\nimport {\n stripFolderIndexFromPath,\n findDocNodeByPath,\n getDocAncestorNodeIds,\n DEFAULT_FOLDER_INDEX_FILE,\n} from '../../utils/doc-tree-nav'\nimport { useDocNavigation } from './doc-navigation-context'\nimport { scrollElementIntoView } from '../../utils/scroll-into-view'\n\nfunction scrollToContent() {\n const article = document.querySelector('article') as HTMLElement | null\n if (article) {\n scrollElementIntoView(article, { headerOffset: 80 })\n } else {\n window.scrollTo({ top: 0, behavior: 'smooth' })\n }\n}\n\nexport interface UseDocumentTreeConfig {\n /** API endpoint for fetching the document tree structure */\n structureEndpoint: string\n /** API endpoint for fetching document content */\n contentEndpoint: string\n /** Base route path for URL navigation (e.g., '/knowledge-base', '/data-room') */\n baseRoute: string\n /** Folder-index filename (defaults to 'README.md'). */\n folderIndexFile?: string\n}\n\n/**\n * Generic hook for document tree navigation and content fetching.\n * Drives DocViewer across all doc-source consumers.\n *\n * Client-only: structure + content fetches run in parallel on first mount.\n * No SSR pre-population — the previous SSR path required a Supabase admin\n * client (service role key) and silently fell back to client fetches on\n * envs where the key wasn't set; the parallel client fetches keep behavior\n * uniform across local + prod (latency ~= max(structure, content), not sum).\n */\nexport function useDocumentTree(\n config: UseDocumentTreeConfig,\n initialPath?: string,\n) {\n const { structureEndpoint, contentEndpoint, baseRoute } = config\n const folderIndexFile = config.folderIndexFile ?? DEFAULT_FOLDER_INDEX_FILE\n\n const cleanInitialPath = stripFolderIndexFromPath(\n initialPath?.replace(/\\/$/, '') || '',\n folderIndexFile,\n )\n\n const [structure, setStructure] = useState<DocNode[]>([])\n const [selectedPath, setSelectedPath] = useState<string>(cleanInitialPath)\n const [content, setContent] = useState<DocContent | null>(null)\n const [isLoadingStructure, setIsLoadingStructure] = useState(true)\n const [isLoadingContent, setIsLoadingContent] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const [expandedNodes, setExpandedNodes] = useState<Set<string>>(new Set())\n const [isInitialized, setIsInitialized] = useState(false)\n const lastFetchedPath = useRef<string | null>(null)\n\n const normalizedBaseRoute = baseRoute.replace(/\\/$/, '')\n\n const selectedPathRef = useRef(selectedPath)\n selectedPathRef.current = selectedPath\n\n const docNavigation = useDocNavigation()\n\n useEffect(() => {\n const handlePopState = () => {\n const pathname = window.location.pathname\n let pathFromUrl = ''\n\n if (pathname === normalizedBaseRoute || pathname === `${normalizedBaseRoute}/`) {\n pathFromUrl = ''\n } else if (pathname.startsWith(`${normalizedBaseRoute}/`)) {\n pathFromUrl = pathname.substring(`${normalizedBaseRoute}/`.length)\n }\n\n pathFromUrl = stripFolderIndexFromPath(pathFromUrl, folderIndexFile)\n\n if (pathFromUrl !== selectedPathRef.current) {\n setSelectedPath(pathFromUrl)\n if (pathFromUrl) {\n const parentPath = pathFromUrl.includes('/')\n ? pathFromUrl.substring(0, pathFromUrl.lastIndexOf('/'))\n : pathFromUrl\n setExpandedNodes(new Set(getDocAncestorNodeIds(parentPath)))\n }\n setTimeout(() => {\n scrollToContent()\n }, 150)\n }\n }\n\n window.addEventListener('popstate', handlePopState)\n return () => window.removeEventListener('popstate', handlePopState)\n }, [normalizedBaseRoute, folderIndexFile])\n\n useEffect(() => {\n if (!isInitialized) {\n // Kick off the speculative content fetch IN PARALLEL with the structure\n // fetch — the two endpoints are independent and most landing pages have\n // a root README (the default folder-index). If the structure ends up\n // pointing at a different path (e.g. knowledge-base falls back to the\n // first-folder README because there's no root README), the content\n // useEffect issues the correct fetch after structure arrives — the\n // speculative result silently no-ops (the content state update gets\n // overwritten by the targeted fetch).\n const speculativeContentPath = cleanInitialPath || folderIndexFile\n lastFetchedPath.current = speculativeContentPath\n fetchContent(speculativeContentPath)\n fetchStructure()\n setIsInitialized(true)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isInitialized])\n\n useEffect(() => {\n if (selectedPath === null || selectedPath === undefined) return\n if (!structure || structure.length === 0) return\n\n let pathToFetch: string | null = null\n\n if (selectedPath === '') {\n pathToFetch = folderIndexFile\n } else {\n const node = findDocNodeByPath(selectedPath, structure)\n\n if (node && node.type === 'folder' && !node.hasReadme) {\n return\n }\n\n pathToFetch = selectedPath\n if (node && node.type === 'folder' && node.hasReadme) {\n pathToFetch = `${selectedPath}/${folderIndexFile}`\n }\n }\n\n if (pathToFetch === lastFetchedPath.current) {\n return\n }\n\n if (pathToFetch) {\n lastFetchedPath.current = pathToFetch\n fetchContent(pathToFetch)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedPath, structure, folderIndexFile])\n\n const fetchStructure = async () => {\n try {\n setIsLoadingStructure(true)\n setError(null)\n\n const response = await fetch(structureEndpoint)\n\n if (!response.ok) {\n throw new Error('Failed to load documentation structure')\n }\n\n const result = await response.json()\n\n if (result.success && result.data) {\n setStructure(result.data)\n\n if (cleanInitialPath) {\n const pathForExpansion = cleanInitialPath.includes('.')\n ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf('/'))\n : cleanInitialPath\n if (pathForExpansion) {\n setExpandedNodes(new Set(getDocAncestorNodeIds(pathForExpansion)))\n }\n } else if (result.data.length > 0) {\n const hasRootReadme = result.data.some(\n (node: DocNode) => node.type === 'file' && node.path === folderIndexFile\n )\n\n if (!hasRootReadme) {\n const firstNode = result.data[0]\n if (firstNode.type === 'folder') {\n setExpandedNodes(new Set([firstNode.id]))\n if (firstNode.hasReadme) {\n setSelectedPath(firstNode.path)\n window.history.replaceState({}, '', `${normalizedBaseRoute}/${firstNode.path}`)\n }\n }\n }\n }\n } else {\n setError('Failed to load documentation structure')\n }\n } catch (err) {\n console.error('Error fetching documentation structure:', err)\n setError(err instanceof Error ? err.message : 'Failed to load documentation')\n } finally {\n setIsLoadingStructure(false)\n }\n }\n\n const fetchContent = async (path: string) => {\n try {\n setIsLoadingContent(true)\n // Don't clear `error` here — if a previous fetch set an error and this\n // is a stale/speculative call that gets superseded, the guard below\n // returns early without writing to state. Clearing error here would\n // briefly flicker the user-visible error message.\n\n const response = await fetch(`${contentEndpoint}?path=${encodeURIComponent(path)}`)\n\n // Request-id guard: between awaits, `lastFetchedPath.current` may have\n // been bumped by a newer fetch (the structure-arrives auto-select issues\n // a more-targeted fetch while the speculative one is in flight). Bail\n // BEFORE writing to state — otherwise the late 404 of the speculative\n // fetch overwrites the targeted fetch's good content with null.\n if (path !== lastFetchedPath.current) return\n\n if (!response.ok) {\n if (response.status === 404) {\n const result = await response.json().catch(() => ({}))\n if (path !== lastFetchedPath.current) return\n // Landing-page silent fallback: when the user lands on the source's\n // root URL and there's no root `README.md` (knowledge-base case),\n // the speculative fetch 404s — surface an empty state instead of\n // an error banner. The structure-arrives auto-select will fire\n // a targeted fetch for the first-folder README on the next render.\n if (path === folderIndexFile && selectedPath === '') {\n setError(null)\n setContent(null)\n return\n }\n setError(result.error || 'Documentation file not found')\n setContent(null)\n return\n }\n throw new Error('Failed to load documentation content')\n }\n\n const result = await response.json()\n if (path !== lastFetchedPath.current) return\n setError(null)\n\n if (result.success && result.data) {\n if (result.redirect && result.correctPath !== undefined) {\n const correctedPath = result.correctPath\n setSelectedPath(correctedPath)\n window.history.replaceState({}, '', `${normalizedBaseRoute}/${correctedPath}`)\n setContent(result.data)\n } else {\n setContent(result.data)\n }\n } else {\n setError(result.error || 'Failed to load content')\n setContent(null)\n }\n } catch (err) {\n if (path !== lastFetchedPath.current) return\n console.error('Error fetching documentation content:', err)\n setError(err instanceof Error ? err.message : 'Failed to load content')\n setContent(null)\n } finally {\n // Only clear loading state if THIS fetch is still the active one — a\n // superseded speculative shouldn't flip the spinner off while the\n // targeted fetch is still in flight.\n if (path === lastFetchedPath.current) setIsLoadingContent(false)\n }\n }\n\n const toggleNode = useCallback((nodeId: string) => {\n setExpandedNodes(prev => {\n const next = new Set(prev)\n if (next.has(nodeId)) {\n next.delete(nodeId)\n } else {\n next.add(nodeId)\n }\n return next\n })\n }, [])\n\n // Structural minimum the body uses — `id`, `path`, `type`, `hasReadme`.\n // Widening from `DocNode` lets the navigation components (which carry the\n // narrower `NavigationNode` row shape) pass their own node back without the\n // cross-type `as` cast. Both DocNode and NavigationNode satisfy this.\n const selectNode = useCallback((node: Pick<DocNode, 'id' | 'path' | 'type' | 'hasReadme'>) => {\n if (node.type === 'folder') {\n setExpandedNodes(prev => {\n if (prev.has(node.id)) {\n const ancestorIds = getDocAncestorNodeIds(node.path)\n ancestorIds.pop()\n return new Set(ancestorIds)\n } else {\n return new Set(getDocAncestorNodeIds(node.path))\n }\n })\n\n if (node.hasReadme) {\n lastFetchedPath.current = null\n setSelectedPath(node.path)\n window.history.pushState({}, '', `${normalizedBaseRoute}/${node.path}`)\n setTimeout(() => {\n scrollToContent()\n }, 150)\n } else {\n setSelectedPath(node.path)\n }\n } else {\n const lastSlash = node.path.lastIndexOf('/')\n if (lastSlash > 0) {\n const parentPath = node.path.substring(0, lastSlash)\n setExpandedNodes(new Set(getDocAncestorNodeIds(parentPath)))\n }\n\n lastFetchedPath.current = null\n setSelectedPath(node.path)\n window.history.pushState({}, '', `${normalizedBaseRoute}/${node.path}`)\n setTimeout(() => {\n scrollToContent()\n }, 150)\n }\n }, [normalizedBaseRoute])\n\n const navigateToDoc = useCallback((path: string, options?: { expandFolder?: boolean; fromInternalLink?: boolean }) => {\n const hashIndex = path.indexOf('#')\n const anchor = hashIndex !== -1 ? path.substring(hashIndex) : ''\n const cleanPath = path.replace(/\\/$/, '').split('#')[0]\n\n const scrollAfterNav = () => {\n if (anchor) {\n setTimeout(() => {\n const el = document.getElementById(anchor.substring(1))\n if (el) {\n scrollElementIntoView(el, { headerOffset: 80 })\n } else {\n scrollToContent()\n }\n }, 300)\n } else {\n setTimeout(() => {\n scrollToContent()\n }, 150)\n }\n }\n\n if (options?.expandFolder) {\n lastFetchedPath.current = null\n setSelectedPath(cleanPath)\n window.history.pushState({}, '', `${normalizedBaseRoute}/${cleanPath}${anchor}`)\n\n const pathParts = cleanPath.split('/')\n const nodeIdsToExpand: string[] = []\n let currentPath = ''\n\n for (const part of pathParts) {\n currentPath = currentPath ? `${currentPath}-${part}` : part\n nodeIdsToExpand.push(currentPath.toLowerCase())\n }\n\n setExpandedNodes(new Set(nodeIdsToExpand))\n\n if (options?.fromInternalLink) {\n scrollAfterNav()\n }\n\n setError(null)\n return\n }\n\n const pathForSelection = stripFolderIndexFromPath(cleanPath, folderIndexFile)\n const urlPath = pathForSelection\n\n lastFetchedPath.current = null\n setSelectedPath(pathForSelection)\n window.history.pushState({}, '', `${normalizedBaseRoute}/${urlPath}${anchor}`)\n\n if (options?.fromInternalLink) {\n scrollAfterNav()\n }\n\n const pathParts = cleanPath.split('/')\n const parentIds: string[] = []\n let currentPath = ''\n const partsToProcess = cleanPath.includes('.') ? pathParts.slice(0, -1) : pathParts\n\n for (const part of partsToProcess) {\n currentPath = currentPath ? `${currentPath}-${part}` : part\n parentIds.push(currentPath.toLowerCase())\n }\n\n if (parentIds.length > 0) {\n setExpandedNodes(new Set(parentIds))\n }\n }, [structure, normalizedBaseRoute, folderIndexFile])\n\n useEffect(() => {\n return docNavigation.register({\n baseRoute: normalizedBaseRoute,\n findNodeByPath: (path) => {\n const clean = stripFolderIndexFromPath(path.replace(/\\/$/, '').split('#')[0], folderIndexFile)\n return findDocNodeByPath(clean, structure) ?? null\n },\n selectNode,\n })\n }, [docNavigation, normalizedBaseRoute, structure, selectNode, folderIndexFile])\n\n return {\n structure,\n selectedPath,\n setSelectedPath,\n content,\n isLoadingStructure,\n isLoadingContent,\n error,\n expandedNodes,\n toggleNode,\n selectNode,\n navigateToDoc,\n refetch: fetchStructure,\n setExpandedNodes,\n }\n}\n\nexport type { DocNode, DocContent }\n","\"use client\"\n\nimport React, { createContext, useCallback, useContext, useRef, type ReactNode } from 'react'\nimport type { DocNode } from '../../types/doc-source'\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport interface DocNavigator {\n /** Base route this navigator owns (e.g., '/knowledge-base', '/data-room'). */\n baseRoute: string\n /** Look up a node in the tree by its storage path (e.g., 'openframe-cli/README.md'). */\n findNodeByPath: (path: string) => DocNode | null\n /** Navigate to a node using the same flow as a sidebar menu click. */\n selectNode: (node: DocNode) => void\n}\n\ninterface DocNavigationContextValue {\n /**\n * Register a navigator for a `baseRoute`. Returns a cleanup function that\n * removes the navigator from the map IF the slot still owns it (StrictMode-safe).\n * Duplicate registration for the same baseRoute logs a console.warn and replaces.\n */\n register: (nav: DocNavigator) => () => void\n /**\n * Navigate to a path inside whichever registered navigator owns its baseRoute prefix.\n * Returns true if handled, false otherwise (caller falls back to opening in a new tab).\n */\n navigate: (path: string) => boolean\n /** Whether ANY navigator is currently mounted. */\n isAvailable: () => boolean\n}\n\n// =============================================================================\n// Context\n// =============================================================================\n\nconst DocNavigationContext = createContext<DocNavigationContextValue | null>(null)\n\n/**\n * Bridges `useDocumentTree` instances (deep in the page tree) to `GlobalAskAI`\n * (high up near the root) without global events or URL parsing.\n *\n * Multi-navigator design: a `Map<baseRoute, DocNavigator>` lets multiple\n * viewers coexist (nested viewers, dual-pane scenarios). Today only one\n * viewer mounts at a time, so behavior is unchanged.\n */\nexport function DocNavigationProvider({ children }: { children: ReactNode }) {\n const navMap = useRef<Map<string, DocNavigator>>(new Map())\n\n const register = useCallback((nav: DocNavigator) => {\n const existing = navMap.current.get(nav.baseRoute)\n if (existing && existing !== nav) {\n // eslint-disable-next-line no-console\n console.warn(\n `[DocNavigationContext] duplicate registration for ${nav.baseRoute}; replacing`,\n )\n }\n navMap.current.set(nav.baseRoute, nav)\n return () => {\n // StrictMode-safe identity check: only delete if THIS nav still owns the slot.\n if (navMap.current.get(nav.baseRoute) === nav) {\n navMap.current.delete(nav.baseRoute)\n }\n }\n }, [])\n\n const findOwningNavigator = useCallback((path: string): DocNavigator | null => {\n // First try: a navigator whose baseRoute is a prefix of `path`. Walks the\n // longest match first so nested routes win over a parent.\n const baseRoutes = Array.from(navMap.current.keys()).sort((a, b) => b.length - a.length)\n for (const baseRoute of baseRoutes) {\n if (path === baseRoute || path.startsWith(`${baseRoute}/`)) {\n return navMap.current.get(baseRoute) ?? null\n }\n }\n // Fallback: a single navigator handles any path (existing behavior — chat\n // chips emit storage paths, not absolute URLs, so prefix matching misses).\n if (navMap.current.size === 1) {\n return navMap.current.values().next().value ?? null\n }\n return null\n }, [])\n\n const navigate = useCallback(\n (path: string): boolean => {\n const nav = findOwningNavigator(path)\n if (!nav) return false\n const node = nav.findNodeByPath(path)\n if (!node) return false\n nav.selectNode(node)\n return true\n },\n [findOwningNavigator],\n )\n\n const isAvailable = useCallback(() => navMap.current.size > 0, [])\n\n const value = React.useMemo(\n () => ({ register, navigate, isAvailable }),\n [register, navigate, isAvailable],\n )\n\n return <DocNavigationContext.Provider value={value}>{children}</DocNavigationContext.Provider>\n}\n\n// =============================================================================\n// Hooks\n// =============================================================================\n\nexport function useDocNavigation(): DocNavigationContextValue {\n const ctx = useContext(DocNavigationContext)\n if (!ctx) {\n // Safe no-op fallback when used outside the provider.\n return {\n register: () => () => {},\n navigate: () => false,\n isAvailable: () => false,\n }\n }\n return ctx\n}\n","\"use client\"\n\nimport { useState, useRef, useCallback, useEffect, useMemo } from \"react\"\nimport { scrollElementIntoView } from \"../../utils/scroll-into-view\"\n\n// Single source for the sticky-chrome height. Used for BOTH the scroll target\n// offset (where a clicked section lands) AND the active-section detection\n// threshold (where the scroll listener flips highlight). They must match —\n// previously 100 vs 150 caused a 50px window where the indicator jumped to\n// the next section even though that section's top was still below the\n// clicked one's resting offset.\nconst SCROLL_OFFSET = 100\n\ninterface ScrollSpySection {\n id: string\n title?: string\n level?: number\n}\n\ninterface UseScrollSpyReturn {\n activeSection: string\n handleSectionClick: (sectionId: string) => void\n}\n\n/**\n * Shared scroll spy hook for tracking active section based on scroll position.\n * Used by DocViewer for sticky section navigation.\n */\nexport function useScrollSpy(sections: ScrollSpySection[] | undefined): UseScrollSpyReturn {\n const [activeSection, setActiveSection] = useState(\"\")\n const isScrollingFromClick = useRef(false)\n\n const sectionIds = useMemo(\n () => sections?.map(s => s.id).join(',') ?? '',\n [sections]\n )\n const stableSections = useRef(sections)\n if (sectionIds !== (stableSections.current?.map(s => s.id).join(',') ?? '')) {\n stableSections.current = sections\n }\n\n const handleSectionClick = useCallback((sectionId: string) => {\n const targetElement = document.getElementById(sectionId)\n if (!targetElement) return\n\n isScrollingFromClick.current = true\n setActiveSection(sectionId)\n\n scrollElementIntoView(targetElement, { headerOffset: SCROLL_OFFSET })\n\n setTimeout(() => {\n isScrollingFromClick.current = false\n }, 800)\n }, [])\n\n useEffect(() => {\n const currentSections = stableSections.current\n if (!currentSections || currentSections.length === 0) return\n\n const handleScroll = () => {\n if (isScrollingFromClick.current) return\n\n const scrollPosition = window.scrollY + SCROLL_OFFSET\n let currentSection = currentSections[0]?.id || \"\"\n\n for (let i = currentSections.length - 1; i >= 0; i--) {\n const element = document.getElementById(currentSections[i].id)\n if (element && scrollPosition >= element.offsetTop) {\n currentSection = currentSections[i].id\n break\n }\n }\n\n setActiveSection((prev) => (prev !== currentSection ? currentSection : prev))\n }\n\n let scrollTimer: ReturnType<typeof setTimeout>\n const throttledScroll = () => {\n clearTimeout(scrollTimer)\n scrollTimer = setTimeout(handleScroll, 100)\n }\n\n window.addEventListener(\"scroll\", throttledScroll)\n handleScroll()\n\n return () => {\n window.removeEventListener(\"scroll\", throttledScroll)\n clearTimeout(scrollTimer)\n }\n }, [sectionIds])\n\n return { activeSection, handleSectionClick }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-5KD3S25X.cjs","../src/utils/platform-config.tsx","../src/types/tool.types.ts","../src/utils/access-code-client.ts","../src/utils/humanity-signals.ts"],"names":[],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACNA,2CAAsB;AAMT,+CAAA;AADN,IAAM,cAAA,EAAgB;AAAA,EAC3B,SAAA,kBAAW,6BAAA,+BAAC,EAAA,EAAc,SAAA,EAAU,SAAA,EAAU,cAAA,EAAe,SAAA,EAAU,cAAA,EAAe,UAAA,CAAU,CAAA;AAAA,EAChG,OAAA,kBAAS,6BAAA,6BAAC,EAAA,EAAY,SAAA,EAAU,UAAA,CAAU,CAAA;AAAA,EAC1C,QAAA,kBAAU,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,SAAA,EAAU,IAAA,EAAK,UAAA,CAAU,CAAA;AAAA,EAC3D,iBAAA,kBAAmB,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,SAAA,EAAU,IAAA,EAAK,UAAA,CAAU,CAAA;AAAA,EACpE,eAAA,kBAAiB,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,SAAA,EAAU,IAAA,EAAK,UAAA,CAAU,CAAA;AAAA,EAClE,aAAA,kBAAe,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,SAAA,EAAU,IAAA,EAAK,UAAA,CAAU,CAAA;AAAA,EAChE,aAAA,kBAAe,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,SAAA,EAAU,IAAA,EAAK,UAAA,CAAU,CAAA;AAAA,EAChE,YAAA,kBAAc,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,SAAA,EAAU,IAAA,EAAK,UAAA,CAAU,CAAA;AAAA,EAC/D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B0C;AACpC,EAAA;AACiD,IAAA;AACzC,MAAA;AACC,MAAA;AACS,QAAA;AAClB,MAAA;AAC4D,MAAA;AAC7D,IAAA;AAEiB,IAAA;AACoC,MAAA;AACrB,MAAA;AACjC,IAAA;AAE2B,IAAA;AACb,EAAA;AACP,IAAA;AACI,MAAA;AACC,MAAA;AACwC,MAAA;AACpD,IAAA;AACF,EAAA;AACF;AAyBE;AAGyD,EAAA;AAElC,EAAA;AACd,IAAA;AACT,EAAA;AAGyD,EAAA;AAElD,EAAA;AACF,IAAA;AACmB,IAAA;AAEI,IAAA;AAE5B,EAAA;AACF;AHgG6D;AACA;AIrP/B;AAEE;AAEG;AASmE;AAChF,EAAA;AACU,EAAA;AAKoB,EAAA;AAClB,EAAA;AACsB,EAAA;AACzB,EAAA;AAC/B;AAOqG;AACxC,EAAA;AACH,EAAA;AACF,EAAA;AACpC,EAAA;AACpB;AAIqC;AJgOwB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-5KD3S25X.cjs","sourcesContent":[null,"import React from 'react';\nimport { OpenmspLogo, FlamingoLogo, OpenFrameLogo, MiamiCyberGangLogoFaceOnly } from '../components/icons';\nimport { Globe } from 'lucide-react';\nimport type { SelectableOption } from '../components/features';\nimport type { PlatformConfig } from '../types/platform';\n\n// Platform icons mapping with consistent colors matching app theme\nexport const platformIcons = {\n openframe: <OpenFrameLogo className=\"h-5 w-5\" lowerPathColor=\"#FFC008\" upperPathColor=\"#ffffff\" />,\n openmsp: <OpenmspLogo className=\"h-5 w-5\" />,\n flamingo: <FlamingoLogo className=\"h-5 w-5\" fill=\"#EC4899\" />,\n 'flamingo-teaser': <FlamingoLogo className=\"h-5 w-5\" fill=\"#EC4899\" />,\n 'marketing-hub': <FlamingoLogo className=\"h-5 w-5\" fill=\"#F357BB\" />,\n 'product-hub': <FlamingoLogo className=\"h-5 w-5\" fill=\"#5EA62E\" />,\n 'revenue-hub': <FlamingoLogo className=\"h-5 w-5\" fill=\"#FFC008\" />,\n 'people-hub': <FlamingoLogo className=\"h-5 w-5\" fill=\"#5EFAF0\" />,\n 'company-hub': <FlamingoLogo className=\"h-5 w-5\" fill=\"#f36666\" />,\n tmcg: <MiamiCyberGangLogoFaceOnly className=\"h-5 w-5\" />,\n universal: <Globe className=\"h-5 w-5 text-[#10B981]\" />\n};\n\n// Platform colors mapping\nexport const platformColors = {\n openmsp: 'bg-[#3B82F6]',\n openframe: 'bg-[#8B5CF6]',\n flamingo: 'bg-[#EC4899]',\n 'flamingo-teaser': 'bg-[#F59E0B]',\n 'marketing-hub': 'bg-[#F357BB]',\n 'product-hub': 'bg-[#5EA62E]',\n 'revenue-hub': 'bg-[#FFC008]',\n 'people-hub': 'bg-[#5EFAF0]',\n 'company-hub': 'bg-[#f36666]',\n tmcg: 'bg-[#FF6B6B]',\n universal: 'bg-[#10B981]'\n};\n\n// Platform display names for consistent naming across the app\nexport const platformDisplayNames = {\n openmsp: 'OpenMSP',\n openframe: 'OpenFrame',\n flamingo: 'Flamingo',\n 'flamingo-teaser': 'Flamingo Teaser',\n 'marketing-hub': 'Flamingo Marketing Hub',\n 'product-hub': 'Flamingo Product Hub',\n 'revenue-hub': 'Flamingo Revenue Hub',\n 'people-hub': 'Flamingo People Hub',\n 'company-hub': 'Flamingo Company Hub',\n tmcg: 'TMCG',\n universal: 'Universal'\n};\n\n// Platform descriptions for consistent messaging across the app\nexport const platformDescriptions = {\n openmsp: 'Comprehensive directory and comparison platform for managed service providers (MSPs) and technology vendors. Reduce vendor costs and discover open-source alternatives.',\n openframe: 'AI-driven open-source security operations center (SOC) and endpoint detection platform for MSPs.',\n flamingo: 'AI-driven open-source OS for MSPs. Swap bloated vendor tools for open ones. Automate the boring crap. Take your margin back.',\n 'flamingo-teaser': 'Preview of Flamingo - the AI-driven open-source OS for MSPs.',\n tmcg: 'The Miami Cyber Gang - A cybersecurity community focused on education and collaboration.',\n universal: 'Cross-platform universal content.'\n};\n\n// Platform slogans for branding consistency\nexport const platformSlogans = {\n openmsp: 'Find Your Perfect MSP Partner',\n openframe: 'Open-Source Security Operations',\n flamingo: 'Open-Source OS for MSPs',\n 'flamingo-teaser': 'Coming Soon: Open-Source OS for MSPs',\n tmcg: 'Miami Cyber Community',\n universal: 'Universal Platform'\n};\n\n// Platform hex colors for default configuration\nexport const platformHexColors = {\n openmsp: '#FFC008',\n openframe: '#FFC008',\n flamingo: '#FF6B9D',\n universal: '#FFC008',\n 'flamingo-teaser': '#F59E0B',\n 'marketing-hub': '#F357BB',\n 'product-hub': '#5EA62E',\n 'revenue-hub': '#FFC008',\n 'people-hub': '#5EFAF0',\n 'company-hub': '#f36666',\n tmcg: '#FF6B6B'\n};\n\n// Platform icon names for default configuration\nexport const platformIconNames = {\n openmsp: 'openmsp-logo',\n openframe: 'openframe-logo',\n flamingo: 'flamingo-logo',\n universal: 'globe',\n 'flamingo-teaser': 'flamingo-logo',\n 'marketing-hub': 'flamingo-logo',\n 'product-hub': 'flamingo-logo',\n 'revenue-hub': 'flamingo-logo',\n 'people-hub': 'flamingo-logo',\n 'company-hub': 'flamingo-logo',\n tmcg: 'tmcg-logo'\n};\n\n/**\n * Get default color for platform\n */\nexport function getDefaultColorForPlatform(platformName: string): string {\n return platformHexColors[platformName as keyof typeof platformHexColors] || platformHexColors.universal;\n}\n\n/**\n * Get default icon name for platform\n */\nexport function getDefaultIconForPlatform(platformName: string): string {\n return platformIconNames[platformName as keyof typeof platformIconNames] || platformIconNames.universal;\n}\n\nexport function transformPlatformConfigsToOptions(platformConfigs: PlatformConfig[]): SelectableOption[] {\n return platformConfigs.map((platform: PlatformConfig) => ({\n id: platform.id, // Database UUID for matching\n name: platform.name, // Platform name enum\n displayName: platform.display_name, // Human-readable name\n description: platform.description,\n icon: platformIcons[platform.name as keyof typeof platformIcons] || platformIcons.universal,\n color: platformColors[platform.name as keyof typeof platformColors] || platformColors.universal\n }));\n}\n\n/**\n * Get platform icon by name\n */\nexport function getPlatformIcon(platformName: string) {\n return platformIcons[platformName as keyof typeof platformIcons] || platformIcons.universal;\n}\n\n/**\n * Get platform color by name\n */\nexport function getPlatformColor(platformName: string) {\n return platformColors[platformName as keyof typeof platformColors] || platformColors.universal;\n}\n\n/**\n * Get platform display name by name\n */\nexport function getPlatformDisplayName(platformName: string): string {\n return platformDisplayNames[platformName as keyof typeof platformDisplayNames] || platformName;\n}\n\n/**\n * Get platform description by name\n */\nexport function getPlatformDescription(platformName: string): string {\n return platformDescriptions[platformName as keyof typeof platformDescriptions] || platformName;\n}\n\n/**\n * Get platform slogan by name\n */\nexport function getPlatformSlogan(platformName: string): string {\n return platformSlogans[platformName as keyof typeof platformSlogans] || platformName;\n}\n\n/**\n * Get small platform icon for filter buttons with white colors (4x4 size)\n */\nexport function getSmallPlatformIcon(platformName: string): React.ReactNode {\n const className = \"h-4 w-4 flex-shrink-0\";\n\n switch (platformName) {\n case 'openframe':\n return <OpenFrameLogo className={className} lowerPathColor=\"#FFC008\" upperPathColor=\"#ffffff\" />;\n case 'openmsp':\n return <OpenmspLogo className={className} frontBubbleColor=\"#f1f1f1\" innerFrontBubbleColor=\"#000000\" backBubbleColor=\"#FFC008\" />;\n case 'flamingo':\n case 'flamingo-teaser':\n return <FlamingoLogo className={`${className}`} fill=\"#EC4899\" />;\n case 'marketing-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-flamingo-pink-base)\" />;\n case 'product-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-attention-green-success)\" />;\n case 'revenue-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-attention-yellow-warning)\" />;\n case 'people-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-flamingo-cyan-base)\" />;\n case 'company-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-attention-red-error)\" />;\n case 'tmcg':\n return <MiamiCyberGangLogoFaceOnly className={className} />;\n case 'universal':\n default:\n return <Globe className={className} />;\n }\n}\n\n/**\n * Get platform icon for admin/selector components (standard 6x6 size)\n */\nexport function getPlatformIconComponent(platformName: string, className: string = \"h-6 w-6\"): React.ReactNode {\n switch (platformName) {\n case 'openframe':\n return <OpenFrameLogo className={className} />;\n case 'openmsp':\n return <OpenmspLogo className={className} color=\"#f1f1f1\" />;\n case 'flamingo':\n case 'flamingo-teaser':\n return <FlamingoLogo className={`${className} text-white`} />;\n case 'marketing-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-flamingo-pink-base)\" />;\n case 'product-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-attention-green-success)\" />;\n case 'revenue-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-attention-yellow-warning)\" />;\n case 'people-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-flamingo-cyan-base)\" />;\n case 'company-hub':\n return <FlamingoLogo className={className} fill=\"var(--ods-attention-red-error)\" />;\n case 'tmcg':\n return <MiamiCyberGangLogoFaceOnly size={24} className={className} />;\n case 'universal':\n default:\n return <Globe className={className} />;\n }\n}","/**\n * Centralized Tool Types\n *\n * Single source of truth for all tool-related types across the entire platform.\n * Used by ToolBadge, ToolIcon, and any component that needs tool type information.\n */\n\nexport const ToolTypeValues = {\n TACTICAL_RMM: 'TACTICAL_RMM',\n FLEET_MDM: 'FLEET_MDM',\n MESHCENTRAL: 'MESHCENTRAL',\n AUTHENTIK: 'AUTHENTIK',\n OPENFRAME: 'OPENFRAME',\n OPENFRAME_CHAT: 'OPENFRAME_CHAT',\n OPENFRAME_CLIENT: 'OPENFRAME_CLIENT',\n OSQUERY: 'OSQUERY',\n SYSTEM: 'SYSTEM'\n} as const\n\nexport type ToolType = (typeof ToolTypeValues)[keyof typeof ToolTypeValues]\n\n/**\n * Maps tool types to display labels\n */\nexport const toolLabels: Record<ToolType, string> = {\n TACTICAL_RMM: 'Tactical',\n FLEET_MDM: 'Fleet',\n MESHCENTRAL: 'MeshCentral',\n AUTHENTIK: 'Authentik',\n OPENFRAME: 'OpenFrame',\n OPENFRAME_CHAT: 'OpenFrame Chat',\n OPENFRAME_CLIENT: 'OpenFrame Client',\n OSQUERY: 'Osquery',\n SYSTEM: 'System'\n}\n","/**\n * Access Code Client Utilities — pure standalone functions.\n *\n * Endpoint paths are NOT hardcoded — every function takes an\n * `endpoints` argument. The React-side wrapper that binds them from\n * `EndpointsRuntimeContext` lives separately at\n * `hooks/use-access-code-integration.ts` (`useAccessCodeIntegration`).\n *\n * Keep this file **free of React imports** — it lives in the\n * server-safe `utils/index` tsup bundle. Any module-top-level call\n * into `createContext()` (which the runtime context file does) would\n * be pulled into the server bundle and crash SSR with\n * `createContext is not a function`.\n */\n\nimport {\n AccessCodeValidation,\n AccessCodeValidationResponse,\n AccessCodeConsumptionResponse\n} from '../types/access-code-cohorts';\n\n/** Endpoints required by the standalone client utilities. The\n * `useAccessCodeIntegration` hook (in `hooks/`) resolves these from\n * `EndpointsRuntimeContext.accessCode` automatically. */\nexport interface AccessCodeEndpoints {\n validateUrl: string\n consumeUrl: string\n}\n\n/**\n * Validate an access code for a given email\n *\n * @param email - User's email address\n * @param code - Access code to validate\n * @returns Promise with validation result\n *\n * @example\n * const result = await validateAccessCode('user@example.com', 'ABC123XY');\n * if (result.valid) {\n * // Allow user to proceed with registration\n * console.log(`Welcome to ${result.cohort_name}!`);\n * } else {\n * // Show error message\n * console.error(result.message);\n * }\n */\nexport async function validateAccessCode(\n email: string,\n code: string,\n endpoints: AccessCodeEndpoints,\n): Promise<AccessCodeValidationResponse> {\n try {\n const response = await fetch(endpoints.validateUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ email, code } as AccessCodeValidation),\n });\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({}));\n throw new Error(error.error || 'Validation request failed');\n }\n\n return await response.json() as AccessCodeValidationResponse;\n } catch (error) {\n return {\n valid: false,\n message: error instanceof Error ? error.message : 'Validation failed',\n };\n }\n}\n\n/**\n * Consume an access code after successful registration\n *\n * Call this ONLY after the user has successfully completed registration.\n * This marks the code as used and prevents further usage.\n *\n * @param email - User's email address\n * @param code - Access code to consume\n * @returns Promise with consumption result\n *\n * @example\n * // After successful registration\n * const result = await consumeAccessCode('user@example.com', 'ABC123XY');\n * if (result.consumed) {\n * console.log('Access code consumed successfully');\n * } else {\n * console.warn('Failed to consume access code:', result.message);\n * }\n */\nexport async function consumeAccessCode(\n email: string,\n code: string,\n endpoints: AccessCodeEndpoints,\n): Promise<AccessCodeConsumptionResponse> {\n try {\n const response = await fetch(endpoints.consumeUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ email, code } as AccessCodeValidation),\n });\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({}));\n throw new Error(error.error || 'Consumption request failed');\n }\n\n return await response.json() as AccessCodeConsumptionResponse;\n } catch (error) {\n return {\n success: false,\n consumed: false,\n message: error instanceof Error ? error.message : 'Consumption failed',\n };\n }\n}\n\n/**\n * Complete access code flow: validate then consume\n *\n * This is a convenience function that validates an access code and,\n * if valid, immediately consumes it. Use this when you want to\n * validate and consume in one step during registration.\n *\n * @param email - User's email address\n * @param code - Access code to validate and consume\n * @returns Promise with validation and consumption results\n *\n * @example\n * const result = await validateAndConsumeAccessCode('user@example.com', 'ABC123XY');\n * if (result.valid && result.consumed) {\n * // Registration successful\n * console.log(`Welcome to ${result.cohort_name}!`);\n * } else {\n * console.error(result.message);\n * }\n */\nexport async function validateAndConsumeAccessCode(\n email: string,\n code: string,\n endpoints: AccessCodeEndpoints,\n): Promise<AccessCodeValidationResponse & { consumed?: boolean }> {\n // First validate\n const validation = await validateAccessCode(email, code, endpoints);\n\n if (!validation.valid) {\n return validation;\n }\n\n // If valid, consume the code\n const consumption = await consumeAccessCode(email, code, endpoints);\n\n return {\n ...validation,\n consumed: consumption.consumed,\n message: consumption.consumed\n ? `Access granted for ${validation.cohort_name}`\n : consumption.message || validation.message,\n };\n}\n\n// `useAccessCodeIntegration` (the React-side wrapper) lives in\n// `hooks/use-access-code-integration.ts`. It binds the endpoints from\n// `EndpointsRuntimeContext` so React callers don't have to plumb URLs.\n","/**\n * Humanity signals — invisible bot-protection primitives shared by the lib's\n * public forms (client) and the hub's per-route `verifyHuman` gate (server).\n *\n * PURE + React-free on purpose: this module is a tsup SERVER entry (no\n * \"use client\" banner) so the hub can import it server-side without pulling a\n * client-reference boundary — same pattern as `schemas/contact-schema` and\n * `components/features/mux-origins`.\n *\n * Two origin-independent signals travel in the POST body: a honeypot (a hidden\n * field real users never fill) and timing (ms from form mount to submit).\n * `evaluateHumanitySignals` is the SINGLE source of truth for the block/allow\n * decision — the hub imports + calls it rather than re-implementing the rules.\n */\n\n/** Hidden honeypot field name. Innocuous + autofill-resistant (deliberately NOT name/email). */\nexport const HONEYPOT_FIELD = 'contact_url_confirm'\n/** Client-measured ms between form mount and submit. */\nexport const ELAPSED_MS_FIELD = 'form_elapsed_ms'\n/** Default minimum fill time (ms). A submit faster than this is treated as a bot. */\nexport const DEFAULT_MIN_FILL_MS = 700\n\n/** Keyed wire object produced by `useHumanitySignals().getSignals()` and spread into the POST body. */\nexport type HumanitySignals = Record<string, string | number>\n\n/** Result of {@link evaluateHumanitySignals}. */\nexport type HumanityVerdict = { ok: true } | { ok: false; reason: 'honeypot' | 'too_fast' }\n\n/** Tolerant reader — never throws; missing/garbage timing → null. */\nexport function extractHumanitySignals(body: unknown): { honeypot: string; elapsedMs: number | null } {\n const b = (body ?? {}) as Record<string, unknown>\n const rawHp = b[HONEYPOT_FIELD]\n // A legit client always sends a STRING here (getSignals → ref.value ?? ''),\n // so ANY present non-string value is a bot filling the decoy with a non-string\n // to dodge the empty-check — coerce to a (non-empty) string so it still trips.\n // null/undefined → '' = the correct \"field absent / unfilled\" allow case.\n const honeypot = rawHp == null ? '' : String(rawHp)\n const rawMs = b[ELAPSED_MS_FIELD]\n const elapsedMs = typeof rawMs === 'number' && Number.isFinite(rawMs) ? rawMs : null\n return { honeypot, elapsedMs }\n}\n\n/**\n * SINGLE decision fn for honeypot + timing (the hub's `verifyHuman` imports + calls this):\n * - honeypot non-empty → bot (real users never fill the off-screen field)\n * - elapsed below `minFillMs` → bot (humans take time; a MISSING timing value never blocks)\n */\nexport function evaluateHumanitySignals(body: unknown, opts: { minFillMs: number }): HumanityVerdict {\n const { honeypot, elapsedMs } = extractHumanitySignals(body)\n if (honeypot.trim() !== '') return { ok: false, reason: 'honeypot' }\n if (elapsedMs !== null && elapsedMs < opts.minFillMs) return { ok: false, reason: 'too_fast' }\n return { ok: true }\n}\n\n/** Parse a comma-separated env string → trimmed, non-empty entries (undefined → []). */\nexport const splitCsvEnv = (s?: string): string[] =>\n s?.split(',').map((t) => t.trim()).filter(Boolean) ?? []\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-6BWZFRUG.cjs","../src/components/faq/faq-section.tsx","../src/components/faq-accordion.tsx","../src/components/faq/json-ld.ts","../src/components/faq/faq-document-page.tsx"],"names":["jsx","jsxs"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;AC7BA,8BAAiE;AD+BjE;AACA;AEhCA;AAEA,uCAAA,CAAA;AAoEY,+CAAA;AArDZ,IAAM,kBAAA,EAAoB,CAAC,MAAA,EAAA,GAAoB;AAC7C,EAAA,MAAM,IAAA,EAAM,2BAAA,IAAkC,CAAA;AAC9C,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,EAAA,EA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AA;AAAA,IAAA;AACU,MAAA;AACT,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AAAA,IAAA;AAGN,EAAA;AAEJ;AJiToB;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-6BWZFRUG.cjs","sourcesContent":[null,"\"use client\"\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport type { Faq } from '../../types/faq'\nimport { FaqAccordion, type FaqItem } from '../faq-accordion'\nimport { useSelfFetch } from '../../hooks/use-self-fetch'\nimport { buildSuggestionUrl } from '../../utils/suggestion-url'\nimport { serializeJsonLd } from '../../utils/common'\nimport { scrollElementIntoView } from '../../utils/scroll-into-view'\nimport { faqSectionSlug, faqItemAnchor, parseFaqHash, type FaqHashTarget } from '../../utils/faq-anchor'\nimport { cn } from '../../utils/cn'\nimport { buildFaqJsonLdFromFaqs, type FaqSchemaOptions } from './json-ld'\nimport { SECTION_HEADING_CLASS } from '../layout/page-heading'\n\nexport interface FaqSectionProps {\n /**\n * SSR hydrate. When provided, the hook skips the first client fetch (per\n * useSelfFetch contract). The consuming server page resolves FAQs then drills\n * them into this prop — the lib never re-fetches what the host already gated on.\n */\n initialFaqs?: Faq[]\n /** Both required together for entity-attached FAQs; partial → bare /api/faqs. */\n entityType?: string\n entityId?: number | string\n /**\n * Heading node above the grouped list. `undefined` → default\n * `<h2>`\"Frequently Asked Questions\". `null` → no heading (the host page\n * owns the `<h1>`, as the standalone /faqs surface does). A React node lets a\n * platform drill its own <PageHeading> without the lib referencing platform\n * state. Also drives category nesting so the document outline stays correct:\n * `null` → categories render `<h2>` (directly under the page `<h1>`);\n * otherwise categories render `<h3>` beneath this heading.\n */\n heading?: React.ReactNode | null\n /** Inject FAQPage schema.org JSON-LD as a <script>. Off by default so embeds\n * don't emit duplicate schema. */\n emitJsonLd?: boolean\n /** Overrides for the JSON-LD's name/description/url. */\n jsonLd?: FaqSchemaOptions\n className?: string\n /** Maps to /api/faqs `?count=` (the 5-tier fill target). Absent → param\n * not sent (server default applies). */\n minResults?: number\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin relative). */\n apiBaseUrl?: string\n}\n\nconst DEFAULT_HEADING_TEXT = 'Frequently Asked Questions'\n\n/** URL composition shared with RelatedContentSection (`buildSuggestionUrl`)\n * — byte-identical to the historical `buildFaqsUrl` output when\n * `minResults`/`apiBaseUrl` are absent. */\nfunction buildFaqsUrl(\n entityType?: string,\n entityId?: number | string,\n minResults?: number,\n apiBaseUrl = '',\n): string {\n return buildSuggestionUrl('/api/faqs', { apiBaseUrl, entityType, entityId, count: minResults })\n}\n\ninterface FaqGroup {\n /** null → the uncategorized bucket: no heading, no jump pill, rendered last. */\n section: string | null\n slug: string | null\n items: FaqItem[]\n}\n\n/** Group FAQs by `faq.section`, preserving the server's first-seen\n * (display_order) order for BOTH the section order and the rows within each\n * section. The uncategorized bucket (blank/missing section) sinks to the end\n * since it renders without a heading. Items carry NO badge here — the `<h2>`\n * IS the category, so a per-row chip would be redundant. */\nfunction groupFaqsBySection(faqs: Faq[]): FaqGroup[] {\n const order: string[] = []\n const byName = new Map<string, FaqGroup>()\n let uncategorized: FaqGroup | null = null\n for (const faq of faqs) {\n const item: FaqItem = { id: faq.id, question: faq.question, answer: faq.answer }\n const name = faq.section?.trim()\n if (!name) {\n if (!uncategorized) uncategorized = { section: null, slug: null, items: [] }\n uncategorized.items.push(item)\n continue\n }\n let group = byName.get(name)\n if (!group) {\n group = { section: name, slug: faqSectionSlug(name), items: [] }\n byName.set(name, group)\n order.push(name)\n }\n group.items.push(item)\n }\n const groups = order.map((name) => byName.get(name)!)\n if (uncategorized) groups.push(uncategorized)\n return groups\n}\n\n/** The standard hub sticky-header height — same offset `useNavLink`'s hash\n * scroll uses, so a category jump lands below the header, not under it. */\nconst FAQ_NAV_HEADER_OFFSET = 96\n\n/** Map key for the uncategorized bucket — `group.slug` is null for it, so\n * every per-group map (default-open ids, accordion keys) uses this sentinel\n * to keep the lookup typed. */\nconst UNCATEGORIZED_KEY = '__uncategorized__'\nconst groupKey = (g: FaqGroup): string => g.slug ?? UNCATEGORIZED_KEY\n\n/**\n * Grouped FAQ layout: a category jump-nav above stacked `<h2>` category\n * sections (each its own accordion). Isolated into its own component so the\n * scroll-spy hooks only mount in grouped mode — `FaqSection`'s own hooks stay\n * unconditional.\n *\n * The pills are real `<a href=\"#slug\">` anchors (crawlable in-page links,\n * deep-linkable, work without JS); the click handler upgrades the jump to the\n * cancellation-proof `scrollElementIntoView` tween and syncs the URL hash.\n */\nfunction GroupedFaqList({\n groups,\n categoryHeadingAs,\n}: {\n groups: FaqGroup[]\n /** Heading tag for each category, so the document outline nests correctly\n * under whatever owns the heading above this block: `h2` on the standalone\n * page (the page owns the `<h1>`), `h3` beneath an embed's `<h2>` title.\n * The VISUAL is `SECTION_HEADING_CLASS` either way, so categories look\n * identical on every surface. */\n categoryHeadingAs: 'h2' | 'h3'\n}) {\n const CategoryHeading = categoryHeadingAs\n const navGroups = useMemo(() => groups.filter((g) => g.slug), [groups])\n const [activeSlug, setActiveSlug] = useState<string | null>(navGroups[0]?.slug ?? null)\n // Identity-stable key for the section set so the observer re-binds only when\n // the categories actually change (not on every parent re-render).\n const slugKey = navGroups.map((g) => g.slug).join('|')\n\n // Scroll-spy: mark the pill for the category currently at the top of the\n // viewport. rootMargin drops the trigger line just below the sticky header\n // and ignores the bottom ~55% so \"active\" is the section being read, not the\n // next one peeking in.\n useEffect(() => {\n if (navGroups.length < 2) return\n const tops = new Map<string, number>()\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n const id = (entry.target as HTMLElement).id\n if (entry.isIntersecting) tops.set(id, entry.boundingClientRect.top)\n else tops.delete(id)\n }\n let bestId: string | null = null\n let bestTop = Number.POSITIVE_INFINITY\n for (const [id, top] of tops) {\n if (top < bestTop) {\n bestTop = top\n bestId = id\n }\n }\n if (bestId) setActiveSlug(bestId)\n },\n { rootMargin: `-${FAQ_NAV_HEADER_OFFSET}px 0px -55% 0px`, threshold: 0 },\n )\n for (const group of navGroups) {\n const el = group.slug ? document.getElementById(group.slug) : null\n if (el) observer.observe(el)\n }\n return () => observer.disconnect()\n // slugKey encodes the section set; re-observe only when it changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [slugKey])\n\n // ─── Hash dispatch — `/faqs#faq-item-<id>` or `/faqs#faq-<section-slug>` ──\n // Tracks the current hash so:\n // 1. an item-kind hash seeds `defaultOpenIds` on the matching accordion\n // (auto-expands the cited question);\n // 2. either kind triggers the cancellation-proof tween scroll with the\n // sticky-header offset (native browser hash scroll runs once, ignores\n // our offset — re-running the tween puts the target in the right spot).\n // Listens to `hashchange` so back/forward replays the same behavior. SSR-\n // safe: initial null state matches the server render; the first effect\n // tick on the client updates it.\n const [hashTarget, setHashTarget] = useState<FaqHashTarget | null>(null)\n useEffect(() => {\n const refresh = () => setHashTarget(parseFaqHash(window.location.hash))\n refresh()\n window.addEventListener('hashchange', refresh)\n return () => window.removeEventListener('hashchange', refresh)\n }, [])\n\n // Per-group default-open set when the hash points at an item. The map key\n // matches `groupKey(group)` so the render-time lookup is O(1) per group.\n const defaultOpenByGroupKey = useMemo(() => {\n if (hashTarget?.kind !== 'item') return null\n const targetId = hashTarget.rawId\n const result = new Map<string, (string | number)[]>()\n for (const group of groups) {\n const hit = group.items.find((i) => String(i.id) === targetId)\n if (hit) result.set(groupKey(group), [hit.id])\n }\n return result.size > 0 ? result : null\n }, [groups, hashTarget])\n\n // Accordion is uncontrolled — `defaultOpenIds` is only consumed at mount,\n // so a new item hash needs a remount to honor it. Keying off the item-id\n // suffix triggers exactly the remount we need (and stays stable when the\n // hash points at a section, so category navigation never disturbs the\n // accordion's open state).\n const accordionKeySuffix =\n hashTarget?.kind === 'item' ? `item:${hashTarget.rawId}` : 'default'\n\n useEffect(() => {\n if (!hashTarget) return\n const elId =\n hashTarget.kind === 'item' ? faqItemAnchor(hashTarget.rawId) : hashTarget.slug\n const el = document.getElementById(elId)\n if (el) scrollElementIntoView(el, { headerOffset: FAQ_NAV_HEADER_OFFSET })\n if (hashTarget.kind === 'section') setActiveSlug(hashTarget.slug)\n }, [hashTarget])\n\n const handleJump = useCallback(\n (e: React.MouseEvent<HTMLAnchorElement>, slug: string) => {\n e.preventDefault()\n setActiveSlug(slug)\n scrollElementIntoView(document.getElementById(slug), {\n headerOffset: FAQ_NAV_HEADER_OFFSET,\n })\n if (typeof history !== 'undefined') history.replaceState(null, '', `#${slug}`)\n },\n [],\n )\n\n return (\n <div className=\"space-y-8\">\n {navGroups.length > 1 && (\n <nav aria-label=\"FAQ categories\" className=\"flex flex-wrap gap-2\">\n {navGroups.map((group) => {\n const isActive = group.slug === activeSlug\n return (\n <a\n key={group.slug}\n href={`#${group.slug}`}\n aria-current={isActive ? 'true' : undefined}\n onClick={(e) => handleJump(e, group.slug as string)}\n className={cn(\n \"rounded-full border px-4 py-2 text-sm font-medium font-['DM_Sans'] transition-colors\",\n isActive\n ? 'border-ods-text-primary bg-ods-card text-ods-text-primary'\n : 'border-ods-border bg-ods-card text-ods-text-secondary hover:border-ods-text-secondary hover:text-ods-text-primary',\n )}\n >\n {group.section}\n </a>\n )\n })}\n </nav>\n )}\n <div className=\"space-y-10\">\n {groups.map((group) => {\n const key = groupKey(group)\n return (\n <section\n key={key}\n id={group.slug ?? undefined}\n className=\"scroll-mt-24 space-y-4\"\n >\n {group.section && (\n <CategoryHeading className={SECTION_HEADING_CLASS}>{group.section}</CategoryHeading>\n )}\n <FaqAccordion\n // Re-key on item-hash changes so the remount picks up the new\n // `defaultOpenIds` (the accordion is uncontrolled). Stable for\n // section hashes — category navigation doesn't disturb state.\n key={`${key}:${accordionKeySuffix}`}\n items={group.items}\n defaultOpenIds={defaultOpenByGroupKey?.get(key)}\n />\n </section>\n )\n })}\n </div>\n </div>\n )\n}\n\nfunction FaqSkeleton() {\n return (\n <div className=\"space-y-8 animate-pulse\">\n <div className=\"h-12 md:h-14 w-2/3 rounded bg-ods-border\" />\n <div className=\"rounded-3xl border border-ods-border overflow-hidden bg-ods-card divide-y divide-ods-border w-full\">\n {Array.from({ length: 8 }).map((_, idx) => (\n <div key={idx} className=\"flex items-center justify-between px-6 md:px-8 py-6\">\n <div className=\"h-6 w-5/6 rounded bg-ods-border\" />\n <div className=\"h-10 w-10 rounded-md bg-ods-border\" />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\ninterface FaqsResponse {\n faqs: Faq[]\n}\n\n/**\n * The FAQ display surface — ONE rendering on every host: the list grouped by\n * `faq.section` (each category a heading + its own accordion, with a category\n * jump-nav once there are 2+ categories). There is no flat/ungrouped mode and\n * no page-vs-embedded shell fork; the standalone /faqs page and every embed\n * render through this single path, so they cannot drift.\n *\n * - Standalone /faqs page: pass `initialFaqs` (SSR) + `heading={null}` (the\n * page owns the <h1>) + `emitJsonLd` with `jsonLd` overrides for SEO.\n * - Per-entity embed: pass `entityType` + `entityId` (no `initialFaqs`); the\n * hook self-fetches `GET /api/faqs`, and `heading` is this block's own <h2>.\n *\n * CONTRACT: the consuming app MUST implement `GET /api/faqs`. On a fetch error\n * (or zero FAQs) the component renders nothing so the host page isn't\n * disfigured. The host always supplies the page shell — this renders a bare\n * <section>.\n */\nexport function FaqSection({\n initialFaqs,\n entityType,\n entityId,\n heading,\n emitJsonLd = false,\n jsonLd,\n className,\n minResults,\n apiBaseUrl = '',\n}: FaqSectionProps) {\n const url = buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl)\n // Memoized — useSelfFetch re-syncs on [initialData]; a fresh per-render\n // wrapper object would setState-loop under re-rendering parents.\n const initialData = useMemo<FaqsResponse | undefined>(\n () => (initialFaqs ? { faqs: initialFaqs } : undefined),\n [initialFaqs],\n )\n const { data, isLoading, error } = useSelfFetch<FaqsResponse>(url, { initialData })\n\n const faqs = data?.faqs ?? []\n // Grouped before the early returns so the hook order stays stable.\n const groups = useMemo(() => (faqs.length > 0 ? groupFaqsBySection(faqs) : []), [faqs])\n\n // `undefined` → default <h2> title; `null` → the host page owns the <h1>, so\n // no title renders here. `heading === null` also makes the category headings\n // <h2> (directly under the page <h1>); otherwise they nest as <h3>.\n const headingNode =\n heading === undefined ? <h2 className={SECTION_HEADING_CLASS}>{DEFAULT_HEADING_TEXT}</h2> : heading\n\n // Degrade silently — never show an error banner or an empty section shell\n // where FAQs would be (host pages and the standalone surface both rely on it).\n if (error) return null\n if (!isLoading && faqs.length === 0) return null\n if (isLoading && faqs.length === 0) {\n return (\n <div className={className}>\n <FaqSkeleton />\n </div>\n )\n }\n\n const schema = emitJsonLd ? buildFaqJsonLdFromFaqs(faqs, jsonLd) : null\n\n return (\n <>\n <section className={className ?? 'space-y-10'}>\n {headingNode}\n <GroupedFaqList groups={groups} categoryHeadingAs={heading === null ? 'h2' : 'h3'} />\n </section>\n {schema && (\n <script\n type=\"application/ld+json\"\n // eslint-disable-next-line react/no-danger\n // serializeJsonLd, NOT raw JSON.stringify — FAQ answers are\n // admin-entered; an embedded \"</script>\" must not break the tag.\n dangerouslySetInnerHTML={{ __html: serializeJsonLd(schema) }}\n />\n )}\n </>\n )\n}\n","\"use client\"\n\nimport React, { useRef, useState, useEffect, useCallback } from 'react'\nimport { ChevronButton } from './ui/chevron-button'\nimport { cn } from \"../utils/cn\"\nimport { faqItemAnchor } from \"../utils/faq-anchor\"\n\nexport interface FaqItem {\n id: number | string\n question: string\n answer: string\n}\n\ninterface FaqAccordionProps {\n items: FaqItem[]\n defaultOpenIds?: (number | string)[]\n}\n\n// Utility to measure scrollHeight outside render cycle\nconst useMeasuredHeight = (isOpen: boolean) => {\n const ref = useRef<HTMLDivElement | null>(null)\n const [maxHeight, setMaxHeight] = useState<string>('0px')\n\n const measure = useCallback(() => {\n if (ref.current) {\n const height = ref.current.scrollHeight\n setMaxHeight(`${height}px`)\n }\n }, [])\n\n // Update height only when section is open\n useEffect(() => {\n if (isOpen) {\n measure()\n } else {\n setMaxHeight('0px')\n }\n }, [isOpen, measure])\n\n return { ref, maxHeight }\n}\n\nexport function FaqAccordion({ items, defaultOpenIds = [] }: FaqAccordionProps) {\n const [openSet, setOpenSet] = useState<Set<string | number>>(new Set(defaultOpenIds))\n\n const toggle = (id: string | number) => {\n setOpenSet(prev => {\n const next = new Set(prev)\n if (next.has(id)) next.delete(id)\n else next.add(id)\n return next\n })\n }\n\n return (\n <div className=\"rounded-3xl border border-ods-border divide-y divide-ods-border bg-ods-card overflow-hidden\">\n {items.map(item => {\n const isOpen = openSet.has(item.id)\n const { ref, maxHeight } = useMeasuredHeight(isOpen)\n\n return (\n <div\n key={item.id}\n // Per-row anchor — chat citation chips (`/faqs#faq-item-<id>`) land\n // here via native browser hash scroll AND via `FaqSection`'s tween\n // dispatch. `scroll-mt-24` keeps the row header below the 96px\n // sticky nav offset (matches `<section>`'s scroll-margin for\n // category anchors).\n id={faqItemAnchor(item.id)}\n className={cn('group scroll-mt-24 transition-colors hover:bg-[#1E1E1E]', isOpen ? 'bg-ods-bg' : 'bg-transparent')}\n >\n {/* Header */}\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => toggle(item.id)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n toggle(item.id);\n }\n }}\n aria-expanded={isOpen}\n className=\"flex w-full items-center justify-between px-6 md:px-8 py-6 text-left focus:outline-none transition-colors cursor-pointer\"\n >\n <div className=\"min-w-0 pr-4\">\n <h3>\n {item.question}\n </h3>\n </div>\n <div className=\"flex-shrink-0\">\n <ChevronButton\n aria-label={isOpen ? 'Collapse question' : 'Expand question'}\n size=\"md\"\n isExpanded={isOpen}\n backgroundColor=\"transparent\"\n borderColor=\"#3A3A3A\"\n />\n </div>\n </div>\n {/* Content wrapper with max-height animation */}\n <div\n style={{ maxHeight, transition: 'max-height 0.35s ease-in-out, opacity 0.35s ease-in-out', opacity: isOpen ? 1 : 0 }}\n className=\"overflow-hidden group-hover:bg-[#1E1E1E]/30\"\n >\n <div ref={ref} className=\"px-6 md:px-8 pb-6 text-ods-text-primary text-h4\">\n {item.answer}\n </div>\n </div>\n </div>\n )\n })}\n </div>\n )\n} ","/**\n * Pure FAQ JSON-LD builder. No React, no client-only deps — safe to import from\n * Server Components via the `./components/faq` subpath export. (Do NOT import\n * through the root `./components` barrel — that barrel is `\"use client\"` and\n * dragging it into a Server Component would force the client graph into the\n * server.)\n *\n * The hub used to harcode `name`/`description` here for OpenMSP; in the lib we\n * accept overrides so every embedder can supply its own platform branding.\n */\nimport type { Faq } from '../../types/faq'\n\nexport interface FaqSchemaOptions {\n name?: string\n description?: string\n url?: string\n}\n\nconst DEFAULT_NAME = 'Frequently Asked Questions'\nconst DEFAULT_DESCRIPTION =\n 'Answers to common questions.'\n\nexport function baseFaqSchema(opts: FaqSchemaOptions = {}) {\n return {\n '@context': 'https://schema.org',\n '@type': 'FAQPage',\n name: opts.name ?? DEFAULT_NAME,\n description: opts.description ?? DEFAULT_DESCRIPTION,\n ...(opts.url ? { url: opts.url } : {}),\n } as const\n}\n\nexport function buildFaqJsonLdFromFaqs(faqs: Faq[], opts: FaqSchemaOptions = {}) {\n return {\n ...baseFaqSchema(opts),\n mainEntity: faqs.map((faq) => ({\n '@type': 'Question',\n name: faq.question,\n acceptedAnswer: {\n '@type': 'Answer',\n text: faq.answer,\n },\n })),\n } as const\n}\n","'use client';\n\n/**\n * FaqDocumentPage — the full `/faqs` page with chrome, so embedders drop in\n * ONE component instead of hand-assembling `PageShell` + `PageLayout` around the\n * bare `<FaqSection>`. Mirrors `LegalDocumentPage` / `DevSectionPage`: the\n * page-level layout lives in the lib, the host passes only config + a back button.\n *\n * `<FaqSection heading={null}>` lets `PageLayout`'s `TitleBlock` own the heading +\n * back button; it self-fetches `${apiBaseUrl}/api/faqs` via the authed\n * `useSelfFetch`, and renders nothing on a fetch error or zero FAQs.\n */\n\nimport { PageShell, PageLayout } from '../ui';\nimport { useRouter } from '../../embed-shims/next-navigation';\nimport { FaqSection } from './faq-section';\n\nexport interface FaqDocumentPageProps {\n /** Page title (PageLayout TitleBlock). Default \"FAQs\". */\n title?: string;\n /** Subtitle under the title. */\n subtitle?: string;\n /** Back-button config — same pattern as `DevSectionPage` / `LegalDocumentPage`.\n * Pass `false` to hide. Default `{ label: 'Back to home', href: '/' }`. */\n backButton?: { label?: string; href?: string } | false;\n /** Base URL `FaqSection` appends `/api/faqs` to (reverse-proxy embedders). */\n apiBaseUrl?: string;\n /** Optional entity scoping forwarded to `FaqSection`. */\n entityType?: string;\n entityId?: number | string;\n /** Minimum FAQ count before the section renders (forwarded to `FaqSection`). */\n minResults?: number;\n}\n\nexport function FaqDocumentPage({\n title = 'FAQs',\n subtitle,\n backButton,\n apiBaseUrl,\n entityType,\n entityId,\n minResults,\n}: FaqDocumentPageProps) {\n const router = useRouter();\n\n // Back-button config — mirrors LegalDocumentPage/DevSectionPage. Hide entirely\n // when the caller passes `false` (embed-mode where the host owns nav chrome).\n const backCfg =\n backButton === false\n ? undefined\n : {\n label: backButton?.label ?? 'Back to home',\n onClick: () => router.push(backButton?.href ?? '/'),\n };\n\n return (\n <PageShell>\n <PageLayout title={title} subtitle={subtitle} backButton={backCfg}>\n <FaqSection\n heading={null}\n apiBaseUrl={apiBaseUrl}\n entityType={entityType}\n entityId={entityId}\n minResults={minResults}\n />\n </PageLayout>\n </PageShell>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/faq/faq-section.tsx","../src/components/faq-accordion.tsx","../src/components/faq/json-ld.ts","../src/components/faq/faq-document-page.tsx"],"sourcesContent":["\"use client\"\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport type { Faq } from '../../types/faq'\nimport { FaqAccordion, type FaqItem } from '../faq-accordion'\nimport { useSelfFetch } from '../../hooks/use-self-fetch'\nimport { buildSuggestionUrl } from '../../utils/suggestion-url'\nimport { serializeJsonLd } from '../../utils/common'\nimport { scrollElementIntoView } from '../../utils/scroll-into-view'\nimport { faqSectionSlug, faqItemAnchor, parseFaqHash, type FaqHashTarget } from '../../utils/faq-anchor'\nimport { cn } from '../../utils/cn'\nimport { buildFaqJsonLdFromFaqs, type FaqSchemaOptions } from './json-ld'\nimport { SECTION_HEADING_CLASS } from '../layout/page-heading'\n\nexport interface FaqSectionProps {\n /**\n * SSR hydrate. When provided, the hook skips the first client fetch (per\n * useSelfFetch contract). The consuming server page resolves FAQs then drills\n * them into this prop — the lib never re-fetches what the host already gated on.\n */\n initialFaqs?: Faq[]\n /** Both required together for entity-attached FAQs; partial → bare /api/faqs. */\n entityType?: string\n entityId?: number | string\n /**\n * Heading node above the grouped list. `undefined` → default\n * `<h2>`\"Frequently Asked Questions\". `null` → no heading (the host page\n * owns the `<h1>`, as the standalone /faqs surface does). A React node lets a\n * platform drill its own <PageHeading> without the lib referencing platform\n * state. Also drives category nesting so the document outline stays correct:\n * `null` → categories render `<h2>` (directly under the page `<h1>`);\n * otherwise categories render `<h3>` beneath this heading.\n */\n heading?: React.ReactNode | null\n /** Inject FAQPage schema.org JSON-LD as a <script>. Off by default so embeds\n * don't emit duplicate schema. */\n emitJsonLd?: boolean\n /** Overrides for the JSON-LD's name/description/url. */\n jsonLd?: FaqSchemaOptions\n className?: string\n /** Maps to /api/faqs `?count=` (the 5-tier fill target). Absent → param\n * not sent (server default applies). */\n minResults?: number\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin relative). */\n apiBaseUrl?: string\n}\n\nconst DEFAULT_HEADING_TEXT = 'Frequently Asked Questions'\n\n/** URL composition shared with RelatedContentSection (`buildSuggestionUrl`)\n * — byte-identical to the historical `buildFaqsUrl` output when\n * `minResults`/`apiBaseUrl` are absent. */\nfunction buildFaqsUrl(\n entityType?: string,\n entityId?: number | string,\n minResults?: number,\n apiBaseUrl = '',\n): string {\n return buildSuggestionUrl('/api/faqs', { apiBaseUrl, entityType, entityId, count: minResults })\n}\n\ninterface FaqGroup {\n /** null → the uncategorized bucket: no heading, no jump pill, rendered last. */\n section: string | null\n slug: string | null\n items: FaqItem[]\n}\n\n/** Group FAQs by `faq.section`, preserving the server's first-seen\n * (display_order) order for BOTH the section order and the rows within each\n * section. The uncategorized bucket (blank/missing section) sinks to the end\n * since it renders without a heading. Items carry NO badge here — the `<h2>`\n * IS the category, so a per-row chip would be redundant. */\nfunction groupFaqsBySection(faqs: Faq[]): FaqGroup[] {\n const order: string[] = []\n const byName = new Map<string, FaqGroup>()\n let uncategorized: FaqGroup | null = null\n for (const faq of faqs) {\n const item: FaqItem = { id: faq.id, question: faq.question, answer: faq.answer }\n const name = faq.section?.trim()\n if (!name) {\n if (!uncategorized) uncategorized = { section: null, slug: null, items: [] }\n uncategorized.items.push(item)\n continue\n }\n let group = byName.get(name)\n if (!group) {\n group = { section: name, slug: faqSectionSlug(name), items: [] }\n byName.set(name, group)\n order.push(name)\n }\n group.items.push(item)\n }\n const groups = order.map((name) => byName.get(name)!)\n if (uncategorized) groups.push(uncategorized)\n return groups\n}\n\n/** The standard hub sticky-header height — same offset `useNavLink`'s hash\n * scroll uses, so a category jump lands below the header, not under it. */\nconst FAQ_NAV_HEADER_OFFSET = 96\n\n/** Map key for the uncategorized bucket — `group.slug` is null for it, so\n * every per-group map (default-open ids, accordion keys) uses this sentinel\n * to keep the lookup typed. */\nconst UNCATEGORIZED_KEY = '__uncategorized__'\nconst groupKey = (g: FaqGroup): string => g.slug ?? UNCATEGORIZED_KEY\n\n/**\n * Grouped FAQ layout: a category jump-nav above stacked `<h2>` category\n * sections (each its own accordion). Isolated into its own component so the\n * scroll-spy hooks only mount in grouped mode — `FaqSection`'s own hooks stay\n * unconditional.\n *\n * The pills are real `<a href=\"#slug\">` anchors (crawlable in-page links,\n * deep-linkable, work without JS); the click handler upgrades the jump to the\n * cancellation-proof `scrollElementIntoView` tween and syncs the URL hash.\n */\nfunction GroupedFaqList({\n groups,\n categoryHeadingAs,\n}: {\n groups: FaqGroup[]\n /** Heading tag for each category, so the document outline nests correctly\n * under whatever owns the heading above this block: `h2` on the standalone\n * page (the page owns the `<h1>`), `h3` beneath an embed's `<h2>` title.\n * The VISUAL is `SECTION_HEADING_CLASS` either way, so categories look\n * identical on every surface. */\n categoryHeadingAs: 'h2' | 'h3'\n}) {\n const CategoryHeading = categoryHeadingAs\n const navGroups = useMemo(() => groups.filter((g) => g.slug), [groups])\n const [activeSlug, setActiveSlug] = useState<string | null>(navGroups[0]?.slug ?? null)\n // Identity-stable key for the section set so the observer re-binds only when\n // the categories actually change (not on every parent re-render).\n const slugKey = navGroups.map((g) => g.slug).join('|')\n\n // Scroll-spy: mark the pill for the category currently at the top of the\n // viewport. rootMargin drops the trigger line just below the sticky header\n // and ignores the bottom ~55% so \"active\" is the section being read, not the\n // next one peeking in.\n useEffect(() => {\n if (navGroups.length < 2) return\n const tops = new Map<string, number>()\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n const id = (entry.target as HTMLElement).id\n if (entry.isIntersecting) tops.set(id, entry.boundingClientRect.top)\n else tops.delete(id)\n }\n let bestId: string | null = null\n let bestTop = Number.POSITIVE_INFINITY\n for (const [id, top] of tops) {\n if (top < bestTop) {\n bestTop = top\n bestId = id\n }\n }\n if (bestId) setActiveSlug(bestId)\n },\n { rootMargin: `-${FAQ_NAV_HEADER_OFFSET}px 0px -55% 0px`, threshold: 0 },\n )\n for (const group of navGroups) {\n const el = group.slug ? document.getElementById(group.slug) : null\n if (el) observer.observe(el)\n }\n return () => observer.disconnect()\n // slugKey encodes the section set; re-observe only when it changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [slugKey])\n\n // ─── Hash dispatch — `/faqs#faq-item-<id>` or `/faqs#faq-<section-slug>` ──\n // Tracks the current hash so:\n // 1. an item-kind hash seeds `defaultOpenIds` on the matching accordion\n // (auto-expands the cited question);\n // 2. either kind triggers the cancellation-proof tween scroll with the\n // sticky-header offset (native browser hash scroll runs once, ignores\n // our offset — re-running the tween puts the target in the right spot).\n // Listens to `hashchange` so back/forward replays the same behavior. SSR-\n // safe: initial null state matches the server render; the first effect\n // tick on the client updates it.\n const [hashTarget, setHashTarget] = useState<FaqHashTarget | null>(null)\n useEffect(() => {\n const refresh = () => setHashTarget(parseFaqHash(window.location.hash))\n refresh()\n window.addEventListener('hashchange', refresh)\n return () => window.removeEventListener('hashchange', refresh)\n }, [])\n\n // Per-group default-open set when the hash points at an item. The map key\n // matches `groupKey(group)` so the render-time lookup is O(1) per group.\n const defaultOpenByGroupKey = useMemo(() => {\n if (hashTarget?.kind !== 'item') return null\n const targetId = hashTarget.rawId\n const result = new Map<string, (string | number)[]>()\n for (const group of groups) {\n const hit = group.items.find((i) => String(i.id) === targetId)\n if (hit) result.set(groupKey(group), [hit.id])\n }\n return result.size > 0 ? result : null\n }, [groups, hashTarget])\n\n // Accordion is uncontrolled — `defaultOpenIds` is only consumed at mount,\n // so a new item hash needs a remount to honor it. Keying off the item-id\n // suffix triggers exactly the remount we need (and stays stable when the\n // hash points at a section, so category navigation never disturbs the\n // accordion's open state).\n const accordionKeySuffix =\n hashTarget?.kind === 'item' ? `item:${hashTarget.rawId}` : 'default'\n\n useEffect(() => {\n if (!hashTarget) return\n const elId =\n hashTarget.kind === 'item' ? faqItemAnchor(hashTarget.rawId) : hashTarget.slug\n const el = document.getElementById(elId)\n if (el) scrollElementIntoView(el, { headerOffset: FAQ_NAV_HEADER_OFFSET })\n if (hashTarget.kind === 'section') setActiveSlug(hashTarget.slug)\n }, [hashTarget])\n\n const handleJump = useCallback(\n (e: React.MouseEvent<HTMLAnchorElement>, slug: string) => {\n e.preventDefault()\n setActiveSlug(slug)\n scrollElementIntoView(document.getElementById(slug), {\n headerOffset: FAQ_NAV_HEADER_OFFSET,\n })\n if (typeof history !== 'undefined') history.replaceState(null, '', `#${slug}`)\n },\n [],\n )\n\n return (\n <div className=\"space-y-8\">\n {navGroups.length > 1 && (\n <nav aria-label=\"FAQ categories\" className=\"flex flex-wrap gap-2\">\n {navGroups.map((group) => {\n const isActive = group.slug === activeSlug\n return (\n <a\n key={group.slug}\n href={`#${group.slug}`}\n aria-current={isActive ? 'true' : undefined}\n onClick={(e) => handleJump(e, group.slug as string)}\n className={cn(\n \"rounded-full border px-4 py-2 text-sm font-medium font-['DM_Sans'] transition-colors\",\n isActive\n ? 'border-ods-text-primary bg-ods-card text-ods-text-primary'\n : 'border-ods-border bg-ods-card text-ods-text-secondary hover:border-ods-text-secondary hover:text-ods-text-primary',\n )}\n >\n {group.section}\n </a>\n )\n })}\n </nav>\n )}\n <div className=\"space-y-10\">\n {groups.map((group) => {\n const key = groupKey(group)\n return (\n <section\n key={key}\n id={group.slug ?? undefined}\n className=\"scroll-mt-24 space-y-4\"\n >\n {group.section && (\n <CategoryHeading className={SECTION_HEADING_CLASS}>{group.section}</CategoryHeading>\n )}\n <FaqAccordion\n // Re-key on item-hash changes so the remount picks up the new\n // `defaultOpenIds` (the accordion is uncontrolled). Stable for\n // section hashes — category navigation doesn't disturb state.\n key={`${key}:${accordionKeySuffix}`}\n items={group.items}\n defaultOpenIds={defaultOpenByGroupKey?.get(key)}\n />\n </section>\n )\n })}\n </div>\n </div>\n )\n}\n\nfunction FaqSkeleton() {\n return (\n <div className=\"space-y-8 animate-pulse\">\n <div className=\"h-12 md:h-14 w-2/3 rounded bg-ods-border\" />\n <div className=\"rounded-3xl border border-ods-border overflow-hidden bg-ods-card divide-y divide-ods-border w-full\">\n {Array.from({ length: 8 }).map((_, idx) => (\n <div key={idx} className=\"flex items-center justify-between px-6 md:px-8 py-6\">\n <div className=\"h-6 w-5/6 rounded bg-ods-border\" />\n <div className=\"h-10 w-10 rounded-md bg-ods-border\" />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\ninterface FaqsResponse {\n faqs: Faq[]\n}\n\n/**\n * The FAQ display surface — ONE rendering on every host: the list grouped by\n * `faq.section` (each category a heading + its own accordion, with a category\n * jump-nav once there are 2+ categories). There is no flat/ungrouped mode and\n * no page-vs-embedded shell fork; the standalone /faqs page and every embed\n * render through this single path, so they cannot drift.\n *\n * - Standalone /faqs page: pass `initialFaqs` (SSR) + `heading={null}` (the\n * page owns the <h1>) + `emitJsonLd` with `jsonLd` overrides for SEO.\n * - Per-entity embed: pass `entityType` + `entityId` (no `initialFaqs`); the\n * hook self-fetches `GET /api/faqs`, and `heading` is this block's own <h2>.\n *\n * CONTRACT: the consuming app MUST implement `GET /api/faqs`. On a fetch error\n * (or zero FAQs) the component renders nothing so the host page isn't\n * disfigured. The host always supplies the page shell — this renders a bare\n * <section>.\n */\nexport function FaqSection({\n initialFaqs,\n entityType,\n entityId,\n heading,\n emitJsonLd = false,\n jsonLd,\n className,\n minResults,\n apiBaseUrl = '',\n}: FaqSectionProps) {\n const url = buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl)\n // Memoized — useSelfFetch re-syncs on [initialData]; a fresh per-render\n // wrapper object would setState-loop under re-rendering parents.\n const initialData = useMemo<FaqsResponse | undefined>(\n () => (initialFaqs ? { faqs: initialFaqs } : undefined),\n [initialFaqs],\n )\n const { data, isLoading, error } = useSelfFetch<FaqsResponse>(url, { initialData })\n\n const faqs = data?.faqs ?? []\n // Grouped before the early returns so the hook order stays stable.\n const groups = useMemo(() => (faqs.length > 0 ? groupFaqsBySection(faqs) : []), [faqs])\n\n // `undefined` → default <h2> title; `null` → the host page owns the <h1>, so\n // no title renders here. `heading === null` also makes the category headings\n // <h2> (directly under the page <h1>); otherwise they nest as <h3>.\n const headingNode =\n heading === undefined ? <h2 className={SECTION_HEADING_CLASS}>{DEFAULT_HEADING_TEXT}</h2> : heading\n\n // Degrade silently — never show an error banner or an empty section shell\n // where FAQs would be (host pages and the standalone surface both rely on it).\n if (error) return null\n if (!isLoading && faqs.length === 0) return null\n if (isLoading && faqs.length === 0) {\n return (\n <div className={className}>\n <FaqSkeleton />\n </div>\n )\n }\n\n const schema = emitJsonLd ? buildFaqJsonLdFromFaqs(faqs, jsonLd) : null\n\n return (\n <>\n <section className={className ?? 'space-y-10'}>\n {headingNode}\n <GroupedFaqList groups={groups} categoryHeadingAs={heading === null ? 'h2' : 'h3'} />\n </section>\n {schema && (\n <script\n type=\"application/ld+json\"\n // eslint-disable-next-line react/no-danger\n // serializeJsonLd, NOT raw JSON.stringify — FAQ answers are\n // admin-entered; an embedded \"</script>\" must not break the tag.\n dangerouslySetInnerHTML={{ __html: serializeJsonLd(schema) }}\n />\n )}\n </>\n )\n}\n","\"use client\"\n\nimport React, { useRef, useState, useEffect, useCallback } from 'react'\nimport { ChevronButton } from './ui/chevron-button'\nimport { cn } from \"../utils/cn\"\nimport { faqItemAnchor } from \"../utils/faq-anchor\"\n\nexport interface FaqItem {\n id: number | string\n question: string\n answer: string\n}\n\ninterface FaqAccordionProps {\n items: FaqItem[]\n defaultOpenIds?: (number | string)[]\n}\n\n// Utility to measure scrollHeight outside render cycle\nconst useMeasuredHeight = (isOpen: boolean) => {\n const ref = useRef<HTMLDivElement | null>(null)\n const [maxHeight, setMaxHeight] = useState<string>('0px')\n\n const measure = useCallback(() => {\n if (ref.current) {\n const height = ref.current.scrollHeight\n setMaxHeight(`${height}px`)\n }\n }, [])\n\n // Update height only when section is open\n useEffect(() => {\n if (isOpen) {\n measure()\n } else {\n setMaxHeight('0px')\n }\n }, [isOpen, measure])\n\n return { ref, maxHeight }\n}\n\nexport function FaqAccordion({ items, defaultOpenIds = [] }: FaqAccordionProps) {\n const [openSet, setOpenSet] = useState<Set<string | number>>(new Set(defaultOpenIds))\n\n const toggle = (id: string | number) => {\n setOpenSet(prev => {\n const next = new Set(prev)\n if (next.has(id)) next.delete(id)\n else next.add(id)\n return next\n })\n }\n\n return (\n <div className=\"rounded-3xl border border-ods-border divide-y divide-ods-border bg-ods-card overflow-hidden\">\n {items.map(item => {\n const isOpen = openSet.has(item.id)\n const { ref, maxHeight } = useMeasuredHeight(isOpen)\n\n return (\n <div\n key={item.id}\n // Per-row anchor — chat citation chips (`/faqs#faq-item-<id>`) land\n // here via native browser hash scroll AND via `FaqSection`'s tween\n // dispatch. `scroll-mt-24` keeps the row header below the 96px\n // sticky nav offset (matches `<section>`'s scroll-margin for\n // category anchors).\n id={faqItemAnchor(item.id)}\n className={cn('group scroll-mt-24 transition-colors hover:bg-[#1E1E1E]', isOpen ? 'bg-ods-bg' : 'bg-transparent')}\n >\n {/* Header */}\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => toggle(item.id)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n toggle(item.id);\n }\n }}\n aria-expanded={isOpen}\n className=\"flex w-full items-center justify-between px-6 md:px-8 py-6 text-left focus:outline-none transition-colors cursor-pointer\"\n >\n <div className=\"min-w-0 pr-4\">\n <h3>\n {item.question}\n </h3>\n </div>\n <div className=\"flex-shrink-0\">\n <ChevronButton\n aria-label={isOpen ? 'Collapse question' : 'Expand question'}\n size=\"md\"\n isExpanded={isOpen}\n backgroundColor=\"transparent\"\n borderColor=\"#3A3A3A\"\n />\n </div>\n </div>\n {/* Content wrapper with max-height animation */}\n <div\n style={{ maxHeight, transition: 'max-height 0.35s ease-in-out, opacity 0.35s ease-in-out', opacity: isOpen ? 1 : 0 }}\n className=\"overflow-hidden group-hover:bg-[#1E1E1E]/30\"\n >\n <div ref={ref} className=\"px-6 md:px-8 pb-6 text-ods-text-primary text-h4\">\n {item.answer}\n </div>\n </div>\n </div>\n )\n })}\n </div>\n )\n} ","/**\n * Pure FAQ JSON-LD builder. No React, no client-only deps — safe to import from\n * Server Components via the `./components/faq` subpath export. (Do NOT import\n * through the root `./components` barrel — that barrel is `\"use client\"` and\n * dragging it into a Server Component would force the client graph into the\n * server.)\n *\n * The hub used to harcode `name`/`description` here for OpenMSP; in the lib we\n * accept overrides so every embedder can supply its own platform branding.\n */\nimport type { Faq } from '../../types/faq'\n\nexport interface FaqSchemaOptions {\n name?: string\n description?: string\n url?: string\n}\n\nconst DEFAULT_NAME = 'Frequently Asked Questions'\nconst DEFAULT_DESCRIPTION =\n 'Answers to common questions.'\n\nexport function baseFaqSchema(opts: FaqSchemaOptions = {}) {\n return {\n '@context': 'https://schema.org',\n '@type': 'FAQPage',\n name: opts.name ?? DEFAULT_NAME,\n description: opts.description ?? DEFAULT_DESCRIPTION,\n ...(opts.url ? { url: opts.url } : {}),\n } as const\n}\n\nexport function buildFaqJsonLdFromFaqs(faqs: Faq[], opts: FaqSchemaOptions = {}) {\n return {\n ...baseFaqSchema(opts),\n mainEntity: faqs.map((faq) => ({\n '@type': 'Question',\n name: faq.question,\n acceptedAnswer: {\n '@type': 'Answer',\n text: faq.answer,\n },\n })),\n } as const\n}\n","'use client';\n\n/**\n * FaqDocumentPage — the full `/faqs` page with chrome, so embedders drop in\n * ONE component instead of hand-assembling `PageShell` + `PageLayout` around the\n * bare `<FaqSection>`. Mirrors `LegalDocumentPage` / `DevSectionPage`: the\n * page-level layout lives in the lib, the host passes only config + a back button.\n *\n * `<FaqSection heading={null}>` lets `PageLayout`'s `TitleBlock` own the heading +\n * back button; it self-fetches `${apiBaseUrl}/api/faqs` via the authed\n * `useSelfFetch`, and renders nothing on a fetch error or zero FAQs.\n */\n\nimport { PageShell, PageLayout } from '../ui';\nimport { useRouter } from '../../embed-shims/next-navigation';\nimport { FaqSection } from './faq-section';\n\nexport interface FaqDocumentPageProps {\n /** Page title (PageLayout TitleBlock). Default \"FAQs\". */\n title?: string;\n /** Subtitle under the title. */\n subtitle?: string;\n /** Back-button config — same pattern as `DevSectionPage` / `LegalDocumentPage`.\n * Pass `false` to hide. Default `{ label: 'Back to home', href: '/' }`. */\n backButton?: { label?: string; href?: string } | false;\n /** Base URL `FaqSection` appends `/api/faqs` to (reverse-proxy embedders). */\n apiBaseUrl?: string;\n /** Optional entity scoping forwarded to `FaqSection`. */\n entityType?: string;\n entityId?: number | string;\n /** Minimum FAQ count before the section renders (forwarded to `FaqSection`). */\n minResults?: number;\n}\n\nexport function FaqDocumentPage({\n title = 'FAQs',\n subtitle,\n backButton,\n apiBaseUrl,\n entityType,\n entityId,\n minResults,\n}: FaqDocumentPageProps) {\n const router = useRouter();\n\n // Back-button config — mirrors LegalDocumentPage/DevSectionPage. Hide entirely\n // when the caller passes `false` (embed-mode where the host owns nav chrome).\n const backCfg =\n backButton === false\n ? undefined\n : {\n label: backButton?.label ?? 'Back to home',\n onClick: () => router.push(backButton?.href ?? '/'),\n };\n\n return (\n <PageShell>\n <PageLayout title={title} subtitle={subtitle} backButton={backCfg}>\n <FaqSection\n heading={null}\n apiBaseUrl={apiBaseUrl}\n entityType={entityType}\n entityId={entityId}\n minResults={minResults}\n />\n </PageLayout>\n </PageShell>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAgB,eAAAA,cAAa,aAAAC,YAAW,SAAS,YAAAC,iBAAgB;;;ACAjE,SAAgB,QAAQ,UAAU,WAAW,mBAAmB;AAEhE;AAoEY,SAcI,KAdJ;AArDZ,IAAM,oBAAoB,CAAC,WAAoB;AAC7C,QAAM,MAAM,OAA8B,IAAI;AAC9C,QAAM,CAAC,WAAW,YAAY,IAAI,SAAiB,KAAK;AAExD,QAAM,UAAU,YAAY,MAAM;AAChC,QAAI,IAAI,SAAS;AACf,YAAM,SAAS,IAAI,QAAQ;AAC3B,mBAAa,GAAG,MAAM,IAAI;AAAA,IAC5B;AAAA,EACF,GAAG,CAAC,CAAC;AAGL,YAAU,MAAM;AACd,QAAI,QAAQ;AACV,cAAQ;AAAA,IACV,OAAO;AACL,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,QAAQ,OAAO,CAAC;AAEpB,SAAO,EAAE,KAAK,UAAU;AAC1B;AAEO,SAAS,aAAa,EAAE,OAAO,iBAAiB,CAAC,EAAE,GAAsB;AAC9E,QAAM,CAAC,SAAS,UAAU,IAAI,SAA+B,IAAI,IAAI,cAAc,CAAC;AAEpF,QAAM,SAAS,CAAC,OAAwB;AACtC,eAAW,UAAQ;AACjB,YAAM,OAAO,IAAI,IAAI,IAAI;AACzB,UAAI,KAAK,IAAI,EAAE,EAAG,MAAK,OAAO,EAAE;AAAA,UAC3B,MAAK,IAAI,E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