@flamingo-stack/openframe-frontend-core 0.0.617 → 0.0.618
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-CGCV4QT2.js → chunk-2DTZXXY3.js} +5 -5
- package/dist/{chunk-BJDQZH62.cjs → chunk-3FTNQDLP.cjs} +5 -5
- package/dist/{chunk-BJDQZH62.cjs.map → chunk-3FTNQDLP.cjs.map} +1 -1
- package/dist/{chunk-VJJ7LGOI.js → chunk-5P74E24M.js} +5 -5
- package/dist/{chunk-BLUL2TE3.js → chunk-6XJS3WU7.js} +2 -2
- package/dist/{chunk-QPAPUIF3.cjs → chunk-7ZEQMFP3.cjs} +30 -30
- package/dist/{chunk-QPAPUIF3.cjs.map → chunk-7ZEQMFP3.cjs.map} +1 -1
- package/dist/{chunk-UVK7AQAG.js → chunk-ANMD7SM4.js} +3 -3
- package/dist/{chunk-332JHI2D.cjs → chunk-BGDYSUA2.cjs} +11 -11
- package/dist/{chunk-332JHI2D.cjs.map → chunk-BGDYSUA2.cjs.map} +1 -1
- package/dist/{chunk-USP3UWID.cjs → chunk-BXNSKTEG.cjs} +57 -57
- package/dist/{chunk-USP3UWID.cjs.map → chunk-BXNSKTEG.cjs.map} +1 -1
- package/dist/{chunk-67XFJ442.cjs → chunk-CM6DNLK7.cjs} +521 -449
- package/dist/chunk-CM6DNLK7.cjs.map +1 -0
- package/dist/{chunk-7YHUP5BR.js → chunk-CWMKY2UJ.js} +3 -3
- package/dist/{chunk-UQEOAPAI.cjs → chunk-E2EGTHYA.cjs} +28 -12
- package/dist/chunk-E2EGTHYA.cjs.map +1 -0
- package/dist/{chunk-JZELYIFZ.cjs → chunk-E7VXPU3R.cjs} +33 -33
- package/dist/{chunk-JZELYIFZ.cjs.map → chunk-E7VXPU3R.cjs.map} +1 -1
- package/dist/{chunk-ULM5FCFN.cjs → chunk-EJGZIYC7.cjs} +6 -6
- package/dist/{chunk-ULM5FCFN.cjs.map → chunk-EJGZIYC7.cjs.map} +1 -1
- package/dist/{chunk-LFLJ3IHE.cjs → chunk-EXEXX34Q.cjs} +28 -28
- package/dist/{chunk-LFLJ3IHE.cjs.map → chunk-EXEXX34Q.cjs.map} +1 -1
- package/dist/{chunk-FP5WYJ3S.js → chunk-FCN2HN6Q.js} +2 -2
- package/dist/{chunk-2OJVGAGX.cjs → chunk-G7NEMLNW.cjs} +10 -10
- package/dist/{chunk-2OJVGAGX.cjs.map → chunk-G7NEMLNW.cjs.map} +1 -1
- package/dist/{chunk-GH4F4ODL.js → chunk-GD7CV2JI.js} +6 -6
- package/dist/{chunk-WFM5OAM6.js → chunk-GFWKEWEH.js} +4 -4
- package/dist/{chunk-RU3IKVY2.js → chunk-GXUGYZ6H.js} +27 -11
- package/dist/chunk-GXUGYZ6H.js.map +1 -0
- package/dist/{chunk-ZQOK4TCN.cjs → chunk-IDMEC4ZK.cjs} +22 -22
- package/dist/{chunk-ZQOK4TCN.cjs.map → chunk-IDMEC4ZK.cjs.map} +1 -1
- package/dist/{chunk-UVXMIZYK.js → chunk-IPHA3AQ6.js} +7 -7
- package/dist/{chunk-45OAW4M2.js → chunk-J25M43YI.js} +6 -6
- package/dist/{chunk-V23BJC2Q.cjs → chunk-K26VN65M.cjs} +15 -15
- package/dist/{chunk-V23BJC2Q.cjs.map → chunk-K26VN65M.cjs.map} +1 -1
- package/dist/{chunk-7FFKXXWY.cjs → chunk-MOC7JLEP.cjs} +80 -80
- package/dist/{chunk-7FFKXXWY.cjs.map → chunk-MOC7JLEP.cjs.map} +1 -1
- package/dist/{chunk-ZJYZOOTU.js → chunk-NUU5ZEEG.js} +4 -4
- package/dist/{chunk-VNNIRX23.cjs → chunk-PIJK3FV6.cjs} +3 -3
- package/dist/{chunk-VNNIRX23.cjs.map → chunk-PIJK3FV6.cjs.map} +1 -1
- package/dist/{chunk-HR6CHKD6.cjs → chunk-RDEFB354.cjs} +6 -6
- package/dist/{chunk-HR6CHKD6.cjs.map → chunk-RDEFB354.cjs.map} +1 -1
- package/dist/{chunk-7GLJC4EO.cjs → chunk-ROQTWRV7.cjs} +145 -145
- package/dist/{chunk-7GLJC4EO.cjs.map → chunk-ROQTWRV7.cjs.map} +1 -1
- package/dist/{chunk-6RMFEGJ4.js → chunk-RROIA6WY.js} +2 -2
- package/dist/{chunk-FMNS5NN2.cjs → chunk-U6B3MM4U.cjs} +20 -20
- package/dist/{chunk-FMNS5NN2.cjs.map → chunk-U6B3MM4U.cjs.map} +1 -1
- package/dist/{chunk-TRY3CUWJ.cjs → chunk-UKFBPJBK.cjs} +29 -29
- package/dist/{chunk-TRY3CUWJ.cjs.map → chunk-UKFBPJBK.cjs.map} +1 -1
- package/dist/{chunk-5KKLN7Q2.js → chunk-UUXLDIK3.js} +3 -3
- package/dist/{chunk-HGPGF6SF.js → chunk-VRN5YYD3.js} +3 -3
- package/dist/{chunk-CXEGV3ZS.js → chunk-WVRXDGGP.js} +3 -3
- package/dist/{chunk-RZURBPBS.js → chunk-XUNFDRMP.js} +3 -3
- package/dist/{chunk-VHS3OYE4.js → chunk-YCZBCEQO.js} +2531 -2459
- package/dist/chunk-YCZBCEQO.js.map +1 -0
- package/dist/components/case-studies/index.cjs +10 -10
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/docs/index.js +7 -7
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/help-center-pages/index.cjs +24 -24
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +57 -53
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +19 -15
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +34 -34
- package/dist/components/meeting-scheduler/index.cjs.map +1 -1
- package/dist/components/meeting-scheduler/index.js +5 -5
- package/dist/components/meeting-scheduler/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 +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/avatar-stack.d.ts +16 -3
- package/dist/components/ui/avatar-stack.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +8 -4
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +7 -3
- package/dist/components/ui/people-cell.d.ts +46 -0
- package/dist/components/ui/people-cell.d.ts.map +1 -0
- package/dist/index.cjs +14 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/utils/format.d.ts +8 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/index.cjs +5 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/meeting-scheduler/context-panel.tsx +1 -1
- package/src/components/meeting-scheduler/directory.tsx +1 -1
- package/src/components/ui/__tests__/people-cell.test.tsx +97 -0
- package/src/components/ui/avatar-stack.tsx +40 -13
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/people-cell.tsx +133 -0
- package/src/components/ui/table/__tests__/header-hint.test.tsx +2 -2
- package/src/utils/format.ts +13 -0
- package/src/utils/index.ts +1 -0
- package/dist/chunk-67XFJ442.cjs.map +0 -1
- package/dist/chunk-RU3IKVY2.js.map +0 -1
- package/dist/chunk-UQEOAPAI.cjs.map +0 -1
- package/dist/chunk-VHS3OYE4.js.map +0 -1
- /package/dist/{chunk-CGCV4QT2.js.map → chunk-2DTZXXY3.js.map} +0 -0
- /package/dist/{chunk-VJJ7LGOI.js.map → chunk-5P74E24M.js.map} +0 -0
- /package/dist/{chunk-BLUL2TE3.js.map → chunk-6XJS3WU7.js.map} +0 -0
- /package/dist/{chunk-UVK7AQAG.js.map → chunk-ANMD7SM4.js.map} +0 -0
- /package/dist/{chunk-7YHUP5BR.js.map → chunk-CWMKY2UJ.js.map} +0 -0
- /package/dist/{chunk-FP5WYJ3S.js.map → chunk-FCN2HN6Q.js.map} +0 -0
- /package/dist/{chunk-GH4F4ODL.js.map → chunk-GD7CV2JI.js.map} +0 -0
- /package/dist/{chunk-WFM5OAM6.js.map → chunk-GFWKEWEH.js.map} +0 -0
- /package/dist/{chunk-UVXMIZYK.js.map → chunk-IPHA3AQ6.js.map} +0 -0
- /package/dist/{chunk-45OAW4M2.js.map → chunk-J25M43YI.js.map} +0 -0
- /package/dist/{chunk-ZJYZOOTU.js.map → chunk-NUU5ZEEG.js.map} +0 -0
- /package/dist/{chunk-6RMFEGJ4.js.map → chunk-RROIA6WY.js.map} +0 -0
- /package/dist/{chunk-5KKLN7Q2.js.map → chunk-UUXLDIK3.js.map} +0 -0
- /package/dist/{chunk-HGPGF6SF.js.map → chunk-VRN5YYD3.js.map} +0 -0
- /package/dist/{chunk-CXEGV3ZS.js.map → chunk-WVRXDGGP.js.map} +0 -0
- /package/dist/{chunk-RZURBPBS.js.map → chunk-XUNFDRMP.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-332JHI2D.cjs","../src/components/shared/doc-search/format-relative-path.ts","../src/components/shared/doc-search/doc-search-result-row.tsx","../src/components/shared/doc-search/doc-search-bar.tsx","../src/components/shared/doc-search/map-doc-search-results.ts","../src/components/shared/doc-search/resolve-search-result-action.ts","../src/components/shared/doc-search/use-doc-search.ts"],"names":["jsx"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;AClBO,SAAS,kBAAA,CAAmB,QAAA,EAA0B;AAC3D,EAAA,GAAA,CAAI,CAAC,QAAA,EAAU,OAAO,EAAA;AACtB,EAAA,MAAM,SAAA,EAAW,QAAA,CAAS,OAAA,CAAQ,OAAA,EAAS,EAAE,CAAA,CAAE,KAAA,CAAM,GAAG,CAAA;AAExD,EAAA,MAAM,eAAA,EAAiB,QAAA,CAAS,OAAA,EAAS,EAAA,EAAI,QAAA,CAAS,KAAA,CAAM,CAAA,EAAG,CAAA,CAAE,EAAA,EAAI,QAAA;AACrE,EAAA,OAAO,cAAA,CAAe,GAAA,CAAI,CAAA,GAAA,EAAA,GAAO,GAAA,CAAI,MAAA,CAAO,CAAC,CAAA,CAAE,WAAA,CAAY,EAAA,EAAI,GAAA,CAAI,KAAA,CAAM,CAAC,CAAA,CAAE,OAAA,CAAQ,IAAA,EAAM,GAAG,CAAC,CAAA,CAAE,IAAA,CAAK,KAAK,CAAA;AAC5G;ADmBA;AACA;AEcQ,+CAAA;AAZD,SAAS,kBAAA,CAAmB,EAAE,MAAA,EAAQ,cAAc,CAAA,EAA4B;AACrF,EAAA,MAAM,QAAA,kBAAW,MAAA,mBAAO,QAAA,6BAAU,eAAA,GAA2B,KAAA,CAAA;AAC7D,EAAA,MAAM,WAAA,kBAAc,MAAA,qBAAO,QAAA,6BAAU,aAAA,GAAyB,KAAA,CAAA;AAC9D,EAAA,MAAM,EAAE,IAAA,EAAM,UAAA,EAAY,KA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YAAA;AACF,UAAA;AAOiB,UAAA;AAEkF,UAAA;AACjE,UAAA;AACY,UAAA;AAC9C,UAAA;AACF,QAAA;AACK,QAAA;AAIa,UAAA;AAQ0B,UAAA;AACiD,YAAA;AAC/D,YAAA;AACX,cAAA;AACb,cAAA;AACA,cAAA;AACM,YAAA;AACR,YAAA;AACF,UAAA;AACmD,UAAA;AACnD,UAAA;AACG,QAAA;AAMc,UAAA;AACsE,UAAA;AACvF,UAAA;AACG,QAAA;AAGc,UAAA;AACK,UAAA;AACtB,UAAA;AACG,QAAA;AACH,UAAA;AACJ,MAAA;AACF,IAAA;AACwF,IAAA;AAC1F,EAAA;AAK8D,EAAA;AAC9B,EAAA;AACL,IAAA;AACR,IAAA;AACnB,EAAA;AAEO,EAAA;AACL,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACkB,IAAA;AACpB,EAAA;AACF;ANsB8H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-332JHI2D.cjs","sourcesContent":[null,"/**\n * Format a full document path as a breadcrumb trail.\n * Shows parent folders only (excludes the last segment / filename).\n *\n * @example\n * formatRelativePath('openframe-oss-tenant/architecture/api-controllers.md')\n * // → 'Openframe oss tenant / Architecture'\n */\nexport function formatRelativePath(fullPath: string): string {\n if (!fullPath) return '';\n const segments = fullPath.replace(/\\.md$/, '').split('/');\n // Show only parent path (exclude the filename itself since the title already shows it)\n const parentSegments = segments.length > 1 ? segments.slice(0, -1) : segments;\n return parentSegments.map(seg => seg.charAt(0).toUpperCase() + seg.slice(1).replace(/-/g, ' ')).join(' / ');\n}\n","'use client';\n\n/**\n * Single row in the `<SearchInput>` dropdown — the standard layout\n * used by every doc-search-backed surface (company-hub data-room\n * search bar, onboarding-guide catalog search, …). Single source of\n * truth for the row appearance so search dropdowns are visually\n * identical everywhere.\n *\n * Resolves the source icon via the same `resolveSourceIcon()`\n * registry the inline chat-card refs use, so a row pointing at e.g.\n * an onboarding-guide surfaces the SAME `<GraduationCap>` glyph the\n * chat card surfaces — no cross-surface drift.\n */\n\nimport { resolveSourceIcon } from '../../chat/utils/source-row-cta';\nimport { formatRelativePath } from './format-relative-path';\n\n/**\n * Minimal result shape this row renders. Compatible with any\n * doc-search hook whose result type exposes `{ title?, path?,\n * metadata? }`. The two hub consumers (onboarding-guide catalog,\n * data-room sidebar) both satisfy this shape via their\n * `useDocSearch` hook result.\n */\nexport interface DocSearchResultRowEntry {\n title?: string;\n path?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface DocSearchResultRowProps {\n result: DocSearchResultRowEntry;\n isHighlighted: boolean;\n}\n\nexport function DocSearchResultRow({ result, isHighlighted }: DocSearchResultRowProps) {\n const docType = (result.metadata?.documentType as string) || undefined;\n const sourceRepo = (result.metadata?.sourceRepo as string) || undefined;\n const { Icon: SourceIcon, label: iconLabel } = resolveSourceIcon({\n sourceRepo,\n documentType: docType,\n });\n const isGroup = result.metadata?.isGroup as boolean | undefined;\n\n return (\n <div className=\"flex w-full min-w-0 items-center gap-3\">\n <span className=\"flex-shrink-0 text-ods-text-secondary\" title={iconLabel}>\n <SourceIcon className=\"size-4\" />\n </span>\n <div className=\"min-w-0 flex-1\">\n <div className={`truncate text-h6 ${isHighlighted ? 'text-ods-accent' : 'text-ods-text-primary'}`}>\n {result.title || result.path}\n </div>\n {!isGroup && result.path?.includes('/') && (\n <div className=\"mt-0.5 truncate text-ods-text-secondary text-h6\">{formatRelativePath(result.path)}</div>\n )}\n </div>\n </div>\n );\n}\n","'use client';\n\n/**\n * `<DocSearchBar>` — the canonical RAG-search dropdown surface.\n *\n * Mounted by every doc-search consumer (data-room sidebar, onboarding-\n * guide catalog, and any future surface that needs typeahead against\n * `/api/docs/search`). Wraps `<SearchInput>` with the lib's standard\n * `<DocSearchResultRow>` so the dropdown looks identical everywhere.\n *\n * ## Why a presentation component, not a \"search bar that owns its\n * own hook\"\n *\n * The data-fetching hook (`useDocSearch`) lives hub-side because it\n * depends on hub-only context (`useDocNavigation`, the rag-table-\n * config registry, the hub's `decideNewTab` helper). Moving the hook\n * would cascade ~5 more file migrations into the lib.\n *\n * Instead, the hook stays hub-side and callers pass its result into\n * this component as plain props. Both consumers shrink to ~5 lines.\n */\n\nimport type { ReactNode } from 'react';\nimport { SearchInput, type SearchResult } from '../../ui/search-input';\nimport { DocSearchResultRow } from './doc-search-result-row';\n\nexport interface DocSearchBarProps {\n placeholder: string;\n query: string;\n onQueryChange: (value: string) => void;\n /** Hook-fetched results. Reuses the lib's `<SearchInput>` `SearchResult`\n * shape directly so callers don't translate. */\n results: SearchResult[];\n isLoading: boolean;\n /** Result selection handler. Mirrors `<SearchInput>` — the second\n * `modifiers` argument is preserved so cmd-click / shift-click on\n * a result row still forces new-tab behavior. Hub `useDocSearch`\n * reads these to short-circuit to `window.open()`. */\n onResultSelect: (\n result: SearchResult,\n modifiers?: {\n metaKey?: boolean;\n ctrlKey?: boolean;\n shiftKey?: boolean;\n altKey?: boolean;\n button?: number;\n },\n ) => void;\n /** Lets the caller's hook force the dropdown open after a recent\n * internal action (e.g. result navigation). `undefined` falls back\n * to `<SearchInput>`'s built-in focus/hover heuristics. */\n showDropdown?: boolean;\n /** Defaults to 2 — matches the existing data-room and onboarding-\n * guide consumers. Override only if a surface needs different\n * typeahead semantics. */\n minQueryLength?: number;\n /** Defaults to 0 — both existing consumers debounce inside the\n * hook, not the input. */\n debounceMs?: number;\n className?: string;\n /** Optional row-renderer override. Defaults to the lib's standard\n * `<DocSearchResultRow>` (source icon + title + path breadcrumb).\n * Override only when a surface needs custom row chrome. */\n renderResult?: (result: SearchResult, isHighlighted: boolean) => ReactNode;\n}\n\nexport function DocSearchBar({\n placeholder,\n query,\n onQueryChange,\n results,\n isLoading,\n onResultSelect,\n showDropdown,\n minQueryLength = 2,\n debounceMs = 0,\n className = 'w-full',\n renderResult,\n}: DocSearchBarProps) {\n return (\n <SearchInput\n placeholder={placeholder}\n value={query}\n onChange={onQueryChange}\n results={results}\n isLoading={isLoading}\n onResultSelect={onResultSelect}\n showDropdown={showDropdown || undefined}\n debounceMs={debounceMs}\n minQueryLength={minQueryLength}\n className={className}\n renderResult={\n renderResult ??\n ((result, isHighlighted) => <DocSearchResultRow result={result} isHighlighted={isHighlighted} />)\n }\n />\n );\n}\n","/**\n * Map RAG `/api/docs/search` wire results into the `<DocSearchBar>`\n * dropdown's row shape, collapsing entity-table rows into grouped\n * results so the dropdown lists ONE \"Cap Table (12 records)\" row\n * instead of 12 individual rows.\n *\n * Pure transform — no telemetry, no navigation, no React deps. Lifted\n * from the hub's `hooks/use-docs.ts:mapDocSearchResults` (the hub's\n * `traceCompose` call was hub-only telemetry and is intentionally\n * dropped — callers that want logging can wrap this helper).\n */\n\nimport type { SearchResult } from '../../ui/search-input';\nimport type { DocSearchResult } from './types';\n\n/** Source repos that should be collapsed into grouped results in the search bar.\n * Only financial tables (all rows link to the same admin page).\n * Content tables (blog, webinar, podcast, etc.) stay individual since each has a unique URL. */\nconst SEARCH_GROUP_REPOS = new Set([\n 'financial-cap-table',\n 'financial-kpis',\n 'financial-pnl',\n 'financial-balance-sheet',\n 'financial-cash-flow',\n]);\n\nconst ENTITY_LABELS: Record<string, string> = {\n 'financial-cap-table': 'Cap Table',\n 'financial-kpis': 'Financial KPIs',\n 'financial-pnl': 'Profit & Loss',\n 'financial-balance-sheet': 'Balance Sheets',\n 'financial-cash-flow': 'Cash Flow',\n 'blog-posts': 'Blog Posts',\n 'product-releases': 'Product Releases',\n 'case-studies': 'Case Studies',\n webinars: 'Webinars',\n events: 'Events',\n podcasts: 'Podcasts',\n};\n\nexport function mapDocSearchResults(docs: DocSearchResult[]): SearchResult[] {\n const entityGroups = new Map<string, DocSearchResult[]>();\n // Track insertion order — groups appear where the FIRST row of that\n // repo appeared in the response.\n const order: Array<{ type: 'entity'; repo: string } | { type: 'doc'; doc: DocSearchResult }> = [];\n const seenRepos = new Set<string>();\n\n for (const doc of docs) {\n if (doc.sourceRepo && SEARCH_GROUP_REPOS.has(doc.sourceRepo)) {\n const group = entityGroups.get(doc.sourceRepo) || [];\n group.push(doc);\n entityGroups.set(doc.sourceRepo, group);\n if (!seenRepos.has(doc.sourceRepo)) {\n seenRepos.add(doc.sourceRepo);\n order.push({ type: 'entity', repo: doc.sourceRepo });\n }\n } else {\n order.push({ type: 'doc', doc });\n }\n }\n\n const results: SearchResult[] = [];\n for (const entry of order) {\n if (entry.type === 'entity') {\n // An 'entity' entry is only pushed AFTER its group lands in the map, so\n // a miss is unreachable — but dropping one group beats throwing away the\n // whole search dropdown if that ever stops holding.\n const rows = entityGroups.get(entry.repo);\n if (!rows || rows.length === 0) continue;\n const label = ENTITY_LABELS[entry.repo] || entry.repo;\n results.push({\n id: `group-${entry.repo}`,\n title: `${label} (${rows.length} ${rows.length === 1 ? 'record' : 'records'})`,\n path: rows[0].path,\n type: 'file',\n metadata: {\n documentType: rows[0].documentType,\n externalUrl: rows[0].externalUrl,\n sourceRepo: entry.repo,\n id: rows[0].entityId,\n isGroup: true,\n items: rows.map(r => ({\n name: r.name,\n externalUrl: r.externalUrl,\n id: r.entityId,\n sourceRepo: r.sourceRepo,\n documentType: r.documentType,\n })),\n },\n });\n } else {\n const doc = entry.doc;\n const isNonMarkdown = doc.documentType && doc.documentType !== 'markdown';\n results.push({\n id: doc.path,\n title: doc.name,\n description: isNonMarkdown ? doc.name : doc.snippet,\n path: doc.path,\n type: doc.type,\n metadata: {\n matchType: doc.matchType,\n ...(doc.documentType ? { documentType: doc.documentType } : {}),\n ...(doc.externalUrl ? { externalUrl: doc.externalUrl } : {}),\n ...(doc.targetPlatform != null ? { targetPlatform: doc.targetPlatform } : {}),\n ...(doc.sourceRepo ? { sourceRepo: doc.sourceRepo } : {}),\n ...(doc.entityId ? { id: doc.entityId } : {}),\n },\n });\n }\n }\n\n return results;\n}\n","/**\n * Resolve what should happen when the user picks a search result.\n * Returns one of five typed actions so the caller is a single switch.\n *\n * Resolution order:\n * 1. `externalUrl` present → resolve the href through the host's\n * `composeContentUrl` seam (when wired), then use `decideNewTab` to\n * choose same-tab vs new-tab against the resolved `targetPlatform`.\n * 2. Row has `id` + `sourceRepo` + `documentType` → synth an Ask-AI\n * action (entity drill-in via primary key, no URL).\n * 3. Row has only `path` → legacy navigation fallback.\n * 4. Nothing actionable → noop.\n *\n * Lifted from the hub's `hooks/use-docs.ts:resolveSearchResultAction`.\n * Pure — no React, no telemetry.\n */\n\nimport type { ComposeContentUrl } from '../../../utils/content-href';\nimport type { ChatRef } from '../../chat/chat-ref.types';\nimport { decideNewTab } from '../../chat/utils/decide-new-tab';\nimport type { SearchResult } from '../../ui/search-input';\n\n/** True for `https://…` and protocol-relative `//…`. A composed href that is\n * NOT absolute is an in-app route the host claimed via `hostedTypes` /\n * `overrides`. */\nfunction isAbsoluteHref(href: string): boolean {\n return /^(?:[a-z][a-z0-9+.-]*:)?\\/\\//i.test(href);\n}\n\nexport type SearchResultAction =\n | { kind: 'navigate-same-tab'; href: string }\n | { kind: 'navigate-new-tab'; href: string }\n | { kind: 'ask-ai'; detail: { source: string; ref: ChatRef } }\n | { kind: 'route'; path: string }\n | { kind: 'noop' };\n\nexport function resolveSearchResultAction(\n result: SearchResult,\n source: string,\n runtimeMode?: 'host' | 'embed',\n /** The host's unified content-href seam (`runtime.composeContentUrl`).\n * When wired, an entity row's RAG `externalUrl` is re-resolved through it,\n * so a type the host serves in-app (`hostedTypes`) or deep-links itself\n * (`overrides`) lands on the SAME href the catalog cards and chat cards\n * use. Omitted → the legacy verbatim-`externalUrl` behavior. */\n composeContentUrl?: ComposeContentUrl,\n): SearchResultAction {\n const meta = result.metadata ?? {};\n const externalUrl = meta.externalUrl as string | undefined;\n const rowId = meta.id as string | undefined;\n const sourceRepo = meta.sourceRepo as string | undefined;\n const documentType = meta.documentType as string | undefined;\n if (externalUrl) {\n const targetPlatform = meta.targetPlatform as string | null | undefined;\n // Unified content-href seam — the same call `resolveSourceRowCTA` makes\n // for chat rows. Hosted types relativize the slug out of `externalUrl`;\n // everything else comes back verbatim, so an unwired host (or a row with\n // no `documentType`) keeps today's behavior byte-for-byte.\n const composed =\n composeContentUrl && documentType\n ? composeContentUrl({\n type: documentType,\n identifier: rowId ?? '',\n externalUrl,\n targetPlatform: targetPlatform ?? null,\n })\n : null;\n const href = composed?.href || externalUrl;\n // A RELATIVE composed href means the host claimed this row as in-app.\n // Short-circuit BEFORE `decideNewTab`: in embed mode that helper forces\n // new-tab unconditionally, which would fire `window.open()` on a path\n // that only resolves inside this app.\n if (composed && !isAbsoluteHref(href)) {\n return { kind: 'navigate-same-tab', href };\n }\n // Same pure helper `useNavLink` and `useUnifiedNav` call — single\n // decision rule across cards, chips, and autocomplete rows. Thread\n // the caller's `source` as `currentSource` so the platform-vs-\n // platform comparison matches the hub's pre-migration behavior.\n const isNewTab = decideNewTab({\n href,\n targetPlatform: composed ? composed.targetPlatform : targetPlatform,\n surface: 'useUnifiedNav',\n runtimeMode,\n currentSource: source,\n });\n return isNewTab ? { kind: 'navigate-new-tab', href } : { kind: 'navigate-same-tab', href };\n }\n if (rowId && sourceRepo && documentType) {\n return {\n kind: 'ask-ai',\n detail: {\n source,\n ref: { type: documentType, id: rowId, title: result.title, url: null },\n },\n };\n }\n if (result.path) {\n return { kind: 'route', path: result.path };\n }\n return { kind: 'noop' };\n}\n","'use client';\n\n/**\n * `useDocSearch` — debounced RAG-search hook against `/api/docs/search`.\n *\n * Pure fetch + navigation glue. Embedders can mount this directly\n * (any host with a reverse-proxy that exposes `/api/docs/search` will\n * work). Hub callers wire it into the lib `<DocSearchBar>` for the\n * canonical typeahead dropdown.\n *\n * ## What moved from hub to lib\n *\n * Lifted from `multi-platform-hub/hooks/use-docs.ts:useDocSearch`. Two\n * hub-only concerns are now optional injection points instead of\n * direct imports:\n *\n * - `useDocNavigation()` (hub's in-page doc-tree swap) → optional\n * `onInPageSwap?: (path: string) => boolean` config callback. When\n * present and returns true, the hook treats a same-origin result\n * click as \"handled in-page\"; when absent or returns false, the\n * hook falls back to `onNavigate(path)` (`router.push` on hub,\n * `window.location.assign` on bare embedders).\n * - `traceCompose` (hub-only telemetry) → dropped. The lib has no\n * equivalent runtime-context yet; bring it back when there is one.\n *\n * Everything else (debounce, `useChatRuntime` for embed-mode short-\n * circuit, embed-shim router, the action-resolver + result-mapper) is\n * now lib-resident.\n *\n * ## Result hrefs go through the content-href seam\n *\n * A row's href is NOT the RAG `externalUrl` verbatim any more: when the\n * host wires `runtime.composeContentUrl` (or passes `composeContentUrl`\n * here), the row is re-resolved through it — the SAME seam the catalog\n * cards and the chat entity cards use. So a host that serves onboarding\n * guides at `/help-center/onboarding-guides/<slug>` gets that path from\n * the dropdown too, instead of bouncing the user to the canonical hub\n * URL. Unwired hosts keep the verbatim-`externalUrl` behavior.\n */\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { useChatRuntime } from '../../../contexts/chat-runtime-context';\nimport { useRouter } from '../../../embed-shims';\nimport { useDebounce } from '../../../hooks/ui/use-debounce';\nimport type { ComposeContentUrl } from '../../../utils/content-href';\nimport { contentFetch } from '../../../utils/embed-content-fetch';\nimport {\n resolveExternalNavigation,\n stripSameOriginToPath,\n NEW_TAB_FEATURES,\n} from '../../chat/utils/chat-nav-resolution';\nimport type { SearchResult } from '../../ui/search-input';\nimport { mapDocSearchResults } from './map-doc-search-results';\nimport { resolveSearchResultAction } from './resolve-search-result-action';\nimport type { DocSearchResult } from './types';\n\nexport interface UseDocSearchConfig {\n /** Discriminator passed to `/api/docs/search?source=` (e.g.\n * `'openframe'`). Embedders set it to whatever discriminator their\n * reverse-proxy expects. */\n source: string;\n /** Base route prefix this search lives under (e.g. `'/onboarding-guides'`).\n * When a result's href starts with `${baseRoute}/`, the hook\n * attempts the optional in-page swap path before falling through\n * to a full nav. */\n baseRoute: string;\n /** Imperative navigation fallback. Called when no override\n * (in-page swap, new-tab) applies. Hub callers pass\n * `(path) => router.push(path)`; embedders pass an equivalent. */\n onNavigate: (path: string) => void;\n /** Optional `RagTableConfig.id` list to narrow the search to specific\n * tables (e.g. `['onboarding-guides']`). Forwarded to\n * `/api/docs/search?tableIds=…` which intersects with the source's\n * standing set. */\n tableIds?: string[];\n /** Optional in-page swap callback. When the result's href is under\n * `baseRoute` AND this callback returns true, the hook treats the\n * click as handled in-page (no router push). Hub's\n * `<DocumentationSection>` wires this to\n * `useDocNavigation().navigate(path)`. */\n onInPageSwap?: (path: string) => boolean;\n /** Optional endpoint override. Defaults to `'/api/docs/search'`\n * (the hub's reverse-proxy route). Embedders with a different\n * path can override. */\n searchEndpoint?: string;\n /** Optional content-href seam override. Same fall-back chain as\n * `searchEndpoint`: prop → `runtime.composeContentUrl` → none. Wired,\n * it makes a result row honor the host's `hostedTypes` / `overrides`\n * instead of navigating to the RAG's canonical hub URL — so a row\n * lands where the catalog card for the same entity lands. */\n composeContentUrl?: ComposeContentUrl;\n}\n\n/** One shared empty array, so \"no matches\" keeps a stable identity. */\nconst NO_RESULTS: SearchResult[] = [];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\n/** `Array.isArray` narrows `unknown` to `any[]`; this keeps the elements `unknown`. */\nfunction isUnknownArray(value: unknown): value is readonly unknown[] {\n return Array.isArray(value);\n}\n\nfunction readString(source: Record<string, unknown>, key: string): string | undefined {\n const value = source[key];\n return typeof value === 'string' ? value : undefined;\n}\n\n/**\n * Decode `/api/docs/search`'s `{ success, data }` envelope.\n *\n * `Response.json()` is typed `any`, so the rows used to reach\n * `mapDocSearchResults` through an `as DocSearchResult[]` that asserted a\n * shape nothing had checked. `path` and `name` are the two that bite: the\n * mapper uses `path` as the row's React `id` and `name` as its title, so a row\n * missing either renders as a blank, key-colliding entry in the dropdown.\n * Such rows are dropped; the rest of the result set still lists.\n *\n * Returns null when the envelope itself is not a successful result set.\n */\nfunction toDocSearchResults(payload: unknown): DocSearchResult[] | null {\n if (!isRecord(payload) || !payload.success || !isUnknownArray(payload.data)) return null;\n\n const rows: DocSearchResult[] = [];\n for (const entry of payload.data) {\n if (!isRecord(entry)) continue;\n const path = readString(entry, 'path');\n const name = readString(entry, 'name');\n const type = entry.type;\n if (path === undefined || name === undefined) continue;\n\n const targetPlatform = entry.targetPlatform;\n rows.push({\n path,\n name,\n type: type === 'folder' ? 'folder' : 'file',\n snippet: readString(entry, 'snippet') ?? '',\n matchType: entry.matchType === 'title' ? 'title' : 'content',\n documentType: readString(entry, 'documentType'),\n externalUrl: readString(entry, 'externalUrl'),\n targetPlatform: typeof targetPlatform === 'string' ? targetPlatform : null,\n sourceRepo: readString(entry, 'sourceRepo'),\n entityId: readString(entry, 'entityId'),\n });\n }\n return rows;\n}\n\nexport function useDocSearch(config: UseDocSearchConfig) {\n const { source, baseRoute, onNavigate, tableIds, onInPageSwap, searchEndpoint, composeContentUrl } = config;\n const tableIdsKey = tableIds && tableIds.length > 0 ? tableIds.join(',') : '';\n\n const router = useRouter();\n // Optional chat-runtime read — when present and mode='embed' the\n // search-result row click short-circuits to a new-tab open against\n // the absolutized URL. Null/host preserves today's behavior.\n // Also used as the proxy-prefix fallback for `searchEndpoint`, matching\n // how tickets resolves `findTicketUrl`.\n const runtime = useChatRuntime();\n const resolvedSearchEndpoint = searchEndpoint ?? runtime?.endpoints.docsSearchUrl ?? '/api/docs/search';\n // Content-href seam, same prop → runtime → none chain. Threading it into\n // `resolveSearchResultAction` is what makes the dropdown obey the host's\n // route map; without it the row navigates to the RAG's canonical hub URL\n // even when the host serves that content in-app under a different path.\n const resolvedComposeContentUrl = composeContentUrl ?? runtime?.composeContentUrl;\n\n const [query, setQuery] = useState('');\n const [results, setResults] = useState<SearchResult[]>(NO_RESULTS);\n const [isFetching, setIsFetching] = useState(false);\n const debouncedQuery = useDebounce(query, 300);\n\n // Falling below the two-character floor empties the dropdown. Adjusted while\n // rendering (React's documented pattern for a reset the render already has\n // the answer to) rather than from an effect, which committed one more frame\n // of the previous matches under a query that no longer searches for them.\n const searchable = debouncedQuery.trim().length >= 2;\n const [wasSearchable, setWasSearchable] = useState(searchable);\n if (wasSearchable !== searchable) {\n setWasSearchable(searchable);\n if (!searchable) {\n setResults(NO_RESULTS);\n setIsFetching(false);\n }\n }\n\n useEffect(() => {\n if (!searchable) return undefined;\n\n let cancelled = false;\n\n async function fetchResults() {\n setIsFetching(true);\n try {\n const params = new URLSearchParams({\n q: debouncedQuery,\n source,\n limit: '10',\n });\n if (tableIdsKey) params.set('tableIds', tableIdsKey);\n\n const response = await contentFetch(`${resolvedSearchEndpoint}?${params.toString()}`);\n if (!response.ok) {\n throw new Error(`Search request failed: ${response.status}`);\n }\n\n const json: unknown = await response.json();\n\n if (!cancelled) {\n // An envelope that is not a successful result set now clears the\n // dropdown instead of leaving it untouched. Previously a 200 that\n // carried `success: false` (or a non-array `data`) fell through\n // every branch, so the PREVIOUS query's matches stayed on screen\n // under the new query — the throw path already reset them.\n const rows = toDocSearchResults(json);\n setResults(rows ? mapDocSearchResults(rows) : NO_RESULTS);\n }\n } catch (error) {\n console.error('Doc search error:', error);\n if (!cancelled) {\n setResults(NO_RESULTS);\n }\n } finally {\n if (!cancelled) {\n setIsFetching(false);\n }\n }\n }\n\n // Never rejects — try/catch/finally, every write gated on `cancelled`.\n void fetchResults();\n\n return () => {\n cancelled = true;\n };\n }, [debouncedQuery, searchable, source, tableIdsKey, resolvedSearchEndpoint]);\n\n // Derived loading state — single source of truth for \"should the\n // dropdown show 'Loading...' instead of 'No results found'\":\n const isLoading = query.trim().length >= 2 && (query !== debouncedQuery || isFetching);\n\n // Track whether dropdown should stay open (external link opened in new tab).\n const [keepOpen, setKeepOpen] = useState(false);\n\n const handleResultSelect = useCallback(\n (\n result: SearchResult,\n modifiers?: {\n metaKey?: boolean;\n ctrlKey?: boolean;\n shiftKey?: boolean;\n altKey?: boolean;\n button?: number;\n },\n ) => {\n const action = resolveSearchResultAction(result, source, runtime?.navigation.mode, resolvedComposeContentUrl);\n // Modifier / non-primary mouse click → force new tab regardless of\n // same-tab/new-tab decision. The dropdown row is a `<div>`, not an\n // `<a target=\"_blank\">`, so the browser doesn't background-tab\n // natively on cmd-click. Honor it explicitly here for parity with\n // the anchor-based surfaces (cards, chips, related-content). Plain\n // Enter from the keyboard passes `modifiers === undefined`.\n const wantsNewTab =\n modifiers &&\n (modifiers.metaKey ||\n modifiers.ctrlKey ||\n modifiers.shiftKey ||\n modifiers.altKey ||\n (typeof modifiers.button === 'number' && modifiers.button !== 0));\n switch (action.kind) {\n case 'navigate-same-tab': {\n if (wantsNewTab) {\n setKeepOpen(true);\n window.open(action.href, '_blank', NEW_TAB_FEATURES);\n return;\n }\n // Same-origin click:\n // 1. If the href is under the current doc-tree's baseRoute AND\n // an `onInPageSwap` callback is wired AND returns true →\n // consider in-page swap handled.\n // 2. Otherwise → embed-shim `router.push()` (soft RSC nav on\n // Next.js hosts, window.location.assign on bare hosts).\n setKeepOpen(false);\n const path =\n baseRoute && action.href.startsWith(`${baseRoute}/`) ? action.href.slice(baseRoute.length + 1) : null;\n if (path && onInPageSwap?.(path)) return;\n router.push(stripSameOriginToPath(action.href));\n return;\n }\n case 'navigate-new-tab':\n // Cross-origin (e.g. clicking a flamingo.run release from\n // product-hub) — open in a new tab. Keep dropdown open so the\n // user can pick another result without re-searching.\n setKeepOpen(true);\n // Embed-mode short-circuit — the row was clicked while the panel is\n // hosted inside an embedding app, so absolutize against the\n // embedder-supplied content origin and honor its `openExternal`\n // override. Not the only path an embed host takes: a composed\n // RELATIVE href resolves to `navigate-same-tab` above and never\n // reaches `decideNewTab`, which is what lets an embedder keep its\n // own in-app routes in-app.\n if (runtime?.navigation.mode === 'embed') {\n const targetPlatform = (result.metadata?.targetPlatform as string | null | undefined) ?? null;\n resolveExternalNavigation({\n href: action.href,\n targetPlatform,\n runtime,\n }).open();\n return;\n }\n window.open(action.href, '_blank', NEW_TAB_FEATURES);\n return;\n case 'ask-ai':\n // Row is searchable-but-not-openable (cap_table positions,\n // financial-kpi snapshots, anything backed by\n // `resolveUrl: () => null`). Dispatch a CustomEvent that\n // GlobalAskAI listens for — opens chat + drills via\n // `entityIdFilter` (primary-key only, same as inline-card Ask).\n setKeepOpen(false);\n window.dispatchEvent(new CustomEvent('ask-ai:open-with-ref', { detail: action.detail }));\n return;\n case 'route':\n // Final fallback: legacy navigation by path. Hits when a row\n // has neither URL nor pk metadata — a mapper/API regression.\n setKeepOpen(false);\n onNavigate(action.path);\n return;\n case 'noop':\n return;\n }\n },\n [onNavigate, source, baseRoute, router, onInPageSwap, runtime, resolvedComposeContentUrl],\n );\n\n // Reset keepOpen when query changes. Adjusted while rendering, not from an\n // effect: the dropdown's open state is read from this in the same render the\n // keystroke produced, so an effect held it pinned open for one extra frame.\n const [keepOpenForQuery, setKeepOpenForQuery] = useState(query);\n if (keepOpenForQuery !== query) {\n setKeepOpenForQuery(query);\n setKeepOpen(false);\n }\n\n return {\n query,\n setQuery,\n results,\n isLoading,\n handleResultSelect,\n keepDropdownOpen: keepOpen,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-BGDYSUA2.cjs","../src/components/shared/doc-search/format-relative-path.ts","../src/components/shared/doc-search/doc-search-result-row.tsx","../src/components/shared/doc-search/doc-search-bar.tsx","../src/components/shared/doc-search/map-doc-search-results.ts","../src/components/shared/doc-search/resolve-search-result-action.ts","../src/components/shared/doc-search/use-doc-search.ts"],"names":["jsx"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;AClBO,SAAS,kBAAA,CAAmB,QAAA,EAA0B;AAC3D,EAAA,GAAA,CAAI,CAAC,QAAA,EAAU,OAAO,EAAA;AACtB,EAAA,MAAM,SAAA,EAAW,Q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nB,EAAA;AAEO,EAAA;AACL,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACkB,IAAA;AACpB,EAAA;AACF;ANsB8H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-BGDYSUA2.cjs","sourcesContent":[null,"/**\n * Format a full document path as a breadcrumb trail.\n * Shows parent folders only (excludes the last segment / filename).\n *\n * @example\n * formatRelativePath('openframe-oss-tenant/architecture/api-controllers.md')\n * // → 'Openframe oss tenant / Architecture'\n */\nexport function formatRelativePath(fullPath: string): string {\n if (!fullPath) return '';\n const segments = fullPath.replace(/\\.md$/, '').split('/');\n // Show only parent path (exclude the filename itself since the title already shows it)\n const parentSegments = segments.length > 1 ? segments.slice(0, -1) : segments;\n return parentSegments.map(seg => seg.charAt(0).toUpperCase() + seg.slice(1).replace(/-/g, ' ')).join(' / ');\n}\n","'use client';\n\n/**\n * Single row in the `<SearchInput>` dropdown — the standard layout\n * used by every doc-search-backed surface (company-hub data-room\n * search bar, onboarding-guide catalog search, …). Single source of\n * truth for the row appearance so search dropdowns are visually\n * identical everywhere.\n *\n * Resolves the source icon via the same `resolveSourceIcon()`\n * registry the inline chat-card refs use, so a row pointing at e.g.\n * an onboarding-guide surfaces the SAME `<GraduationCap>` glyph the\n * chat card surfaces — no cross-surface drift.\n */\n\nimport { resolveSourceIcon } from '../../chat/utils/source-row-cta';\nimport { formatRelativePath } from './format-relative-path';\n\n/**\n * Minimal result shape this row renders. Compatible with any\n * doc-search hook whose result type exposes `{ title?, path?,\n * metadata? }`. The two hub consumers (onboarding-guide catalog,\n * data-room sidebar) both satisfy this shape via their\n * `useDocSearch` hook result.\n */\nexport interface DocSearchResultRowEntry {\n title?: string;\n path?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface DocSearchResultRowProps {\n result: DocSearchResultRowEntry;\n isHighlighted: boolean;\n}\n\nexport function DocSearchResultRow({ result, isHighlighted }: DocSearchResultRowProps) {\n const docType = (result.metadata?.documentType as string) || undefined;\n const sourceRepo = (result.metadata?.sourceRepo as string) || undefined;\n const { Icon: SourceIcon, label: iconLabel } = resolveSourceIcon({\n sourceRepo,\n documentType: docType,\n });\n const isGroup = result.metadata?.isGroup as boolean | undefined;\n\n return (\n <div className=\"flex w-full min-w-0 items-center gap-3\">\n <span className=\"flex-shrink-0 text-ods-text-secondary\" title={iconLabel}>\n <SourceIcon className=\"size-4\" />\n </span>\n <div className=\"min-w-0 flex-1\">\n <div className={`truncate text-h6 ${isHighlighted ? 'text-ods-accent' : 'text-ods-text-primary'}`}>\n {result.title || result.path}\n </div>\n {!isGroup && result.path?.includes('/') && (\n <div className=\"mt-0.5 truncate text-ods-text-secondary text-h6\">{formatRelativePath(result.path)}</div>\n )}\n </div>\n </div>\n );\n}\n","'use client';\n\n/**\n * `<DocSearchBar>` — the canonical RAG-search dropdown surface.\n *\n * Mounted by every doc-search consumer (data-room sidebar, onboarding-\n * guide catalog, and any future surface that needs typeahead against\n * `/api/docs/search`). Wraps `<SearchInput>` with the lib's standard\n * `<DocSearchResultRow>` so the dropdown looks identical everywhere.\n *\n * ## Why a presentation component, not a \"search bar that owns its\n * own hook\"\n *\n * The data-fetching hook (`useDocSearch`) lives hub-side because it\n * depends on hub-only context (`useDocNavigation`, the rag-table-\n * config registry, the hub's `decideNewTab` helper). Moving the hook\n * would cascade ~5 more file migrations into the lib.\n *\n * Instead, the hook stays hub-side and callers pass its result into\n * this component as plain props. Both consumers shrink to ~5 lines.\n */\n\nimport type { ReactNode } from 'react';\nimport { SearchInput, type SearchResult } from '../../ui/search-input';\nimport { DocSearchResultRow } from './doc-search-result-row';\n\nexport interface DocSearchBarProps {\n placeholder: string;\n query: string;\n onQueryChange: (value: string) => void;\n /** Hook-fetched results. Reuses the lib's `<SearchInput>` `SearchResult`\n * shape directly so callers don't translate. */\n results: SearchResult[];\n isLoading: boolean;\n /** Result selection handler. Mirrors `<SearchInput>` — the second\n * `modifiers` argument is preserved so cmd-click / shift-click on\n * a result row still forces new-tab behavior. Hub `useDocSearch`\n * reads these to short-circuit to `window.open()`. */\n onResultSelect: (\n result: SearchResult,\n modifiers?: {\n metaKey?: boolean;\n ctrlKey?: boolean;\n shiftKey?: boolean;\n altKey?: boolean;\n button?: number;\n },\n ) => void;\n /** Lets the caller's hook force the dropdown open after a recent\n * internal action (e.g. result navigation). `undefined` falls back\n * to `<SearchInput>`'s built-in focus/hover heuristics. */\n showDropdown?: boolean;\n /** Defaults to 2 — matches the existing data-room and onboarding-\n * guide consumers. Override only if a surface needs different\n * typeahead semantics. */\n minQueryLength?: number;\n /** Defaults to 0 — both existing consumers debounce inside the\n * hook, not the input. */\n debounceMs?: number;\n className?: string;\n /** Optional row-renderer override. Defaults to the lib's standard\n * `<DocSearchResultRow>` (source icon + title + path breadcrumb).\n * Override only when a surface needs custom row chrome. */\n renderResult?: (result: SearchResult, isHighlighted: boolean) => ReactNode;\n}\n\nexport function DocSearchBar({\n placeholder,\n query,\n onQueryChange,\n results,\n isLoading,\n onResultSelect,\n showDropdown,\n minQueryLength = 2,\n debounceMs = 0,\n className = 'w-full',\n renderResult,\n}: DocSearchBarProps) {\n return (\n <SearchInput\n placeholder={placeholder}\n value={query}\n onChange={onQueryChange}\n results={results}\n isLoading={isLoading}\n onResultSelect={onResultSelect}\n showDropdown={showDropdown || undefined}\n debounceMs={debounceMs}\n minQueryLength={minQueryLength}\n className={className}\n renderResult={\n renderResult ??\n ((result, isHighlighted) => <DocSearchResultRow result={result} isHighlighted={isHighlighted} />)\n }\n />\n );\n}\n","/**\n * Map RAG `/api/docs/search` wire results into the `<DocSearchBar>`\n * dropdown's row shape, collapsing entity-table rows into grouped\n * results so the dropdown lists ONE \"Cap Table (12 records)\" row\n * instead of 12 individual rows.\n *\n * Pure transform — no telemetry, no navigation, no React deps. Lifted\n * from the hub's `hooks/use-docs.ts:mapDocSearchResults` (the hub's\n * `traceCompose` call was hub-only telemetry and is intentionally\n * dropped — callers that want logging can wrap this helper).\n */\n\nimport type { SearchResult } from '../../ui/search-input';\nimport type { DocSearchResult } from './types';\n\n/** Source repos that should be collapsed into grouped results in the search bar.\n * Only financial tables (all rows link to the same admin page).\n * Content tables (blog, webinar, podcast, etc.) stay individual since each has a unique URL. */\nconst SEARCH_GROUP_REPOS = new Set([\n 'financial-cap-table',\n 'financial-kpis',\n 'financial-pnl',\n 'financial-balance-sheet',\n 'financial-cash-flow',\n]);\n\nconst ENTITY_LABELS: Record<string, string> = {\n 'financial-cap-table': 'Cap Table',\n 'financial-kpis': 'Financial KPIs',\n 'financial-pnl': 'Profit & Loss',\n 'financial-balance-sheet': 'Balance Sheets',\n 'financial-cash-flow': 'Cash Flow',\n 'blog-posts': 'Blog Posts',\n 'product-releases': 'Product Releases',\n 'case-studies': 'Case Studies',\n webinars: 'Webinars',\n events: 'Events',\n podcasts: 'Podcasts',\n};\n\nexport function mapDocSearchResults(docs: DocSearchResult[]): SearchResult[] {\n const entityGroups = new Map<string, DocSearchResult[]>();\n // Track insertion order — groups appear where the FIRST row of that\n // repo appeared in the response.\n const order: Array<{ type: 'entity'; repo: string } | { type: 'doc'; doc: DocSearchResult }> = [];\n const seenRepos = new Set<string>();\n\n for (const doc of docs) {\n if (doc.sourceRepo && SEARCH_GROUP_REPOS.has(doc.sourceRepo)) {\n const group = entityGroups.get(doc.sourceRepo) || [];\n group.push(doc);\n entityGroups.set(doc.sourceRepo, group);\n if (!seenRepos.has(doc.sourceRepo)) {\n seenRepos.add(doc.sourceRepo);\n order.push({ type: 'entity', repo: doc.sourceRepo });\n }\n } else {\n order.push({ type: 'doc', doc });\n }\n }\n\n const results: SearchResult[] = [];\n for (const entry of order) {\n if (entry.type === 'entity') {\n // An 'entity' entry is only pushed AFTER its group lands in the map, so\n // a miss is unreachable — but dropping one group beats throwing away the\n // whole search dropdown if that ever stops holding.\n const rows = entityGroups.get(entry.repo);\n if (!rows || rows.length === 0) continue;\n const label = ENTITY_LABELS[entry.repo] || entry.repo;\n results.push({\n id: `group-${entry.repo}`,\n title: `${label} (${rows.length} ${rows.length === 1 ? 'record' : 'records'})`,\n path: rows[0].path,\n type: 'file',\n metadata: {\n documentType: rows[0].documentType,\n externalUrl: rows[0].externalUrl,\n sourceRepo: entry.repo,\n id: rows[0].entityId,\n isGroup: true,\n items: rows.map(r => ({\n name: r.name,\n externalUrl: r.externalUrl,\n id: r.entityId,\n sourceRepo: r.sourceRepo,\n documentType: r.documentType,\n })),\n },\n });\n } else {\n const doc = entry.doc;\n const isNonMarkdown = doc.documentType && doc.documentType !== 'markdown';\n results.push({\n id: doc.path,\n title: doc.name,\n description: isNonMarkdown ? doc.name : doc.snippet,\n path: doc.path,\n type: doc.type,\n metadata: {\n matchType: doc.matchType,\n ...(doc.documentType ? { documentType: doc.documentType } : {}),\n ...(doc.externalUrl ? { externalUrl: doc.externalUrl } : {}),\n ...(doc.targetPlatform != null ? { targetPlatform: doc.targetPlatform } : {}),\n ...(doc.sourceRepo ? { sourceRepo: doc.sourceRepo } : {}),\n ...(doc.entityId ? { id: doc.entityId } : {}),\n },\n });\n }\n }\n\n return results;\n}\n","/**\n * Resolve what should happen when the user picks a search result.\n * Returns one of five typed actions so the caller is a single switch.\n *\n * Resolution order:\n * 1. `externalUrl` present → resolve the href through the host's\n * `composeContentUrl` seam (when wired), then use `decideNewTab` to\n * choose same-tab vs new-tab against the resolved `targetPlatform`.\n * 2. Row has `id` + `sourceRepo` + `documentType` → synth an Ask-AI\n * action (entity drill-in via primary key, no URL).\n * 3. Row has only `path` → legacy navigation fallback.\n * 4. Nothing actionable → noop.\n *\n * Lifted from the hub's `hooks/use-docs.ts:resolveSearchResultAction`.\n * Pure — no React, no telemetry.\n */\n\nimport type { ComposeContentUrl } from '../../../utils/content-href';\nimport type { ChatRef } from '../../chat/chat-ref.types';\nimport { decideNewTab } from '../../chat/utils/decide-new-tab';\nimport type { SearchResult } from '../../ui/search-input';\n\n/** True for `https://…` and protocol-relative `//…`. A composed href that is\n * NOT absolute is an in-app route the host claimed via `hostedTypes` /\n * `overrides`. */\nfunction isAbsoluteHref(href: string): boolean {\n return /^(?:[a-z][a-z0-9+.-]*:)?\\/\\//i.test(href);\n}\n\nexport type SearchResultAction =\n | { kind: 'navigate-same-tab'; href: string }\n | { kind: 'navigate-new-tab'; href: string }\n | { kind: 'ask-ai'; detail: { source: string; ref: ChatRef } }\n | { kind: 'route'; path: string }\n | { kind: 'noop' };\n\nexport function resolveSearchResultAction(\n result: SearchResult,\n source: string,\n runtimeMode?: 'host' | 'embed',\n /** The host's unified content-href seam (`runtime.composeContentUrl`).\n * When wired, an entity row's RAG `externalUrl` is re-resolved through it,\n * so a type the host serves in-app (`hostedTypes`) or deep-links itself\n * (`overrides`) lands on the SAME href the catalog cards and chat cards\n * use. Omitted → the legacy verbatim-`externalUrl` behavior. */\n composeContentUrl?: ComposeContentUrl,\n): SearchResultAction {\n const meta = result.metadata ?? {};\n const externalUrl = meta.externalUrl as string | undefined;\n const rowId = meta.id as string | undefined;\n const sourceRepo = meta.sourceRepo as string | undefined;\n const documentType = meta.documentType as string | undefined;\n if (externalUrl) {\n const targetPlatform = meta.targetPlatform as string | null | undefined;\n // Unified content-href seam — the same call `resolveSourceRowCTA` makes\n // for chat rows. Hosted types relativize the slug out of `externalUrl`;\n // everything else comes back verbatim, so an unwired host (or a row with\n // no `documentType`) keeps today's behavior byte-for-byte.\n const composed =\n composeContentUrl && documentType\n ? composeContentUrl({\n type: documentType,\n identifier: rowId ?? '',\n externalUrl,\n targetPlatform: targetPlatform ?? null,\n })\n : null;\n const href = composed?.href || externalUrl;\n // A RELATIVE composed href means the host claimed this row as in-app.\n // Short-circuit BEFORE `decideNewTab`: in embed mode that helper forces\n // new-tab unconditionally, which would fire `window.open()` on a path\n // that only resolves inside this app.\n if (composed && !isAbsoluteHref(href)) {\n return { kind: 'navigate-same-tab', href };\n }\n // Same pure helper `useNavLink` and `useUnifiedNav` call — single\n // decision rule across cards, chips, and autocomplete rows. Thread\n // the caller's `source` as `currentSource` so the platform-vs-\n // platform comparison matches the hub's pre-migration behavior.\n const isNewTab = decideNewTab({\n href,\n targetPlatform: composed ? composed.targetPlatform : targetPlatform,\n surface: 'useUnifiedNav',\n runtimeMode,\n currentSource: source,\n });\n return isNewTab ? { kind: 'navigate-new-tab', href } : { kind: 'navigate-same-tab', href };\n }\n if (rowId && sourceRepo && documentType) {\n return {\n kind: 'ask-ai',\n detail: {\n source,\n ref: { type: documentType, id: rowId, title: result.title, url: null },\n },\n };\n }\n if (result.path) {\n return { kind: 'route', path: result.path };\n }\n return { kind: 'noop' };\n}\n","'use client';\n\n/**\n * `useDocSearch` — debounced RAG-search hook against `/api/docs/search`.\n *\n * Pure fetch + navigation glue. Embedders can mount this directly\n * (any host with a reverse-proxy that exposes `/api/docs/search` will\n * work). Hub callers wire it into the lib `<DocSearchBar>` for the\n * canonical typeahead dropdown.\n *\n * ## What moved from hub to lib\n *\n * Lifted from `multi-platform-hub/hooks/use-docs.ts:useDocSearch`. Two\n * hub-only concerns are now optional injection points instead of\n * direct imports:\n *\n * - `useDocNavigation()` (hub's in-page doc-tree swap) → optional\n * `onInPageSwap?: (path: string) => boolean` config callback. When\n * present and returns true, the hook treats a same-origin result\n * click as \"handled in-page\"; when absent or returns false, the\n * hook falls back to `onNavigate(path)` (`router.push` on hub,\n * `window.location.assign` on bare embedders).\n * - `traceCompose` (hub-only telemetry) → dropped. The lib has no\n * equivalent runtime-context yet; bring it back when there is one.\n *\n * Everything else (debounce, `useChatRuntime` for embed-mode short-\n * circuit, embed-shim router, the action-resolver + result-mapper) is\n * now lib-resident.\n *\n * ## Result hrefs go through the content-href seam\n *\n * A row's href is NOT the RAG `externalUrl` verbatim any more: when the\n * host wires `runtime.composeContentUrl` (or passes `composeContentUrl`\n * here), the row is re-resolved through it — the SAME seam the catalog\n * cards and the chat entity cards use. So a host that serves onboarding\n * guides at `/help-center/onboarding-guides/<slug>` gets that path from\n * the dropdown too, instead of bouncing the user to the canonical hub\n * URL. Unwired hosts keep the verbatim-`externalUrl` behavior.\n */\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { useChatRuntime } from '../../../contexts/chat-runtime-context';\nimport { useRouter } from '../../../embed-shims';\nimport { useDebounce } from '../../../hooks/ui/use-debounce';\nimport type { ComposeContentUrl } from '../../../utils/content-href';\nimport { contentFetch } from '../../../utils/embed-content-fetch';\nimport {\n resolveExternalNavigation,\n stripSameOriginToPath,\n NEW_TAB_FEATURES,\n} from '../../chat/utils/chat-nav-resolution';\nimport type { SearchResult } from '../../ui/search-input';\nimport { mapDocSearchResults } from './map-doc-search-results';\nimport { resolveSearchResultAction } from './resolve-search-result-action';\nimport type { DocSearchResult } from './types';\n\nexport interface UseDocSearchConfig {\n /** Discriminator passed to `/api/docs/search?source=` (e.g.\n * `'openframe'`). Embedders set it to whatever discriminator their\n * reverse-proxy expects. */\n source: string;\n /** Base route prefix this search lives under (e.g. `'/onboarding-guides'`).\n * When a result's href starts with `${baseRoute}/`, the hook\n * attempts the optional in-page swap path before falling through\n * to a full nav. */\n baseRoute: string;\n /** Imperative navigation fallback. Called when no override\n * (in-page swap, new-tab) applies. Hub callers pass\n * `(path) => router.push(path)`; embedders pass an equivalent. */\n onNavigate: (path: string) => void;\n /** Optional `RagTableConfig.id` list to narrow the search to specific\n * tables (e.g. `['onboarding-guides']`). Forwarded to\n * `/api/docs/search?tableIds=…` which intersects with the source's\n * standing set. */\n tableIds?: string[];\n /** Optional in-page swap callback. When the result's href is under\n * `baseRoute` AND this callback returns true, the hook treats the\n * click as handled in-page (no router push). Hub's\n * `<DocumentationSection>` wires this to\n * `useDocNavigation().navigate(path)`. */\n onInPageSwap?: (path: string) => boolean;\n /** Optional endpoint override. Defaults to `'/api/docs/search'`\n * (the hub's reverse-proxy route). Embedders with a different\n * path can override. */\n searchEndpoint?: string;\n /** Optional content-href seam override. Same fall-back chain as\n * `searchEndpoint`: prop → `runtime.composeContentUrl` → none. Wired,\n * it makes a result row honor the host's `hostedTypes` / `overrides`\n * instead of navigating to the RAG's canonical hub URL — so a row\n * lands where the catalog card for the same entity lands. */\n composeContentUrl?: ComposeContentUrl;\n}\n\n/** One shared empty array, so \"no matches\" keeps a stable identity. */\nconst NO_RESULTS: SearchResult[] = [];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\n/** `Array.isArray` narrows `unknown` to `any[]`; this keeps the elements `unknown`. */\nfunction isUnknownArray(value: unknown): value is readonly unknown[] {\n return Array.isArray(value);\n}\n\nfunction readString(source: Record<string, unknown>, key: string): string | undefined {\n const value = source[key];\n return typeof value === 'string' ? value : undefined;\n}\n\n/**\n * Decode `/api/docs/search`'s `{ success, data }` envelope.\n *\n * `Response.json()` is typed `any`, so the rows used to reach\n * `mapDocSearchResults` through an `as DocSearchResult[]` that asserted a\n * shape nothing had checked. `path` and `name` are the two that bite: the\n * mapper uses `path` as the row's React `id` and `name` as its title, so a row\n * missing either renders as a blank, key-colliding entry in the dropdown.\n * Such rows are dropped; the rest of the result set still lists.\n *\n * Returns null when the envelope itself is not a successful result set.\n */\nfunction toDocSearchResults(payload: unknown): DocSearchResult[] | null {\n if (!isRecord(payload) || !payload.success || !isUnknownArray(payload.data)) return null;\n\n const rows: DocSearchResult[] = [];\n for (const entry of payload.data) {\n if (!isRecord(entry)) continue;\n const path = readString(entry, 'path');\n const name = readString(entry, 'name');\n const type = entry.type;\n if (path === undefined || name === undefined) continue;\n\n const targetPlatform = entry.targetPlatform;\n rows.push({\n path,\n name,\n type: type === 'folder' ? 'folder' : 'file',\n snippet: readString(entry, 'snippet') ?? '',\n matchType: entry.matchType === 'title' ? 'title' : 'content',\n documentType: readString(entry, 'documentType'),\n externalUrl: readString(entry, 'externalUrl'),\n targetPlatform: typeof targetPlatform === 'string' ? targetPlatform : null,\n sourceRepo: readString(entry, 'sourceRepo'),\n entityId: readString(entry, 'entityId'),\n });\n }\n return rows;\n}\n\nexport function useDocSearch(config: UseDocSearchConfig) {\n const { source, baseRoute, onNavigate, tableIds, onInPageSwap, searchEndpoint, composeContentUrl } = config;\n const tableIdsKey = tableIds && tableIds.length > 0 ? tableIds.join(',') : '';\n\n const router = useRouter();\n // Optional chat-runtime read — when present and mode='embed' the\n // search-result row click short-circuits to a new-tab open against\n // the absolutized URL. Null/host preserves today's behavior.\n // Also used as the proxy-prefix fallback for `searchEndpoint`, matching\n // how tickets resolves `findTicketUrl`.\n const runtime = useChatRuntime();\n const resolvedSearchEndpoint = searchEndpoint ?? runtime?.endpoints.docsSearchUrl ?? '/api/docs/search';\n // Content-href seam, same prop → runtime → none chain. Threading it into\n // `resolveSearchResultAction` is what makes the dropdown obey the host's\n // route map; without it the row navigates to the RAG's canonical hub URL\n // even when the host serves that content in-app under a different path.\n const resolvedComposeContentUrl = composeContentUrl ?? runtime?.composeContentUrl;\n\n const [query, setQuery] = useState('');\n const [results, setResults] = useState<SearchResult[]>(NO_RESULTS);\n const [isFetching, setIsFetching] = useState(false);\n const debouncedQuery = useDebounce(query, 300);\n\n // Falling below the two-character floor empties the dropdown. Adjusted while\n // rendering (React's documented pattern for a reset the render already has\n // the answer to) rather than from an effect, which committed one more frame\n // of the previous matches under a query that no longer searches for them.\n const searchable = debouncedQuery.trim().length >= 2;\n const [wasSearchable, setWasSearchable] = useState(searchable);\n if (wasSearchable !== searchable) {\n setWasSearchable(searchable);\n if (!searchable) {\n setResults(NO_RESULTS);\n setIsFetching(false);\n }\n }\n\n useEffect(() => {\n if (!searchable) return undefined;\n\n let cancelled = false;\n\n async function fetchResults() {\n setIsFetching(true);\n try {\n const params = new URLSearchParams({\n q: debouncedQuery,\n source,\n limit: '10',\n });\n if (tableIdsKey) params.set('tableIds', tableIdsKey);\n\n const response = await contentFetch(`${resolvedSearchEndpoint}?${params.toString()}`);\n if (!response.ok) {\n throw new Error(`Search request failed: ${response.status}`);\n }\n\n const json: unknown = await response.json();\n\n if (!cancelled) {\n // An envelope that is not a successful result set now clears the\n // dropdown instead of leaving it untouched. Previously a 200 that\n // carried `success: false` (or a non-array `data`) fell through\n // every branch, so the PREVIOUS query's matches stayed on screen\n // under the new query — the throw path already reset them.\n const rows = toDocSearchResults(json);\n setResults(rows ? mapDocSearchResults(rows) : NO_RESULTS);\n }\n } catch (error) {\n console.error('Doc search error:', error);\n if (!cancelled) {\n setResults(NO_RESULTS);\n }\n } finally {\n if (!cancelled) {\n setIsFetching(false);\n }\n }\n }\n\n // Never rejects — try/catch/finally, every write gated on `cancelled`.\n void fetchResults();\n\n return () => {\n cancelled = true;\n };\n }, [debouncedQuery, searchable, source, tableIdsKey, resolvedSearchEndpoint]);\n\n // Derived loading state — single source of truth for \"should the\n // dropdown show 'Loading...' instead of 'No results found'\":\n const isLoading = query.trim().length >= 2 && (query !== debouncedQuery || isFetching);\n\n // Track whether dropdown should stay open (external link opened in new tab).\n const [keepOpen, setKeepOpen] = useState(false);\n\n const handleResultSelect = useCallback(\n (\n result: SearchResult,\n modifiers?: {\n metaKey?: boolean;\n ctrlKey?: boolean;\n shiftKey?: boolean;\n altKey?: boolean;\n button?: number;\n },\n ) => {\n const action = resolveSearchResultAction(result, source, runtime?.navigation.mode, resolvedComposeContentUrl);\n // Modifier / non-primary mouse click → force new tab regardless of\n // same-tab/new-tab decision. The dropdown row is a `<div>`, not an\n // `<a target=\"_blank\">`, so the browser doesn't background-tab\n // natively on cmd-click. Honor it explicitly here for parity with\n // the anchor-based surfaces (cards, chips, related-content). Plain\n // Enter from the keyboard passes `modifiers === undefined`.\n const wantsNewTab =\n modifiers &&\n (modifiers.metaKey ||\n modifiers.ctrlKey ||\n modifiers.shiftKey ||\n modifiers.altKey ||\n (typeof modifiers.button === 'number' && modifiers.button !== 0));\n switch (action.kind) {\n case 'navigate-same-tab': {\n if (wantsNewTab) {\n setKeepOpen(true);\n window.open(action.href, '_blank', NEW_TAB_FEATURES);\n return;\n }\n // Same-origin click:\n // 1. If the href is under the current doc-tree's baseRoute AND\n // an `onInPageSwap` callback is wired AND returns true →\n // consider in-page swap handled.\n // 2. Otherwise → embed-shim `router.push()` (soft RSC nav on\n // Next.js hosts, window.location.assign on bare hosts).\n setKeepOpen(false);\n const path =\n baseRoute && action.href.startsWith(`${baseRoute}/`) ? action.href.slice(baseRoute.length + 1) : null;\n if (path && onInPageSwap?.(path)) return;\n router.push(stripSameOriginToPath(action.href));\n return;\n }\n case 'navigate-new-tab':\n // Cross-origin (e.g. clicking a flamingo.run release from\n // product-hub) — open in a new tab. Keep dropdown open so the\n // user can pick another result without re-searching.\n setKeepOpen(true);\n // Embed-mode short-circuit — the row was clicked while the panel is\n // hosted inside an embedding app, so absolutize against the\n // embedder-supplied content origin and honor its `openExternal`\n // override. Not the only path an embed host takes: a composed\n // RELATIVE href resolves to `navigate-same-tab` above and never\n // reaches `decideNewTab`, which is what lets an embedder keep its\n // own in-app routes in-app.\n if (runtime?.navigation.mode === 'embed') {\n const targetPlatform = (result.metadata?.targetPlatform as string | null | undefined) ?? null;\n resolveExternalNavigation({\n href: action.href,\n targetPlatform,\n runtime,\n }).open();\n return;\n }\n window.open(action.href, '_blank', NEW_TAB_FEATURES);\n return;\n case 'ask-ai':\n // Row is searchable-but-not-openable (cap_table positions,\n // financial-kpi snapshots, anything backed by\n // `resolveUrl: () => null`). Dispatch a CustomEvent that\n // GlobalAskAI listens for — opens chat + drills via\n // `entityIdFilter` (primary-key only, same as inline-card Ask).\n setKeepOpen(false);\n window.dispatchEvent(new CustomEvent('ask-ai:open-with-ref', { detail: action.detail }));\n return;\n case 'route':\n // Final fallback: legacy navigation by path. Hits when a row\n // has neither URL nor pk metadata — a mapper/API regression.\n setKeepOpen(false);\n onNavigate(action.path);\n return;\n case 'noop':\n return;\n }\n },\n [onNavigate, source, baseRoute, router, onInPageSwap, runtime, resolvedComposeContentUrl],\n );\n\n // Reset keepOpen when query changes. Adjusted while rendering, not from an\n // effect: the dropdown's open state is read from this in the same render the\n // keystroke produced, so an effect held it pinned open for one extra frame.\n const [keepOpenForQuery, setKeepOpenForQuery] = useState(query);\n if (keepOpenForQuery !== query) {\n setKeepOpenForQuery(query);\n setKeepOpen(false);\n }\n\n return {\n query,\n setQuery,\n results,\n isLoading,\n handleResultSelect,\n keepDropdownOpen: keepOpen,\n };\n}\n"]}
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
var _chunkVIBREYUKcjs = require('./chunk-VIBREYUK.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkK26VN65Mcjs = require('./chunk-K26VN65M.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkUXOOVP77cjs = require('./chunk-UXOOVP77.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkEJGZIYC7cjs = require('./chunk-EJGZIYC7.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
var _chunk3IXDZI3Rcjs = require('./chunk-3IXDZI3R.cjs');
|
|
@@ -29,7 +29,7 @@ var _chunk3IXDZI3Rcjs = require('./chunk-3IXDZI3R.cjs');
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkCM6DNLK7cjs = require('./chunk-CM6DNLK7.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
@@ -45,7 +45,7 @@ var _chunkCCWI3622cjs = require('./chunk-CCWI3622.cjs');
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var _chunkROQTWRV7cjs = require('./chunk-ROQTWRV7.cjs');
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
var _chunkYXWGSDK4cjs = require('./chunk-YXWGSDK4.cjs');
|
|
@@ -71,7 +71,7 @@ var _chunkKOQCA5X5cjs = require('./chunk-KOQCA5X5.cjs');
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
var
|
|
74
|
+
var _chunkE2EGTHYAcjs = require('./chunk-E2EGTHYA.cjs');
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
var _chunkWLSFBRT5cjs = require('./chunk-WLSFBRT5.cjs');
|
|
@@ -88,8 +88,8 @@ var _chunk23V5BSHDcjs = require('./chunk-23V5BSHD.cjs');
|
|
|
88
88
|
// src/components/shared/product-release/product-releases-view.tsx
|
|
89
89
|
var _jsxruntime = require('react/jsx-runtime');
|
|
90
90
|
var DEFAULT_ENDPOINT = "/api/releases";
|
|
91
|
-
var DEFAULT_SEARCH_PARAM_KEY =
|
|
92
|
-
var DEFAULT_STATUS_PARAM_KEY =
|
|
91
|
+
var DEFAULT_SEARCH_PARAM_KEY = _chunkCM6DNLK7cjs.DEV_SECTION_PARAM_KEYS.search;
|
|
92
|
+
var DEFAULT_STATUS_PARAM_KEY = _chunkCM6DNLK7cjs.DEV_SECTION_PARAM_KEYS.releaseStatus;
|
|
93
93
|
var DEFAULT_PAGE_PARAM_KEY = "page";
|
|
94
94
|
function ReleaseRow({
|
|
95
95
|
release,
|
|
@@ -98,17 +98,17 @@ function ReleaseRow({
|
|
|
98
98
|
}) {
|
|
99
99
|
const runtime = _chunkUPKZU6QUcjs.useChatRuntime.call(void 0, );
|
|
100
100
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
101
|
-
const cta =
|
|
101
|
+
const cta = _chunkCM6DNLK7cjs.resolveContentHref.call(void 0, _optionalChain([runtime, 'optionalAccess', _2 => _2.composeContentUrl]), {
|
|
102
102
|
type: "product_release",
|
|
103
103
|
slug: release.slug,
|
|
104
104
|
basePath,
|
|
105
105
|
platforms: release.product_release_platforms
|
|
106
106
|
});
|
|
107
|
-
const { target, rel } =
|
|
107
|
+
const { target, rel } = _chunkE2EGTHYAcjs.useEntityCardLink.call(void 0, { href: cta.href, targetPlatform: cta.targetPlatform });
|
|
108
108
|
const onClick = (e) => {
|
|
109
|
-
if (e.defaultPrevented ||
|
|
109
|
+
if (e.defaultPrevented || _chunkROQTWRV7cjs.isModifierClick.call(void 0, e) || target === "_blank") return;
|
|
110
110
|
e.preventDefault();
|
|
111
|
-
|
|
111
|
+
_chunkROQTWRV7cjs.executeNavigationImperative.call(void 0, {
|
|
112
112
|
runtime,
|
|
113
113
|
href: cta.href,
|
|
114
114
|
targetPlatform: cta.targetPlatform,
|
|
@@ -116,7 +116,7 @@ function ReleaseRow({
|
|
|
116
116
|
});
|
|
117
117
|
};
|
|
118
118
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
119
|
-
|
|
119
|
+
_chunkE2EGTHYAcjs.ProductReleaseCard,
|
|
120
120
|
{
|
|
121
121
|
size: "lg",
|
|
122
122
|
title: release.title,
|
|
@@ -132,7 +132,7 @@ function ProductReleasesView({
|
|
|
132
132
|
initialData,
|
|
133
133
|
itemsPerPage = 5,
|
|
134
134
|
basePath = "/releases",
|
|
135
|
-
buildCardProps =
|
|
135
|
+
buildCardProps = _chunkE2EGTHYAcjs.buildProductReleaseCardProps,
|
|
136
136
|
searchParamKey = DEFAULT_SEARCH_PARAM_KEY,
|
|
137
137
|
statusParamKey = DEFAULT_STATUS_PARAM_KEY,
|
|
138
138
|
pageParamKey = DEFAULT_PAGE_PARAM_KEY,
|
|
@@ -170,7 +170,7 @@ function ProductReleasesView({
|
|
|
170
170
|
router.replace(`${pathname}?${params.toString()}`, { scroll: false });
|
|
171
171
|
};
|
|
172
172
|
if (error) {
|
|
173
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk23V5BSHDcjs.cn.call(void 0, "w-full", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
173
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk23V5BSHDcjs.cn.call(void 0, "w-full", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCM6DNLK7cjs.LoadError, { message: "Failed to load releases.", onRetry: reload }) });
|
|
174
174
|
}
|
|
175
175
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk23V5BSHDcjs.cn.call(void 0, "flex w-full flex-col gap-[40px]", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-[600px]", children: showEmpty ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-[600px] items-center justify-center", children: hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
176
176
|
_chunkUXOOVP77cjs.EmptyState,
|
|
@@ -198,7 +198,7 @@ function ProductReleasesView({
|
|
|
198
198
|
"div",
|
|
199
199
|
{
|
|
200
200
|
style: { visibility: isLoading || hasData ? "visible" : "hidden" },
|
|
201
|
-
children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
201
|
+
children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkE2EGTHYAcjs.ProductReleaseCardSkeleton, { size: "lg" }) : release ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ReleaseRow, { release, basePath, buildCardProps }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkE2EGTHYAcjs.ProductReleaseCardSkeleton, { size: "lg" })
|
|
202
202
|
},
|
|
203
203
|
_nullishCoalesce(_optionalChain([release, 'optionalAccess', _5 => _5.id]), () => ( `slot-${i}`))
|
|
204
204
|
);
|
|
@@ -256,10 +256,10 @@ function MediaGalleryStrip({ items, className }) {
|
|
|
256
256
|
mediaItem.id || index
|
|
257
257
|
);
|
|
258
258
|
}
|
|
259
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: tileClass, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
259
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: tileClass, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkROQTWRV7cjs.Video, { url: mediaItem.media_url, layout: "native" }) }, mediaItem.id || index);
|
|
260
260
|
}) }),
|
|
261
261
|
galleryImages.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
262
|
-
|
|
262
|
+
_chunkE2EGTHYAcjs.ImageGalleryModal,
|
|
263
263
|
{
|
|
264
264
|
images: galleryImages,
|
|
265
265
|
isOpen: galleryOpen,
|
|
@@ -274,7 +274,7 @@ function MediaGalleryStrip({ items, className }) {
|
|
|
274
274
|
var _lucidereact = require('lucide-react');
|
|
275
275
|
|
|
276
276
|
|
|
277
|
-
var DefaultMarkdownRenderer =
|
|
277
|
+
var DefaultMarkdownRenderer = _chunkCM6DNLK7cjs.RichMarkdownRenderer;
|
|
278
278
|
var DEFAULT_ENDPOINT2 = "/api/releases";
|
|
279
279
|
function ReleaseDetailPage({
|
|
280
280
|
authorHref,
|
|
@@ -292,8 +292,8 @@ function ReleaseDetailPage({
|
|
|
292
292
|
shell = true
|
|
293
293
|
}) {
|
|
294
294
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
295
|
-
const captions =
|
|
296
|
-
const renderShell = (node) => shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
295
|
+
const captions = _chunkROQTWRV7cjs.useCaptions.call(void 0, );
|
|
296
|
+
const renderShell = (node) => shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCM6DNLK7cjs.PageShell, { children: node }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: node });
|
|
297
297
|
const seed = initialData == null ? void 0 : initialData;
|
|
298
298
|
const {
|
|
299
299
|
data: release,
|
|
@@ -352,7 +352,7 @@ function ReleaseDetailPage({
|
|
|
352
352
|
return renderShell(
|
|
353
353
|
// Match the loaded page's top offset (TitleBlock's
|
|
354
354
|
// `pt-[var(--spacing-system-l)]`) so content doesn't jump on load.
|
|
355
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pt-[var(--spacing-system-l)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
355
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pt-[var(--spacing-system-l)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEJGZIYC7cjs.DetailPageSkeleton, { bare: true, metadataColumns: 4, showImageGallery: true }) })
|
|
356
356
|
);
|
|
357
357
|
}
|
|
358
358
|
if (error || !release) {
|
|
@@ -391,7 +391,7 @@ function ReleaseDetailPage({
|
|
|
391
391
|
const improvements = release.improvements;
|
|
392
392
|
return renderShell(
|
|
393
393
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
394
|
-
|
|
394
|
+
_chunkCM6DNLK7cjs.PageLayout,
|
|
395
395
|
{
|
|
396
396
|
title: releaseTitle,
|
|
397
397
|
subtitle: `Version: ${releaseVersion}`,
|
|
@@ -400,7 +400,7 @@ function ReleaseDetailPage({
|
|
|
400
400
|
backButton: showBackButton ? { label: backLabel, onClick: () => router.push(backHref) } : void 0,
|
|
401
401
|
children: [
|
|
402
402
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6 md:space-y-8", children: [
|
|
403
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
403
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCM6DNLK7cjs.EntityTagBadges, { tags: release.product_release_tags }),
|
|
404
404
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid w-full grid-cols-1 overflow-hidden rounded-md border border-ods-border md:grid-cols-4", children: [
|
|
405
405
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-3 border-b border-ods-border bg-ods-card p-4 md:border-b-0 md:border-r", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-0", children: [
|
|
406
406
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-primary text-h4", children: releaseType.toLocaleUpperCase() }),
|
|
@@ -411,11 +411,11 @@ function ReleaseDetailPage({
|
|
|
411
411
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h6", children: "Release Status" })
|
|
412
412
|
] }) }),
|
|
413
413
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-3 border-b border-ods-border bg-ods-card p-4 md:border-b-0 md:border-r", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-0", children: [
|
|
414
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-primary text-h4", children:
|
|
414
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-primary text-h4", children: _chunkE2EGTHYAcjs.formatReleaseDate.call(void 0, releaseDate) }),
|
|
415
415
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h6", children: "Release Date" })
|
|
416
416
|
] }) }),
|
|
417
417
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
418
|
-
|
|
418
|
+
_chunkE2EGTHYAcjs.EntityMetadataAuthorCell,
|
|
419
419
|
{
|
|
420
420
|
author: _nullishCoalesce(author, () => ( { full_name: null, avatar_url: null })),
|
|
421
421
|
authorHref: _optionalChain([author, 'optionalAccess', _7 => _7.full_name]) ? authorHref : void 0
|
|
@@ -433,18 +433,18 @@ function ReleaseDetailPage({
|
|
|
433
433
|
highlightVideoThumbnail,
|
|
434
434
|
title: releaseTitle,
|
|
435
435
|
videoBites,
|
|
436
|
-
bitesTitle:
|
|
436
|
+
bitesTitle: _chunkE2EGTHYAcjs.DEFAULT_VIDEO_BITES_TITLE,
|
|
437
437
|
filterPublishedBites: true,
|
|
438
|
-
bitesProfile:
|
|
438
|
+
bitesProfile: _chunkE2EGTHYAcjs.toStripProfile.call(void 0, author),
|
|
439
439
|
bitesHref: typeof release.slug === "string" ? `/releases/${release.slug}` : void 0,
|
|
440
440
|
srtContent: _optionalChain([release, 'optionalAccess', _8 => _8.srt_content]),
|
|
441
441
|
captionsUrl,
|
|
442
442
|
highlightCaptionsUrl
|
|
443
443
|
}
|
|
444
444
|
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
445
|
-
youtubeUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
445
|
+
youtubeUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkROQTWRV7cjs.Video, { kind: "youtube", url: youtubeUrl, title: `${releaseTitle} - Video`, layout: "native" }),
|
|
446
446
|
!youtubeUrl && mainVideoUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
447
|
-
|
|
447
|
+
_chunkROQTWRV7cjs.Video,
|
|
448
448
|
{
|
|
449
449
|
url: mainVideoUrl,
|
|
450
450
|
srtContent: _optionalChain([release, 'optionalAccess', _9 => _9.srt_content]),
|
|
@@ -453,7 +453,7 @@ function ReleaseDetailPage({
|
|
|
453
453
|
}
|
|
454
454
|
),
|
|
455
455
|
highlightVideoUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
456
|
-
|
|
456
|
+
_chunkROQTWRV7cjs.Video,
|
|
457
457
|
{
|
|
458
458
|
url: highlightVideoUrl,
|
|
459
459
|
poster: highlightVideoThumbnail,
|
|
@@ -463,7 +463,7 @@ function ReleaseDetailPage({
|
|
|
463
463
|
)
|
|
464
464
|
] }),
|
|
465
465
|
releaseContent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-ods-text-primary text-h4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MarkdownRenderer, { content: releaseContent }) }),
|
|
466
|
-
hasBreakingChanges && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
466
|
+
hasBreakingChanges && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkE2EGTHYAcjs.Card, { className: "border-ods-error bg-ods-error/10", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkE2EGTHYAcjs.CardContent, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
|
|
467
467
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-6 w-6 text-ods-error" }),
|
|
468
468
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
469
469
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-ods-error text-h3", children: "Breaking Changes" }),
|
|
@@ -471,7 +471,7 @@ function ReleaseDetailPage({
|
|
|
471
471
|
] })
|
|
472
472
|
] }) }) }),
|
|
473
473
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
474
|
-
|
|
474
|
+
_chunkCM6DNLK7cjs.ReleaseChangelogSection,
|
|
475
475
|
{
|
|
476
476
|
title: "Breaking Changes",
|
|
477
477
|
entries: breakingChanges || [],
|
|
@@ -482,7 +482,7 @@ function ReleaseDetailPage({
|
|
|
482
482
|
}
|
|
483
483
|
),
|
|
484
484
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
485
|
-
|
|
485
|
+
_chunkCM6DNLK7cjs.ReleaseChangelogSection,
|
|
486
486
|
{
|
|
487
487
|
title: "Features Added",
|
|
488
488
|
entries: featuresAdded || [],
|
|
@@ -492,7 +492,7 @@ function ReleaseDetailPage({
|
|
|
492
492
|
}
|
|
493
493
|
),
|
|
494
494
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
495
|
-
|
|
495
|
+
_chunkCM6DNLK7cjs.ReleaseChangelogSection,
|
|
496
496
|
{
|
|
497
497
|
title: "Bugs Fixed",
|
|
498
498
|
entries: bugFixed || [],
|
|
@@ -502,7 +502,7 @@ function ReleaseDetailPage({
|
|
|
502
502
|
}
|
|
503
503
|
),
|
|
504
504
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
505
|
-
|
|
505
|
+
_chunkCM6DNLK7cjs.ReleaseChangelogSection,
|
|
506
506
|
{
|
|
507
507
|
title: "Improvements",
|
|
508
508
|
entries: improvements || [],
|
|
@@ -528,12 +528,12 @@ function ReleaseDetailPage({
|
|
|
528
528
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "tracking-[-0.28px] text-ods-text-secondary text-h5", children: "Related Enhancements and Bug-fixes" }),
|
|
529
529
|
(() => {
|
|
530
530
|
const deliveryCount = deliveryData ? deliveryData.completed.length + deliveryData.inProgress.length : 0;
|
|
531
|
-
return deliveryLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DeliverySection, { data: deliveryData, isLoading: deliveryLoading }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
531
|
+
return deliveryLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DeliverySection, { data: deliveryData, isLoading: deliveryLoading }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCM6DNLK7cjs.FadePreview, { hiddenCount: deliveryCount - 1, collapsedHeight: 300, resetKey: deliveryCount, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DeliverySection, { data: deliveryData, isLoading: false }) }) });
|
|
532
532
|
})()
|
|
533
533
|
] }),
|
|
534
534
|
(_optionalChain([githubReleases, 'optionalAccess', _10 => _10.length]) || _optionalChain([knowledgeBaseLinks, 'optionalAccess', _11 => _11.length]) || migrationGuideUrl || documentationUrl) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full space-y-1", children: [
|
|
535
535
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "tracking-[-0.28px] text-ods-text-secondary text-h5", children: "Related Links" }),
|
|
536
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
536
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkE2EGTHYAcjs.Card, { className: "border-ods-border bg-ods-card p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
|
|
537
537
|
githubReleases && githubReleases.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: githubReleases.map((ghRelease) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-1", children: [
|
|
538
538
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOQCA5X5cjs.GitHubIcon, { className: "shrink-0", width: 24, height: 24, color: "var(--color-text-secondary)" }),
|
|
539
539
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-primary text-h4", children: "Github Release" }),
|
|
@@ -607,7 +607,7 @@ function ReleaseDetailPage({
|
|
|
607
607
|
// src/components/shared/product-release/release-detail-skeleton.tsx
|
|
608
608
|
|
|
609
609
|
function ReleaseDetailSkeleton() {
|
|
610
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
610
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEJGZIYC7cjs.DetailPageSkeleton, { metadataColumns: 4, showImageGallery: true });
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
// src/components/shared/roadmap/use-roadmap-voting.ts
|
|
@@ -630,7 +630,7 @@ function useRoadmapVoting(options = {}) {
|
|
|
630
630
|
const { getSignals } = _chunkJJUV7Z4Lcjs.useHumanitySignals.call(void 0, );
|
|
631
631
|
const [votes, setVotes] = _react.useState.call(void 0, NO_VOTES);
|
|
632
632
|
const [loadedKey, setLoadedKey] = _react.useState.call(void 0, null);
|
|
633
|
-
const hydrated =
|
|
633
|
+
const hydrated = _chunkROQTWRV7cjs.useIsHydrated.call(void 0, );
|
|
634
634
|
if (hydrated && loadedKey !== storageKey) {
|
|
635
635
|
setLoadedKey(storageKey);
|
|
636
636
|
setVotes(readStoredVotes(storageKey));
|
|
@@ -779,10 +779,10 @@ function RoadmapGridSingle({
|
|
|
779
779
|
// `useScrollToHash` in `roadmap-view.tsx` finds the card by id
|
|
780
780
|
// and scrolls.
|
|
781
781
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
782
|
-
|
|
782
|
+
_chunkE2EGTHYAcjs.RoadmapCard,
|
|
783
783
|
{
|
|
784
784
|
item,
|
|
785
|
-
id:
|
|
785
|
+
id: _chunkCM6DNLK7cjs.devSectionAnchorId.call(void 0, "roadmap", item.id),
|
|
786
786
|
userVote: getVote(item.id),
|
|
787
787
|
onVote: (voteType) => onVote(item.id, voteType),
|
|
788
788
|
isVoting: votingTasks.has(item.id)
|
|
@@ -898,7 +898,7 @@ function RoadmapGrid({
|
|
|
898
898
|
);
|
|
899
899
|
}
|
|
900
900
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
901
|
-
|
|
901
|
+
_chunkCM6DNLK7cjs.Accordion,
|
|
902
902
|
{
|
|
903
903
|
type: "multiple",
|
|
904
904
|
value: expandedQuarters,
|
|
@@ -908,13 +908,13 @@ function RoadmapGrid({
|
|
|
908
908
|
const itemCount = _optionalChain([itemsByQuarter, 'access', _20 => _20[quarter], 'optionalAccess', _21 => _21.length]) || 0;
|
|
909
909
|
const isExpanded = expandedQuarters.includes(quarter);
|
|
910
910
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
911
|
-
|
|
911
|
+
_chunkCM6DNLK7cjs.AccordionItem,
|
|
912
912
|
{
|
|
913
913
|
value: quarter,
|
|
914
914
|
id: `quarter-${quarter.replace(/\s+/g, "-").toLowerCase()}`,
|
|
915
915
|
className: "border-0",
|
|
916
916
|
children: [
|
|
917
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
917
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCM6DNLK7cjs.AccordionTrigger, { className: "w-full p-0 hover:no-underline [&>svg]:ml-auto [&>svg]:h-5 [&>svg]:w-5 [&>svg]:shrink-0 [&>svg]:text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
|
|
918
918
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
919
919
|
"h3",
|
|
920
920
|
{
|
|
@@ -944,7 +944,7 @@ function RoadmapGrid({
|
|
|
944
944
|
}
|
|
945
945
|
)
|
|
946
946
|
] }) }),
|
|
947
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
947
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCM6DNLK7cjs.AccordionContent, { className: "overflow-hidden pb-0 pt-4 data-[state=closed]:animate-none data-[state=open]:animate-none", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
948
948
|
RoadmapGridSingle,
|
|
949
949
|
{
|
|
950
950
|
items: itemsByQuarter[quarter],
|
|
@@ -996,8 +996,8 @@ function RoadmapGridSkeleton({ count = 4, showLeftMargin = true }) {
|
|
|
996
996
|
|
|
997
997
|
|
|
998
998
|
var DEFAULT_ENDPOINT3 = "/api/roadmap";
|
|
999
|
-
var DEFAULT_SEARCH_PARAM_KEY2 =
|
|
1000
|
-
var DEFAULT_STATUS_PARAM_KEY2 =
|
|
999
|
+
var DEFAULT_SEARCH_PARAM_KEY2 = _chunkCM6DNLK7cjs.DEV_SECTION_PARAM_KEYS.search;
|
|
1000
|
+
var DEFAULT_STATUS_PARAM_KEY2 = _chunkCM6DNLK7cjs.DEV_SECTION_PARAM_KEYS.status;
|
|
1001
1001
|
function RoadmapView({
|
|
1002
1002
|
endpoint = DEFAULT_ENDPOINT3,
|
|
1003
1003
|
initialItems,
|
|
@@ -1020,7 +1020,7 @@ function RoadmapView({
|
|
|
1020
1020
|
const items = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _22 => _22.items]), () => ( []));
|
|
1021
1021
|
_chunkJJUV7Z4Lcjs.useScrollToHash.call(void 0, data, { headerOffset: _chunkYXWGSDK4cjs.STICKY_HEADER_OFFSET_PX });
|
|
1022
1022
|
if (error) {
|
|
1023
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1023
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCM6DNLK7cjs.LoadError, { message: "Failed to load roadmap.", onRetry: reload });
|
|
1024
1024
|
}
|
|
1025
1025
|
if (isLoading && !data) {
|
|
1026
1026
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RoadmapGridSkeleton, { showLeftMargin });
|
|
@@ -1073,7 +1073,7 @@ function DeliveryTable({ items, isLoading = false }) {
|
|
|
1073
1073
|
// → `#delivery-<external_id>`; `useScrollToHash` in
|
|
1074
1074
|
// `delivery-lists.tsx` finds the row by id and scrolls. The
|
|
1075
1075
|
// outer wrapper here ONLY exists for the row separators.
|
|
1076
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-b border-ods-border last:border-b-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1076
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-b border-ods-border last:border-b-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK26VN65Mcjs.DeliveryRow, { item, id: _chunkCM6DNLK7cjs.devSectionAnchorId.call(void 0, "delivery", item.id) }) }, item.id)
|
|
1077
1077
|
)) }) });
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
@@ -1082,8 +1082,8 @@ function DeliveryTable({ items, isLoading = false }) {
|
|
|
1082
1082
|
|
|
1083
1083
|
var DEFAULT_COMPLETED_ENDPOINT = "/api/delivery/completed";
|
|
1084
1084
|
var DEFAULT_IN_PROGRESS_ENDPOINT = "/api/delivery/in-progress";
|
|
1085
|
-
var DEFAULT_SEARCH_PARAM_KEY3 =
|
|
1086
|
-
var DEFAULT_TASK_TYPE_PARAM_KEY =
|
|
1085
|
+
var DEFAULT_SEARCH_PARAM_KEY3 = _chunkCM6DNLK7cjs.DEV_SECTION_PARAM_KEYS.search;
|
|
1086
|
+
var DEFAULT_TASK_TYPE_PARAM_KEY = _chunkCM6DNLK7cjs.DEV_SECTION_PARAM_KEYS.deliveryTaskType;
|
|
1087
1087
|
function DeliveryLists({
|
|
1088
1088
|
completedApiEndpoint = DEFAULT_COMPLETED_ENDPOINT,
|
|
1089
1089
|
inProgressApiEndpoint = DEFAULT_IN_PROGRESS_ENDPOINT,
|
|
@@ -1150,7 +1150,7 @@ function DeliveryLists({
|
|
|
1150
1150
|
const hasActiveFilters = searchQuery !== "" || taskTypeFilter !== "all";
|
|
1151
1151
|
const hasResults = showCompleted && filteredCompleted.length > 0 || showInProgress && filteredInProgress.length > 0;
|
|
1152
1152
|
if (error) {
|
|
1153
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1153
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCM6DNLK7cjs.LoadError, { message: error, onRetry: () => window.location.reload() }) });
|
|
1154
1154
|
}
|
|
1155
1155
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-[40px]", children: [
|
|
1156
1156
|
!isLoading && !hasResults && (hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1314,7 +1314,7 @@ function LegalDocumentPage({
|
|
|
1314
1314
|
initialData = null,
|
|
1315
1315
|
initialLastUpdatedLabel = null,
|
|
1316
1316
|
apiEndpoint,
|
|
1317
|
-
MarkdownRenderer =
|
|
1317
|
+
MarkdownRenderer = _chunkCM6DNLK7cjs.RichMarkdownRenderer,
|
|
1318
1318
|
backButton,
|
|
1319
1319
|
shell = true
|
|
1320
1320
|
}) {
|
|
@@ -1324,10 +1324,10 @@ function LegalDocumentPage({
|
|
|
1324
1324
|
label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _25 => _25.label]), () => ( "Back to home")),
|
|
1325
1325
|
onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _26 => _26.href]), () => ( "/")))
|
|
1326
1326
|
};
|
|
1327
|
-
const fallbackLastUpdatedLabel = _optionalChain([data, 'optionalAccess', _27 => _27.lastSynced]) != null ?
|
|
1327
|
+
const fallbackLastUpdatedLabel = _optionalChain([data, 'optionalAccess', _27 => _27.lastSynced]) != null ? _chunkE2EGTHYAcjs.formatLegalDate.call(void 0, data.lastSynced) : null;
|
|
1328
1328
|
const effectiveLastUpdatedLabel = _nullishCoalesce(initialLastUpdatedLabel, () => ( fallbackLastUpdatedLabel));
|
|
1329
1329
|
const subtitle = effectiveLastUpdatedLabel ? `Last Updated: ${effectiveLastUpdatedLabel}` : fallbackDescription;
|
|
1330
|
-
const inner = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1330
|
+
const inner = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCM6DNLK7cjs.PageLayout, { title, subtitle, backButton: backCfg, titleSize: "h1", titleWrap: true, children: [
|
|
1331
1331
|
_optionalChain([data, 'optionalAccess', _28 => _28.sourceFile]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-ods-text-secondary opacity-75 text-h6", children: [
|
|
1332
1332
|
"Source: ",
|
|
1333
1333
|
data.sourceFile
|
|
@@ -1367,7 +1367,7 @@ function LegalDocumentPage({
|
|
|
1367
1367
|
] })
|
|
1368
1368
|
] }) }) }) }) })
|
|
1369
1369
|
] });
|
|
1370
|
-
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1370
|
+
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCM6DNLK7cjs.PageShell, { children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: inner });
|
|
1371
1371
|
}
|
|
1372
1372
|
|
|
1373
1373
|
|
|
@@ -1384,4 +1384,4 @@ function LegalDocumentPage({
|
|
|
1384
1384
|
|
|
1385
1385
|
|
|
1386
1386
|
exports.ProductReleasesView = ProductReleasesView; exports.MediaGalleryStrip = MediaGalleryStrip; exports.ReleaseDetailPage = ReleaseDetailPage; exports.ReleaseDetailSkeleton = ReleaseDetailSkeleton; exports.useRoadmapVoting = useRoadmapVoting; exports.RoadmapGrid = RoadmapGrid; exports.RoadmapGridSkeleton = RoadmapGridSkeleton; exports.RoadmapView = RoadmapView; exports.DeliveryTable = DeliveryTable; exports.DeliveryLists = DeliveryLists; exports.useLegalDocs = useLegalDocs; exports.LegalDocumentPage = LegalDocumentPage;
|
|
1387
|
-
//# sourceMappingURL=chunk-
|
|
1387
|
+
//# sourceMappingURL=chunk-BXNSKTEG.cjs.map
|