@flamingo-stack/openframe-frontend-core 0.0.235 → 0.0.236

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/{chunk-ABSGXVGP.js → chunk-265KKBV2.js} +2 -2
  2. package/dist/{chunk-VO3K4EEG.js → chunk-2LEMRJ7Z.js} +3 -3
  3. package/dist/{chunk-MDWFPCHN.cjs → chunk-7SOVT7RJ.cjs} +16 -16
  4. package/dist/{chunk-MDWFPCHN.cjs.map → chunk-7SOVT7RJ.cjs.map} +1 -1
  5. package/dist/{chunk-FWYMYXL7.js → chunk-AGU44B7B.js} +2 -2
  6. package/dist/{chunk-2MHQE5ET.js → chunk-AZGRKZJ7.js} +7 -5
  7. package/dist/{chunk-X4SQ2S7Z.cjs → chunk-BXMMMSIK.cjs} +1277 -1275
  8. package/dist/chunk-BXMMMSIK.cjs.map +1 -0
  9. package/dist/{chunk-M4CWPAIB.cjs → chunk-E3VQ53IM.cjs} +7 -7
  10. package/dist/{chunk-M4CWPAIB.cjs.map → chunk-E3VQ53IM.cjs.map} +1 -1
  11. package/dist/{chunk-CG6AZ2MC.cjs → chunk-FIG2RKZF.cjs} +12 -5
  12. package/dist/chunk-FIG2RKZF.cjs.map +1 -0
  13. package/dist/{chunk-4Y7427BF.cjs → chunk-GRTZ23GL.cjs} +49 -49
  14. package/dist/{chunk-4Y7427BF.cjs.map → chunk-GRTZ23GL.cjs.map} +1 -1
  15. package/dist/{chunk-GW6J7IPD.js → chunk-HGYOMQM3.js} +2 -2
  16. package/dist/{chunk-EI36Q3EC.js → chunk-JNXFCV7K.js} +4 -4
  17. package/dist/{chunk-ZLQT3T4F.js → chunk-KIGEKMBB.js} +4 -4
  18. package/dist/{chunk-X6WUWOL5.cjs → chunk-LPJPTBRI.cjs} +38 -38
  19. package/dist/{chunk-X6WUWOL5.cjs.map → chunk-LPJPTBRI.cjs.map} +1 -1
  20. package/dist/{chunk-ETFVD7QU.cjs → chunk-NOS6DCYY.cjs} +12 -12
  21. package/dist/{chunk-ETFVD7QU.cjs.map → chunk-NOS6DCYY.cjs.map} +1 -1
  22. package/dist/{chunk-Z6FT2JDQ.js → chunk-Q3GY66ST.js} +3 -3
  23. package/dist/{chunk-76NMNINV.js → chunk-XTCBRQN2.js} +12 -5
  24. package/dist/chunk-XTCBRQN2.js.map +1 -0
  25. package/dist/{chunk-W4NBBPQL.cjs → chunk-Z4IBEIWD.cjs} +8 -8
  26. package/dist/{chunk-W4NBBPQL.cjs.map → chunk-Z4IBEIWD.cjs.map} +1 -1
  27. package/dist/{chunk-HJRWBA7M.cjs → chunk-ZP2DKI5P.cjs} +32 -32
  28. package/dist/{chunk-HJRWBA7M.cjs.map → chunk-ZP2DKI5P.cjs.map} +1 -1
  29. package/dist/components/chat/index.cjs +10 -6
  30. package/dist/components/chat/index.cjs.map +1 -1
  31. package/dist/components/chat/index.d.ts +1 -0
  32. package/dist/components/chat/index.d.ts.map +1 -1
  33. package/dist/components/chat/index.js +9 -5
  34. package/dist/components/contact/index.cjs +7 -7
  35. package/dist/components/contact/index.js +6 -6
  36. package/dist/components/features/index.cjs +6 -6
  37. package/dist/components/features/index.js +5 -5
  38. package/dist/components/icons/index.cjs +3 -3
  39. package/dist/components/icons/index.js +2 -2
  40. package/dist/components/index.cjs +241 -238
  41. package/dist/components/index.cjs.map +1 -1
  42. package/dist/components/index.js +13 -10
  43. package/dist/components/index.js.map +1 -1
  44. package/dist/components/navigation/index.cjs +6 -6
  45. package/dist/components/navigation/index.js +5 -5
  46. package/dist/components/onboarding-guides/index.cjs +30 -30
  47. package/dist/components/onboarding-guides/index.js +7 -7
  48. package/dist/components/tickets/index.cjs +89 -89
  49. package/dist/components/tickets/index.js +8 -8
  50. package/dist/components/ui/file-manager/index.cjs +69 -69
  51. package/dist/components/ui/file-manager/index.js +2 -2
  52. package/dist/components/ui/index.cjs +10 -6
  53. package/dist/components/ui/index.cjs.map +1 -1
  54. package/dist/components/ui/index.js +9 -5
  55. package/dist/components/vendor-display-button.d.ts.map +1 -1
  56. package/dist/hooks/index.cjs +4 -4
  57. package/dist/hooks/index.js +3 -3
  58. package/dist/index.cjs +10 -6
  59. package/dist/index.cjs.map +1 -1
  60. package/dist/index.js +9 -5
  61. package/dist/platform-domains.cjs +25 -3
  62. package/dist/platform-domains.cjs.map +1 -1
  63. package/dist/platform-domains.d.ts +32 -1
  64. package/dist/platform-domains.d.ts.map +1 -1
  65. package/dist/platform-domains.js +23 -4
  66. package/dist/platform-domains.js.map +1 -1
  67. package/dist/types/index.cjs +10 -3
  68. package/dist/types/index.cjs.map +1 -1
  69. package/dist/types/index.js +10 -3
  70. package/dist/types/index.js.map +1 -1
  71. package/dist/utils/index.cjs +10 -3
  72. package/dist/utils/index.cjs.map +1 -1
  73. package/dist/utils/index.js +10 -3
  74. package/dist/utils/index.js.map +1 -1
  75. package/package.json +1 -1
  76. package/src/__tests__/platform-domains.test.ts +52 -0
  77. package/src/components/chat/index.ts +1 -0
  78. package/src/components/vendor-display-button.tsx +4 -3
  79. package/src/platform-domains.ts +71 -10
  80. package/dist/chunk-76NMNINV.js.map +0 -1
  81. package/dist/chunk-CG6AZ2MC.cjs.map +0 -1
  82. package/dist/chunk-X4SQ2S7Z.cjs.map +0 -1
  83. /package/dist/{chunk-ABSGXVGP.js.map → chunk-265KKBV2.js.map} +0 -0
  84. /package/dist/{chunk-VO3K4EEG.js.map → chunk-2LEMRJ7Z.js.map} +0 -0
  85. /package/dist/{chunk-FWYMYXL7.js.map → chunk-AGU44B7B.js.map} +0 -0
  86. /package/dist/{chunk-2MHQE5ET.js.map → chunk-AZGRKZJ7.js.map} +0 -0
  87. /package/dist/{chunk-GW6J7IPD.js.map → chunk-HGYOMQM3.js.map} +0 -0
  88. /package/dist/{chunk-EI36Q3EC.js.map → chunk-JNXFCV7K.js.map} +0 -0
  89. /package/dist/{chunk-ZLQT3T4F.js.map → chunk-KIGEKMBB.js.map} +0 -0
  90. /package/dist/{chunk-Z6FT2JDQ.js.map → chunk-Q3GY66ST.js.map} +0 -0
@@ -7,10 +7,10 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkX4SQ2S7Zcjs = require('./chunk-X4SQ2S7Z.cjs');
10
+ var _chunkBXMMMSIKcjs = require('./chunk-BXMMMSIK.cjs');
11
11
 
12
12
 
13
- var _chunkX6WUWOL5cjs = require('./chunk-X6WUWOL5.cjs');
13
+ var _chunkLPJPTBRIcjs = require('./chunk-LPJPTBRI.cjs');
14
14
 
15
15
 
16
16
  var _chunkG7UE6RKVcjs = require('./chunk-G7UE6RKV.cjs');
@@ -34,7 +34,7 @@ function DocSearchResultRow({
34
34
  }) {
35
35
  const docType = _optionalChain([result, 'access', _2 => _2.metadata, 'optionalAccess', _3 => _3.documentType]) || void 0;
36
36
  const sourceRepo = _optionalChain([result, 'access', _4 => _4.metadata, 'optionalAccess', _5 => _5.sourceRepo]) || void 0;
37
- const { Icon: SourceIcon, label: iconLabel } = _chunkX4SQ2S7Zcjs.resolveSourceIcon.call(void 0, {
37
+ const { Icon: SourceIcon, label: iconLabel } = _chunkBXMMMSIKcjs.resolveSourceIcon.call(void 0, {
38
38
  sourceRepo,
39
39
  documentType: docType
40
40
  });
@@ -77,7 +77,7 @@ function DocSearchBar({
77
77
  renderResult
78
78
  }) {
79
79
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
80
- _chunkX4SQ2S7Zcjs.SearchInput,
80
+ _chunkBXMMMSIKcjs.SearchInput,
81
81
  {
82
82
  placeholder,
83
83
  value: query,
@@ -186,7 +186,7 @@ function resolveSearchResultAction(result, source, runtimeMode) {
186
186
  const externalUrl = meta.externalUrl;
187
187
  if (externalUrl) {
188
188
  const targetPlatform = meta.targetPlatform;
189
- const isNewTab = _chunkX4SQ2S7Zcjs.decideNewTab.call(void 0, {
189
+ const isNewTab = _chunkBXMMMSIKcjs.decideNewTab.call(void 0, {
190
190
  href: externalUrl,
191
191
  targetPlatform,
192
192
  surface: "useUnifiedNav",
@@ -230,7 +230,7 @@ function useDocSearch(config) {
230
230
  const [query, setQuery] = _react.useState.call(void 0, "");
231
231
  const [results, setResults] = _react.useState.call(void 0, []);
232
232
  const [isFetching, setIsFetching] = _react.useState.call(void 0, false);
233
- const debouncedQuery = _chunkX6WUWOL5cjs.useDebounce.call(void 0, query, 300);
233
+ const debouncedQuery = _chunkLPJPTBRIcjs.useDebounce.call(void 0, query, 300);
234
234
  _react.useEffect.call(void 0, () => {
235
235
  if (!debouncedQuery || debouncedQuery.trim().length < 2) {
236
236
  setResults([]);
@@ -287,7 +287,7 @@ function useDocSearch(config) {
287
287
  if (_optionalChain([runtime, 'optionalAccess', _13 => _13.navigation, 'access', _14 => _14.mode]) === "embed") {
288
288
  setKeepOpen(true);
289
289
  const targetPlatform = _nullishCoalesce(_optionalChain([result, 'access', _15 => _15.metadata, 'optionalAccess', _16 => _16.targetPlatform]), () => ( null));
290
- _chunkX4SQ2S7Zcjs.resolveExternalNavigation.call(void 0, {
290
+ _chunkBXMMMSIKcjs.resolveExternalNavigation.call(void 0, {
291
291
  href: action.href,
292
292
  targetPlatform,
293
293
  runtime
@@ -296,18 +296,18 @@ function useDocSearch(config) {
296
296
  }
297
297
  if (wantsNewTab) {
298
298
  setKeepOpen(true);
299
- window.open(action.href, "_blank", _chunkX4SQ2S7Zcjs.NEW_TAB_FEATURES);
299
+ window.open(action.href, "_blank", _chunkBXMMMSIKcjs.NEW_TAB_FEATURES);
300
300
  return;
301
301
  }
302
302
  setKeepOpen(false);
303
303
  const path = baseRoute && action.href.startsWith(`${baseRoute}/`) ? action.href.slice(baseRoute.length + 1) : null;
304
304
  if (path && _optionalChain([onInPageSwap, 'optionalCall', _17 => _17(path)])) return;
305
- router.push(_chunkX4SQ2S7Zcjs.stripSameOriginToPath.call(void 0, action.href));
305
+ router.push(_chunkBXMMMSIKcjs.stripSameOriginToPath.call(void 0, action.href));
306
306
  return;
307
307
  }
308
308
  case "navigate-new-tab":
309
309
  setKeepOpen(true);
310
- window.open(action.href, "_blank", _chunkX4SQ2S7Zcjs.NEW_TAB_FEATURES);
310
+ window.open(action.href, "_blank", _chunkBXMMMSIKcjs.NEW_TAB_FEATURES);
311
311
  return;
312
312
  case "ask-ai":
313
313
  setKeepOpen(false);
@@ -345,7 +345,7 @@ function DetailPageSkeleton({
345
345
  showImageGallery = true
346
346
  } = {}) {
347
347
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
348
- _chunkX4SQ2S7Zcjs.PageContainer,
348
+ _chunkBXMMMSIKcjs.PageContainer,
349
349
  {
350
350
  as: "article",
351
351
  backgroundClassName: "bg-ods-bg",
@@ -446,4 +446,4 @@ function useSelfFetch(url, options) {
446
446
 
447
447
 
448
448
  exports.formatRelativePath = formatRelativePath; exports.DocSearchResultRow = DocSearchResultRow; exports.DocSearchBar = DocSearchBar; exports.mapDocSearchResults = mapDocSearchResults; exports.resolveSearchResultAction = resolveSearchResultAction; exports.useDocSearch = useDocSearch; exports.useSelfFetch = useSelfFetch; exports.DetailPageSkeleton = DetailPageSkeleton;
449
- //# sourceMappingURL=chunk-ETFVD7QU.cjs.map
449
+ //# sourceMappingURL=chunk-NOS6DCYY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-ETFVD7QU.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","../src/components/shared/detail-page-skeleton.tsx","../src/hooks/use-self-fetch.ts"],"names":["jsx"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;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ACO,wBAAA;AAKL,wBAAA;AAA8C,0BAAA;AACA,0BAAA;AACA,0BAAA;AAChD,QAAA;AAGgE,wBAAA;AAGL,0BAAA;AACL,0BAAA;AAGtD,QAAA;AAKY,QAAA;AAQwD,QAAA;AAMhE,QAAA;AAA+C,0BAAA;AAE7C,0BAAA;AAAgD,4BAAA;AACA,4BAAA;AACD,4BAAA;AACjD,UAAA;AAEH,QAAA;AACH,MAAA;AAAA,IAAA;AACF,EAAA;AAEJ;APmT2H;AACA;AQzX3C;AAqCvD;AACM,EAAA;AACiC,EAAA;AACsB,EAAA;AAC5C,EAAA;AACI,EAAA;AAMmC,EAAA;AAK/D,EAAA;AACoC,IAAA;AACpC,EAAA;AAEA,EAAA;AACI,IAAA;AACE,MAAA;AAClB,MAAA;AACF,IAAA;AAGgC,IAAA;AACC,IAAA;AACjB,IAAA;AACM,IAAA;AAChB,MAAA;AACe,QAAA;AACH,QAAA;AACgD,QAAA;AACD,QAAA;AAChC,QAAA;AACb,QAAA;AACF,UAAA;AACS,UAAA;AACvB,QAAA;AACY,MAAA;AAM4C,QAAA;AAC3C,QAAA;AAC0B,QAAA;AACvC,MAAA;AACkC,QAAA;AACpC,MAAA;AACF,IAAA;AACK,IAAA;AACQ,IAAA;AACC,MAAA;AACD,MAAA;AACb,IAAA;AAEiB,EAAA;AAEZ,EAAA;AACL,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAAA;AAAA;AAGc,IAAA;AACS,MAAA;AACI,MAAA;AAC3B,IAAA;AACF,EAAA;AACF;ARoU2H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-ETFVD7QU.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\n .map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1).replace(/-/g, ' '))\n .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({\n result,\n isHighlighted,\n}: 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 items-center gap-3 w-full min-w-0\">\n <span\n className=\"flex-shrink-0 text-ods-text-secondary\"\n title={iconLabel}\n >\n <SourceIcon className=\"size-4\" />\n </span>\n <div className=\"min-w-0 flex-1\">\n <div\n className={`text-sm font-medium leading-5 truncate ${\n isHighlighted ? 'text-ods-accent' : 'text-ods-text-primary'\n }`}\n >\n {result.title || result.path}\n </div>\n {!isGroup && result.path?.includes('/') && (\n <div className=\"text-xs leading-4 text-ods-text-secondary truncate mt-0.5\">\n {formatRelativePath(result.path)}\n </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) => (\n <DocSearchResultRow result={result} isHighlighted={isHighlighted} />\n ))\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<\n { type: 'entity'; repo: string } | { type: 'doc'; doc: DocSearchResult }\n > = []\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 const rows = entityGroups.get(entry.repo)!\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\n ? { targetPlatform: doc.targetPlatform }\n : {}),\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 → use `decideNewTab` to choose same-tab vs\n * new-tab against the row's `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 { SearchResult } from '../../ui/search-input'\nimport type { ChatRef } from '../../chat/chat-ref.types'\nimport { decideNewTab } from '../../chat/utils/decide-new-tab'\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): SearchResultAction {\n const meta = result.metadata ?? {}\n const externalUrl = meta.externalUrl as string | undefined\n if (externalUrl) {\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 targetPlatform = meta.targetPlatform as string | null | undefined\n const isNewTab = decideNewTab({\n href: externalUrl,\n targetPlatform,\n surface: 'useUnifiedNav',\n runtimeMode,\n currentSource: source,\n })\n return isNewTab\n ? { kind: 'navigate-new-tab', href: externalUrl }\n : { kind: 'navigate-same-tab', href: externalUrl }\n }\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 (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\nimport { useState, useEffect, useCallback } from 'react'\nimport { useRouter } from '../../../embed-shims'\nimport { useDebounce } from '../../../hooks/ui/use-debounce'\nimport { useChatRuntime } from '../../../contexts/chat-runtime-context'\nimport type { SearchResult } from '../../ui/search-input'\nimport {\n resolveExternalNavigation,\n stripSameOriginToPath,\n NEW_TAB_FEATURES,\n} from '../../chat/utils/chat-nav-resolution'\nimport type { DocSearchResult } from './types'\nimport { mapDocSearchResults } from './map-doc-search-results'\nimport { resolveSearchResultAction } from './resolve-search-result-action'\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}\n\nexport function useDocSearch(config: UseDocSearchConfig) {\n const {\n source,\n baseRoute,\n onNavigate,\n tableIds,\n onInPageSwap,\n searchEndpoint = '/api/docs/search',\n } = 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 const runtime = useChatRuntime()\n\n const [query, setQuery] = useState('')\n const [results, setResults] = useState<SearchResult[]>([])\n const [isFetching, setIsFetching] = useState(false)\n const debouncedQuery = useDebounce(query, 300)\n\n useEffect(() => {\n if (!debouncedQuery || debouncedQuery.trim().length < 2) {\n setResults([])\n setIsFetching(false)\n return\n }\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 fetch(`${searchEndpoint}?${params.toString()}`)\n if (!response.ok) {\n throw new Error(`Search request failed: ${response.status}`)\n }\n\n const json = await response.json()\n\n if (!cancelled && json.success && Array.isArray(json.data)) {\n const mapped = mapDocSearchResults(json.data as DocSearchResult[])\n setResults(mapped)\n }\n } catch (error) {\n console.error('Doc search error:', error)\n if (!cancelled) {\n setResults([])\n }\n } finally {\n if (!cancelled) {\n setIsFetching(false)\n }\n }\n }\n\n fetchResults()\n\n return () => {\n cancelled = true\n }\n }, [debouncedQuery, source, tableIdsKey, searchEndpoint])\n\n // Derived loading state — single source of truth for \"should the\n // dropdown show 'Loading...' instead of 'No results found'\":\n const isLoading =\n 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(\n result,\n source,\n runtime?.navigation.mode,\n )\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 // Embed-mode short-circuit — autocomplete row clicked while\n // the chat panel is hosted inside an embedding app.\n if (runtime?.navigation.mode === 'embed') {\n setKeepOpen(true)\n const targetPlatform =\n (result.metadata?.targetPlatform as string | null | undefined) ?? null\n resolveExternalNavigation({\n href: action.href,\n targetPlatform,\n runtime,\n }).open()\n return\n }\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}/`)\n ? action.href.slice(baseRoute.length + 1)\n : 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 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(\n new CustomEvent('ask-ai:open-with-ref', { detail: action.detail }),\n )\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],\n )\n\n // Reset keepOpen when query changes.\n useEffect(() => {\n setKeepOpen(false)\n }, [query])\n\n return {\n query,\n setQuery,\n results,\n isLoading,\n handleResultSelect,\n keepDropdownOpen: keepOpen,\n }\n}\n","\"use client\";\n\nimport { PageContainer } from '../layout/page-container';\n\nexport interface DetailPageSkeletonProps {\n metadataColumns?: number; // Number of metadata grid columns (default 4)\n showImageGallery?: boolean; // Show horizontal image gallery (default true)\n}\n\nexport function DetailPageSkeleton({\n metadataColumns = 4,\n showImageGallery = true\n}: DetailPageSkeletonProps = {}) {\n return (\n <PageContainer\n as=\"article\"\n backgroundClassName=\"bg-ods-bg\"\n contentPadding=\"py-6 md:py-10 px-6 md:px-20\"\n maxWidth=\"max-w-[1280px]\"\n >\n <div className=\"space-y-6 md:space-y-10 animate-pulse\">\n {/* Title Block */}\n <div className=\"flex flex-col gap-6 w-full\">\n <div className=\"h-16 md:h-20 w-full max-w-3xl bg-ods-card rounded\"></div>\n </div>\n\n {/* Category Tags Skeleton */}\n <div className=\"flex flex-wrap gap-2 w-full\">\n <div className=\"h-8 w-32 bg-ods-card rounded\"></div>\n <div className=\"h-8 w-28 bg-ods-card rounded\"></div>\n <div className=\"h-8 w-36 bg-ods-card rounded\"></div>\n </div>\n\n {/* Metadata Grid Skeleton */}\n <div className={`grid grid-cols-1 md:grid-cols-${metadataColumns} border border-ods-border rounded-md overflow-hidden w-full`}>\n {Array.from({ length: metadataColumns }).map((_, i) => (\n <div key={i} className=\"bg-ods-card border-b md:border-b-0 md:border-r last:border-r-0 border-ods-border p-4\">\n <div className=\"h-6 w-24 bg-ods-border rounded mb-2\"></div>\n <div className=\"h-5 w-20 bg-ods-border rounded\"></div>\n </div>\n ))}\n </div>\n\n {/* Image Gallery Skeleton */}\n {showImageGallery && (\n <div className=\"flex gap-6 overflow-x-auto w-full\">\n {[1, 2, 3, 4, 5].map((i) => (\n <div key={i} className=\"shrink-0 w-[240px] h-[200px] bg-ods-card rounded-md border border-ods-border\"></div>\n ))}\n </div>\n )}\n\n {/* Featured Image Skeleton (for case studies) */}\n {!showImageGallery && (\n <div className=\"aspect-[2560/1366] w-full bg-ods-card rounded-md\"></div>\n )}\n\n {/* Content Sections Skeleton */}\n {[1, 2, 3].map((section) => (\n <div key={section} className=\"space-y-6\">\n <div className=\"h-16 w-64 bg-ods-card rounded\"></div>\n <div className=\"space-y-3\">\n <div className=\"h-6 w-full bg-ods-card rounded\"></div>\n <div className=\"h-6 w-full bg-ods-card rounded\"></div>\n <div className=\"h-6 w-4/5 bg-ods-card rounded\"></div>\n </div>\n </div>\n ))}\n </div>\n </PageContainer>\n );\n}\n","'use client'\n\nimport { useEffect, useRef, useState, type Dispatch, type SetStateAction } from 'react'\n\nexport interface UseSelfFetchResult<T> {\n data: T | null\n /** Imperatively patch the fetched data (e.g. optimistic vote updates). */\n setData: Dispatch<SetStateAction<T | null>>\n isLoading: boolean\n error: boolean\n /** Re-run the fetch (error-retry affordance). */\n reload: () => void\n}\n\n/**\n * The single source for the 4 self-fetching content views\n * (`ProductReleasesView`, `RoadmapView`, the onboarding catalog/detail). GETs a\n * configured `url` into component state with **plain `fetch` + `useEffect`** —\n * deliberately NO react-query, so embedders don't need a QueryClient. This is\n * the same technology choice the shipped `DeliveryLists` makes; that component\n * predates this hook and still hand-rolls the loop (a future pass can migrate\n * it onto a two-url variant of this hook).\n *\n * Behaviour:\n * - `url = null` → fetching is DISABLED (controlled / SSR mode, or missing\n * config); returns `initialData ?? null` and never fetches.\n * - `initialData` provided → hydrates immediately and SKIPS the first fetch\n * (so the hub's server-rendered data isn't re-fetched on mount); later\n * `url` changes still re-fetch.\n * - a `cancelled` guard ensures an in-flight response from a STALE `url`\n * (e.g. a fast pagination / section toggle) can't overwrite a newer one.\n * - `reload()` bumps an internal key to retry after an error.\n *\n * Re-fetches whenever `url` changes, so callers fold all query params INTO the\n * url string (the url IS the cache key).\n */\nexport function useSelfFetch<T>(\n url: string | null,\n options?: { initialData?: T },\n): UseSelfFetchResult<T> {\n const initialData = options?.initialData\n const [data, setData] = useState<T | null>(initialData ?? null)\n const [isLoading, setIsLoading] = useState(initialData === undefined && url !== null)\n const [error, setError] = useState(false)\n const [reloadKey, setReloadKey] = useState(0)\n // The url whose data we currently hold — seeded from SSR `initialData`, then set after\n // each completed fetch. The effect skips the fetch when this equals `url` (so server-\n // rendered data isn't re-fetched on mount). A VALUE compare (not a one-shot flag) so the\n // SSR-hydration skip survives React 18 StrictMode's mount→unmount→remount in dev;\n // `reload()` nulls it to force a re-fetch of the same url.\n const dataUrlRef = useRef<string | null>(initialData !== undefined ? url : null)\n\n // Re-sync when a CONTROLLED `initialData` changes (e.g. the host navigates\n // between detail slugs without remounting). No-op in self-fetch mode, where\n // `initialData` is `undefined`.\n useEffect(() => {\n if (initialData !== undefined) setData(initialData)\n }, [initialData])\n\n useEffect(() => {\n if (url === null) {\n setIsLoading(false)\n return\n }\n // Already hold data for this exact url (SSR-hydrated, or a prior completed fetch) →\n // skip. `reload()` clears `dataUrlRef` so a retry of the same url still fetches.\n if (dataUrlRef.current === url) return\n const ctrl = new AbortController()\n let cancelled = false\n async function load() {\n try {\n setIsLoading(true)\n setError(false)\n const res = await fetch(url as string, { signal: ctrl.signal })\n if (!res.ok) throw new Error(`Request failed (${res.status})`)\n const json = (await res.json()) as T\n if (!cancelled) {\n setData(json)\n dataUrlRef.current = url // remember the url we now hold data for\n }\n } catch (err) {\n // AbortError on cleanup (unmount / stale-url change / React StrictMode's dev\n // double-invoke) is EXPECTED — the request was intentionally aborted. Aborting\n // also means the orphaned StrictMode fetch shows as \"cancelled\" instead of\n // completing as a wasted duplicate (parity with useChatIdentity). Only real\n // failures fall through to the error state + console.\n if (cancelled || (err as Error)?.name === 'AbortError') return\n setError(true)\n console.error('useSelfFetch:', url, err)\n } finally {\n if (!cancelled) setIsLoading(false)\n }\n }\n load()\n return () => {\n cancelled = true\n ctrl.abort()\n }\n // `url` folds in every query param; `reloadKey` drives retry.\n }, [url, reloadKey])\n\n return {\n data,\n setData,\n isLoading,\n error,\n // Force a re-fetch of the current url: clear the held-url ref so the skip above\n // doesn't short-circuit, then bump the effect key.\n reload: () => {\n dataUrlRef.current = null\n setReloadKey((k) => k + 1)\n },\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-NOS6DCYY.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","../src/components/shared/detail-page-skeleton.tsx","../src/hooks/use-self-fetch.ts"],"names":["jsx"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACZO,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,CACJ,GAAA,CAAI,CAAC,GAAA,EAAA,GAAQ,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,CAC1E,IAAA,CAAK,KAAK,CAAA;AACf;ADWA;AACA;AE0BQ,+CAAA;AAlBD,SAAS,kBAAA,CAAmB;AAAA,EACjC,MAAA;AAAA,EACA;AACF,CAAA,EAA4B;AAC1B,EAAA,MAAM,QAAA,kBAAW,MAAA,qBAAO,QAAA,6BAAU,eAAA,GAA2B,KAAA,CAAA;AAC7D,EAAA,MAAM,WAAA,kBAAc,MAAA,qBAAO,QAAA,6BAAU,aAAA,GAAyB,KAAA,CAA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IAAA;AACA,IAAA;AAAA;AAAA;AAGc,IAAA;AACS,MAAA;AACI,MAAA;AAC3B,IAAA;AACF,EAAA;AACF;ARoU2H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-NOS6DCYY.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\n .map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1).replace(/-/g, ' '))\n .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({\n result,\n isHighlighted,\n}: 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 items-center gap-3 w-full min-w-0\">\n <span\n className=\"flex-shrink-0 text-ods-text-secondary\"\n title={iconLabel}\n >\n <SourceIcon className=\"size-4\" />\n </span>\n <div className=\"min-w-0 flex-1\">\n <div\n className={`text-sm font-medium leading-5 truncate ${\n isHighlighted ? 'text-ods-accent' : 'text-ods-text-primary'\n }`}\n >\n {result.title || result.path}\n </div>\n {!isGroup && result.path?.includes('/') && (\n <div className=\"text-xs leading-4 text-ods-text-secondary truncate mt-0.5\">\n {formatRelativePath(result.path)}\n </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) => (\n <DocSearchResultRow result={result} isHighlighted={isHighlighted} />\n ))\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<\n { type: 'entity'; repo: string } | { type: 'doc'; doc: DocSearchResult }\n > = []\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 const rows = entityGroups.get(entry.repo)!\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\n ? { targetPlatform: doc.targetPlatform }\n : {}),\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 → use `decideNewTab` to choose same-tab vs\n * new-tab against the row's `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 { SearchResult } from '../../ui/search-input'\nimport type { ChatRef } from '../../chat/chat-ref.types'\nimport { decideNewTab } from '../../chat/utils/decide-new-tab'\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): SearchResultAction {\n const meta = result.metadata ?? {}\n const externalUrl = meta.externalUrl as string | undefined\n if (externalUrl) {\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 targetPlatform = meta.targetPlatform as string | null | undefined\n const isNewTab = decideNewTab({\n href: externalUrl,\n targetPlatform,\n surface: 'useUnifiedNav',\n runtimeMode,\n currentSource: source,\n })\n return isNewTab\n ? { kind: 'navigate-new-tab', href: externalUrl }\n : { kind: 'navigate-same-tab', href: externalUrl }\n }\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 (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\nimport { useState, useEffect, useCallback } from 'react'\nimport { useRouter } from '../../../embed-shims'\nimport { useDebounce } from '../../../hooks/ui/use-debounce'\nimport { useChatRuntime } from '../../../contexts/chat-runtime-context'\nimport type { SearchResult } from '../../ui/search-input'\nimport {\n resolveExternalNavigation,\n stripSameOriginToPath,\n NEW_TAB_FEATURES,\n} from '../../chat/utils/chat-nav-resolution'\nimport type { DocSearchResult } from './types'\nimport { mapDocSearchResults } from './map-doc-search-results'\nimport { resolveSearchResultAction } from './resolve-search-result-action'\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}\n\nexport function useDocSearch(config: UseDocSearchConfig) {\n const {\n source,\n baseRoute,\n onNavigate,\n tableIds,\n onInPageSwap,\n searchEndpoint = '/api/docs/search',\n } = 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 const runtime = useChatRuntime()\n\n const [query, setQuery] = useState('')\n const [results, setResults] = useState<SearchResult[]>([])\n const [isFetching, setIsFetching] = useState(false)\n const debouncedQuery = useDebounce(query, 300)\n\n useEffect(() => {\n if (!debouncedQuery || debouncedQuery.trim().length < 2) {\n setResults([])\n setIsFetching(false)\n return\n }\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 fetch(`${searchEndpoint}?${params.toString()}`)\n if (!response.ok) {\n throw new Error(`Search request failed: ${response.status}`)\n }\n\n const json = await response.json()\n\n if (!cancelled && json.success && Array.isArray(json.data)) {\n const mapped = mapDocSearchResults(json.data as DocSearchResult[])\n setResults(mapped)\n }\n } catch (error) {\n console.error('Doc search error:', error)\n if (!cancelled) {\n setResults([])\n }\n } finally {\n if (!cancelled) {\n setIsFetching(false)\n }\n }\n }\n\n fetchResults()\n\n return () => {\n cancelled = true\n }\n }, [debouncedQuery, source, tableIdsKey, searchEndpoint])\n\n // Derived loading state — single source of truth for \"should the\n // dropdown show 'Loading...' instead of 'No results found'\":\n const isLoading =\n 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(\n result,\n source,\n runtime?.navigation.mode,\n )\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 // Embed-mode short-circuit — autocomplete row clicked while\n // the chat panel is hosted inside an embedding app.\n if (runtime?.navigation.mode === 'embed') {\n setKeepOpen(true)\n const targetPlatform =\n (result.metadata?.targetPlatform as string | null | undefined) ?? null\n resolveExternalNavigation({\n href: action.href,\n targetPlatform,\n runtime,\n }).open()\n return\n }\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}/`)\n ? action.href.slice(baseRoute.length + 1)\n : 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 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(\n new CustomEvent('ask-ai:open-with-ref', { detail: action.detail }),\n )\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],\n )\n\n // Reset keepOpen when query changes.\n useEffect(() => {\n setKeepOpen(false)\n }, [query])\n\n return {\n query,\n setQuery,\n results,\n isLoading,\n handleResultSelect,\n keepDropdownOpen: keepOpen,\n }\n}\n","\"use client\";\n\nimport { PageContainer } from '../layout/page-container';\n\nexport interface DetailPageSkeletonProps {\n metadataColumns?: number; // Number of metadata grid columns (default 4)\n showImageGallery?: boolean; // Show horizontal image gallery (default true)\n}\n\nexport function DetailPageSkeleton({\n metadataColumns = 4,\n showImageGallery = true\n}: DetailPageSkeletonProps = {}) {\n return (\n <PageContainer\n as=\"article\"\n backgroundClassName=\"bg-ods-bg\"\n contentPadding=\"py-6 md:py-10 px-6 md:px-20\"\n maxWidth=\"max-w-[1280px]\"\n >\n <div className=\"space-y-6 md:space-y-10 animate-pulse\">\n {/* Title Block */}\n <div className=\"flex flex-col gap-6 w-full\">\n <div className=\"h-16 md:h-20 w-full max-w-3xl bg-ods-card rounded\"></div>\n </div>\n\n {/* Category Tags Skeleton */}\n <div className=\"flex flex-wrap gap-2 w-full\">\n <div className=\"h-8 w-32 bg-ods-card rounded\"></div>\n <div className=\"h-8 w-28 bg-ods-card rounded\"></div>\n <div className=\"h-8 w-36 bg-ods-card rounded\"></div>\n </div>\n\n {/* Metadata Grid Skeleton */}\n <div className={`grid grid-cols-1 md:grid-cols-${metadataColumns} border border-ods-border rounded-md overflow-hidden w-full`}>\n {Array.from({ length: metadataColumns }).map((_, i) => (\n <div key={i} className=\"bg-ods-card border-b md:border-b-0 md:border-r last:border-r-0 border-ods-border p-4\">\n <div className=\"h-6 w-24 bg-ods-border rounded mb-2\"></div>\n <div className=\"h-5 w-20 bg-ods-border rounded\"></div>\n </div>\n ))}\n </div>\n\n {/* Image Gallery Skeleton */}\n {showImageGallery && (\n <div className=\"flex gap-6 overflow-x-auto w-full\">\n {[1, 2, 3, 4, 5].map((i) => (\n <div key={i} className=\"shrink-0 w-[240px] h-[200px] bg-ods-card rounded-md border border-ods-border\"></div>\n ))}\n </div>\n )}\n\n {/* Featured Image Skeleton (for case studies) */}\n {!showImageGallery && (\n <div className=\"aspect-[2560/1366] w-full bg-ods-card rounded-md\"></div>\n )}\n\n {/* Content Sections Skeleton */}\n {[1, 2, 3].map((section) => (\n <div key={section} className=\"space-y-6\">\n <div className=\"h-16 w-64 bg-ods-card rounded\"></div>\n <div className=\"space-y-3\">\n <div className=\"h-6 w-full bg-ods-card rounded\"></div>\n <div className=\"h-6 w-full bg-ods-card rounded\"></div>\n <div className=\"h-6 w-4/5 bg-ods-card rounded\"></div>\n </div>\n </div>\n ))}\n </div>\n </PageContainer>\n );\n}\n","'use client'\n\nimport { useEffect, useRef, useState, type Dispatch, type SetStateAction } from 'react'\n\nexport interface UseSelfFetchResult<T> {\n data: T | null\n /** Imperatively patch the fetched data (e.g. optimistic vote updates). */\n setData: Dispatch<SetStateAction<T | null>>\n isLoading: boolean\n error: boolean\n /** Re-run the fetch (error-retry affordance). */\n reload: () => void\n}\n\n/**\n * The single source for the 4 self-fetching content views\n * (`ProductReleasesView`, `RoadmapView`, the onboarding catalog/detail). GETs a\n * configured `url` into component state with **plain `fetch` + `useEffect`** —\n * deliberately NO react-query, so embedders don't need a QueryClient. This is\n * the same technology choice the shipped `DeliveryLists` makes; that component\n * predates this hook and still hand-rolls the loop (a future pass can migrate\n * it onto a two-url variant of this hook).\n *\n * Behaviour:\n * - `url = null` → fetching is DISABLED (controlled / SSR mode, or missing\n * config); returns `initialData ?? null` and never fetches.\n * - `initialData` provided → hydrates immediately and SKIPS the first fetch\n * (so the hub's server-rendered data isn't re-fetched on mount); later\n * `url` changes still re-fetch.\n * - a `cancelled` guard ensures an in-flight response from a STALE `url`\n * (e.g. a fast pagination / section toggle) can't overwrite a newer one.\n * - `reload()` bumps an internal key to retry after an error.\n *\n * Re-fetches whenever `url` changes, so callers fold all query params INTO the\n * url string (the url IS the cache key).\n */\nexport function useSelfFetch<T>(\n url: string | null,\n options?: { initialData?: T },\n): UseSelfFetchResult<T> {\n const initialData = options?.initialData\n const [data, setData] = useState<T | null>(initialData ?? null)\n const [isLoading, setIsLoading] = useState(initialData === undefined && url !== null)\n const [error, setError] = useState(false)\n const [reloadKey, setReloadKey] = useState(0)\n // The url whose data we currently hold — seeded from SSR `initialData`, then set after\n // each completed fetch. The effect skips the fetch when this equals `url` (so server-\n // rendered data isn't re-fetched on mount). A VALUE compare (not a one-shot flag) so the\n // SSR-hydration skip survives React 18 StrictMode's mount→unmount→remount in dev;\n // `reload()` nulls it to force a re-fetch of the same url.\n const dataUrlRef = useRef<string | null>(initialData !== undefined ? url : null)\n\n // Re-sync when a CONTROLLED `initialData` changes (e.g. the host navigates\n // between detail slugs without remounting). No-op in self-fetch mode, where\n // `initialData` is `undefined`.\n useEffect(() => {\n if (initialData !== undefined) setData(initialData)\n }, [initialData])\n\n useEffect(() => {\n if (url === null) {\n setIsLoading(false)\n return\n }\n // Already hold data for this exact url (SSR-hydrated, or a prior completed fetch) →\n // skip. `reload()` clears `dataUrlRef` so a retry of the same url still fetches.\n if (dataUrlRef.current === url) return\n const ctrl = new AbortController()\n let cancelled = false\n async function load() {\n try {\n setIsLoading(true)\n setError(false)\n const res = await fetch(url as string, { signal: ctrl.signal })\n if (!res.ok) throw new Error(`Request failed (${res.status})`)\n const json = (await res.json()) as T\n if (!cancelled) {\n setData(json)\n dataUrlRef.current = url // remember the url we now hold data for\n }\n } catch (err) {\n // AbortError on cleanup (unmount / stale-url change / React StrictMode's dev\n // double-invoke) is EXPECTED — the request was intentionally aborted. Aborting\n // also means the orphaned StrictMode fetch shows as \"cancelled\" instead of\n // completing as a wasted duplicate (parity with useChatIdentity). Only real\n // failures fall through to the error state + console.\n if (cancelled || (err as Error)?.name === 'AbortError') return\n setError(true)\n console.error('useSelfFetch:', url, err)\n } finally {\n if (!cancelled) setIsLoading(false)\n }\n }\n load()\n return () => {\n cancelled = true\n ctrl.abort()\n }\n // `url` folds in every query param; `reloadKey` drives retry.\n }, [url, reloadKey])\n\n return {\n data,\n setData,\n isLoading,\n error,\n // Force a re-fetch of the current url: clear the held-url ref so the skip above\n // doesn't short-circuit, then bump the effect key.\n reload: () => {\n dataUrlRef.current = null\n setReloadKey((k) => k + 1)\n },\n }\n}\n"]}
@@ -9,11 +9,11 @@ import {
9
9
  MiamiCyberGangLogoFaceOnly,
10
10
  OpenFrameLogo,
11
11
  OpenmspLogo
12
- } from "./chunk-ABSGXVGP.js";
12
+ } from "./chunk-265KKBV2.js";
13
13
  import {
14
14
  cn,
15
15
  init_cn
16
- } from "./chunk-76NMNINV.js";
16
+ } from "./chunk-XTCBRQN2.js";
17
17
  import {
18
18
  AuthentikLogoGreyIcon,
19
19
  Chevron02DownIcon,
@@ -3103,4 +3103,4 @@ export {
3103
3103
  splitCsvEnv,
3104
3104
  useHumanitySignals
3105
3105
  };
3106
- //# sourceMappingURL=chunk-Z6FT2JDQ.js.map
3106
+ //# sourceMappingURL=chunk-Q3GY66ST.js.map
@@ -12,8 +12,14 @@ function envOverrideFor(key) {
12
12
  if (!envVar) return null;
13
13
  return ENV_OVERRIDES[envVar] || null;
14
14
  }
15
+ function ensureScheme(url) {
16
+ const trimmed = url.trim();
17
+ if (/^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed)) return trimmed;
18
+ return `https://${trimmed.replace(/^\/+/, "")}`;
19
+ }
15
20
  function getPlatformProductionUrl(platform) {
16
- return envOverrideFor(platform) ?? byKey(platform)?.defaultUrl ?? envOverrideFor("flamingo") ?? "https://www.flamingo.run";
21
+ const resolved = envOverrideFor(platform) ?? byKey(platform)?.defaultUrl ?? envOverrideFor("flamingo") ?? "https://www.flamingo.run";
22
+ return ensureScheme(resolved);
17
23
  }
18
24
  function hostOf(value) {
19
25
  if (!value) return null;
@@ -76,7 +82,7 @@ function getAllPlatformBaseDomains() {
76
82
  }
77
83
  return Array.from(baseDomains);
78
84
  }
79
- var PLATFORM_DOMAINS, ENV_OVERRIDES;
85
+ var PLATFORM_DOMAINS, ENV_OVERRIDES, _orderIdx;
80
86
  var init_platform_domains = __esm({
81
87
  "src/platform-domains.ts"() {
82
88
  "use strict";
@@ -110,9 +116,10 @@ var init_platform_domains = __esm({
110
116
  NEXT_PUBLIC_OPENFRAME_URL: process.env.NEXT_PUBLIC_OPENFRAME_URL,
111
117
  NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL: process.env.NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL
112
118
  };
113
- if (getPlatformByHostname("www.flamingo.run") !== "flamingo" || getPlatformByHostname("flamingo.cx") !== "flamingo-teaser" || getPlatformByHostname("hub.openframe.ai") !== "openframe") {
119
+ _orderIdx = (k) => PLATFORM_DOMAINS.findIndex((e) => e.key === k);
120
+ if (_orderIdx("flamingo") > _orderIdx("flamingo-teaser") || _orderIdx("flamingo") > _orderIdx("universal") || getPlatformByHostname("flamingo.cx") !== "flamingo-teaser" || getPlatformByHostname("hub.openframe.ai") !== "openframe") {
114
121
  console.error(
115
- "[platform-domains] \u26A0\uFE0F PLATFORM_DOMAINS ordering invariant violated \u2014 `flamingo` must precede `flamingo-teaser`/`universal`, and the openframe aliases must be intact. Do not reorder the table."
122
+ "[platform-domains] \u26A0\uFE0F PLATFORM_DOMAINS ordering invariant violated \u2014 `flamingo` must precede `flamingo-teaser`/`universal`, and the openframe/teaser aliases must be intact. Do not reorder the table."
116
123
  );
117
124
  }
118
125
  }
@@ -159,4 +166,4 @@ export {
159
166
  getBaseUrl,
160
167
  init_cn
161
168
  };
162
- //# sourceMappingURL=chunk-76NMNINV.js.map
169
+ //# sourceMappingURL=chunk-XTCBRQN2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/platform-domains.ts","../src/utils/cn.ts"],"sourcesContent":["/**\n * Platform-Domain SSOT (single source of truth) + derivations.\n *\n * ONE registry maps each platform → its canonical production URL (`defaultUrl`,\n * the load-bearing source) with an optional per-deploy `NEXT_PUBLIC_*_URL`\n * OVERRIDE. Everything else — the reverse host→platform resolver, the cookie\n * base-domain set (the cross-subdomain SSO mechanism), www/apex expansion, the\n * URL→host parse, preview detection — derives from this one table.\n *\n * EDGE-SAFE + PURE: no React/clsx/tailwind, no `server-only`, no `node:`\n * builtins, no `'use client'`. So it is legal in the Edge middleware\n * (`proxy.ts`), in `'use client'` providers, AND in `server-only` modules\n * (e.g. cookie-domain-server.ts) simultaneously. The ONLY non-pure export is\n * `getAllPlatformBaseDomains`, which reads `typeof window`/`process.env` to\n * preserve byte-identical cookie behavior.\n */\n\nimport type { PlatformName } from './types/platform'\n\nexport type PlatformDomainKey = PlatformName | 'openframe-dashboard'\n\nexport interface PlatformDomainEntry {\n /** Platform key (matches `PlatformName`, plus the forward-only `openframe-dashboard`). */\n key: PlatformDomainKey\n /** Canonical production URL — the LOAD-BEARING source of truth (today's hardcoded fallbacks). */\n defaultUrl: string\n /** `NEXT_PUBLIC_*_URL` per-deploy OVERRIDE. The `defaultUrl` covers it when unset. */\n envVar: string\n /** Legacy/secondary hosts that REVERSE-map to this key (no env var exists — NOT canonical). */\n aliasHostnames?: string[]\n /** Forward-only: no DB row, excluded from the reverse index + cookie set (e.g. the product-CTA dashboard). */\n pseudo?: boolean\n}\n\nexport const PLATFORM_DOMAINS: readonly PlatformDomainEntry[] = [\n { key: 'marketing-hub', defaultUrl: 'https://marketing-hub.flamingo.so', envVar: 'NEXT_PUBLIC_MARKETING_HUB_URL' },\n { key: 'company-hub', defaultUrl: 'https://company-hub.flamingo.so', envVar: 'NEXT_PUBLIC_COMPANY_HUB_URL' },\n { key: 'product-hub', defaultUrl: 'https://product-hub.flamingo.so', envVar: 'NEXT_PUBLIC_PRODUCT_HUB_URL' },\n { key: 'revenue-hub', defaultUrl: 'https://revenue-hub.flamingo.so', envVar: 'NEXT_PUBLIC_REVENUE_HUB_URL' },\n { key: 'people-hub', defaultUrl: 'https://people-hub.flamingo.so', envVar: 'NEXT_PUBLIC_PEOPLE_HUB_URL' },\n { key: 'openmsp', defaultUrl: 'https://www.openmsp.ai', envVar: 'NEXT_PUBLIC_OPENMSP_URL' },\n // ORDERING INVARIANT (first-wins, load-bearing): `flamingo` MUST precede `flamingo-teaser` + `universal`.\n // All three resolve to www.flamingo.run; the reverse index is first-wins → flamingo claims the shared host,\n // teaser keeps only its unique flamingo.cx aliases, universal contributes no unique host.\n // ⚠️ DO NOT REORDER — enforced by the module-load self-check at the bottom of this file.\n { key: 'flamingo', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL' },\n { key: 'tmcg', defaultUrl: 'https://www.tmcg.miami', envVar: 'NEXT_PUBLIC_TMCG_URL' },\n { key: 'flamingo-teaser', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL', aliasHostnames: ['flamingo.cx', 'www.flamingo.cx'] },\n { key: 'openframe', defaultUrl: 'https://openframe.ai', envVar: 'NEXT_PUBLIC_OPENFRAME_URL', aliasHostnames: ['openframe.ai', 'www.openframe.ai', 'hub.openframe.ai'] },\n { key: 'openframe-dashboard', defaultUrl: 'https://openframe.ai', envVar: 'NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL', pseudo: true },\n { key: 'universal', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL' },\n]\n\n// ── Compile-time key guards (anchor the table on PlatformName, both directions) ──\n// (1) Removal/typo guard: every table key must be a valid PlatformDomainKey.\nconst _tableSatisfies = PLATFORM_DOMAINS satisfies readonly PlatformDomainEntry[]\nvoid _tableSatisfies\n// (2) Addition guard: a NEW PlatformName member that lacks a table row fails the build.\ntype _MissingKey = Exclude<PlatformName, (typeof PLATFORM_DOMAINS)[number]['key']>\nconst _exhaustive: [_MissingKey] extends [never] ? true : false = true\nvoid _exhaustive\n\n// ── Env overrides (the ONLY place env URLs enter — literal-key inlined + compile-time-guarded) ──\n// `process.env.NEXT_PUBLIC_X` is build-inlined ONLY with a LITERAL key, so the env-var name is the\n// irreducible two-copy (the registry `envVar` column + the literal access below). The `satisfies` makes\n// `tsc`/`next build` FAIL if this map is missing a registry env var OR carries a stale one (bidirectional).\ntype EnvVarKey = (typeof PLATFORM_DOMAINS)[number]['envVar']\nconst ENV_OVERRIDES = {\n NEXT_PUBLIC_MARKETING_HUB_URL: process.env.NEXT_PUBLIC_MARKETING_HUB_URL,\n NEXT_PUBLIC_COMPANY_HUB_URL: process.env.NEXT_PUBLIC_COMPANY_HUB_URL,\n NEXT_PUBLIC_PRODUCT_HUB_URL: process.env.NEXT_PUBLIC_PRODUCT_HUB_URL,\n NEXT_PUBLIC_REVENUE_HUB_URL: process.env.NEXT_PUBLIC_REVENUE_HUB_URL,\n NEXT_PUBLIC_PEOPLE_HUB_URL: process.env.NEXT_PUBLIC_PEOPLE_HUB_URL,\n NEXT_PUBLIC_OPENMSP_URL: process.env.NEXT_PUBLIC_OPENMSP_URL,\n NEXT_PUBLIC_FLAMINGO_URL: process.env.NEXT_PUBLIC_FLAMINGO_URL,\n NEXT_PUBLIC_TMCG_URL: process.env.NEXT_PUBLIC_TMCG_URL,\n NEXT_PUBLIC_OPENFRAME_URL: process.env.NEXT_PUBLIC_OPENFRAME_URL,\n NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL: process.env.NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL,\n} satisfies Record<EnvVarKey, string | undefined>\n\n/** The registry entry for a key (undefined for an unknown key). */\nexport function byKey(key: string): PlatformDomainEntry | undefined {\n return PLATFORM_DOMAINS.find((e) => e.key === key)\n}\n\n/** Read a platform's `NEXT_PUBLIC_*_URL` override (or null). */\nfunction envOverrideFor(key: string): string | null {\n const envVar = byKey(key)?.envVar\n if (!envVar) return null\n return (ENV_OVERRIDES as Record<string, string | undefined>)[envVar] || null\n}\n\n/**\n * Ensure a URL string carries a scheme. Per-deploy `NEXT_PUBLIC_*_URL` overrides are\n * stored SCHEME-LESS (bare host, e.g. `www.openmsp.ai` / `hub.openframe.ai`) — the\n * canonical convention in the Vercel shared-env store. This normalizes them to a full\n * `https://` URL so every downstream consumer (`hostOf`/`new URL`, hrefs, the cookie\n * base-domain derivation, CSP) receives a parseable URL. Full-URL inputs (the registry\n * `defaultUrl`s, any scheme'd override) pass through unchanged.\n *\n * EXPORTED as the single owner of the scheme-normalization rule (next.config.mjs keeps a\n * byte-identical local copy ONLY because Next evaluates its config outside the TS module\n * graph and cannot import this — see the comment there).\n *\n * Handles a (theoretical) protocol-relative `//host` too: strips the leading slashes so it\n * doesn't become `https:////host` (empty-host → hostOf null → silent platform drop).\n */\nexport function ensureScheme(url: string): string {\n const trimmed = url.trim()\n if (/^[a-z][a-z0-9+.-]*:\\/\\//i.test(trimmed)) return trimmed // already has a scheme\n return `https://${trimmed.replace(/^\\/+/, '')}` // bare host or protocol-relative `//host`\n}\n\n/**\n * Canonical production URL for a platform: env override wins, else the `defaultUrl`.\n * NEVER throws / undefined — the default guarantees a host (this is what keeps the\n * cookie base-domains, the reverse map, and CSP intact even with every override unset).\n * The result ALWAYS carries a scheme (`ensureScheme`), so the scheme-less env overrides\n * resolve to valid URLs. Unknown-key fallback preserves cn.ts's flamingo.run default.\n */\nexport function getPlatformProductionUrl(platform: string): string {\n const resolved =\n envOverrideFor(platform) ??\n byKey(platform)?.defaultUrl ??\n envOverrideFor('flamingo') ??\n 'https://www.flamingo.run'\n return ensureScheme(resolved)\n}\n\n// ── Single-owner host primitives ──\n\n/** Canonical URL→host parser: `.hostname` (PORT-STRIPPED, lowercased), null on parse failure. */\nexport function hostOf(value: string | null | undefined): string | null {\n if (!value) return null\n try {\n return new URL(value).hostname.toLowerCase()\n } catch {\n return null\n }\n}\n\n/** Expand a host into its `www.`/apex pair. 3+-label and single-label hosts return `[host]`. */\nexport function expandWwwApex(host: string): string[] {\n if (host.startsWith('www.')) return [host, host.slice(4)]\n if (host.split('.').length === 2) return [host, `www.${host}`]\n return [host]\n}\n\n/** Registrable base domain (`parts.slice(-2).join('.')`), dotless; undefined for <2-label. */\nexport function toRegistrableBaseDomain(host: string): string | undefined {\n const parts = host.split('.')\n if (parts.length >= 2) return parts.slice(-2).join('.')\n return undefined\n}\n\n/** An entry's alias hosts (single-owner reader). */\nexport function aliasHostsOf(key: string): string[] {\n return byKey(key)?.aliasHostnames ?? []\n}\n\n/** All hosts an entry contributes to the reverse index (resolved host + optional aliases). */\nfunction hostsForEntry(entry: PlatformDomainEntry, opts: { includeAliases: boolean }): string[] {\n const resolved = hostOf(getPlatformProductionUrl(entry.key))\n const hosts = resolved ? expandWwwApex(resolved) : []\n if (opts.includeAliases) hosts.push(...aliasHostsOf(entry.key))\n return hosts\n}\n\n/**\n * Reverse resolver: hostname → platform key (first-wins over registry order, non-pseudo only).\n * Guarantees openframe.ai / www.openframe.ai / hub.openframe.ai → openframe in every env.\n * Replaces the hub `PLATFORM_DOMAIN_MAP`.\n */\nexport function getPlatformByHostname(hostname: string): PlatformDomainKey | null {\n const host = hostname.toLowerCase()\n for (const entry of PLATFORM_DOMAINS) {\n if (entry.pseudo) continue\n if (hostsForEntry(entry, { includeAliases: true }).includes(host)) return entry.key\n }\n return null\n}\n\n// ── Preview detection (two distinct predicates — env-form vs host-form) ──\n\n/** Env-form preview predicate (Vercel `VERCEL_ENV`). */\nexport function isPreviewEnv(): boolean {\n return process.env.VERCEL_ENV === 'preview'\n}\n\n/** Host-form preview predicate (a `*.vercel.app` host). Dot-bounded suffix so a\n * malicious `foo.vercel.app.evil.com` is NOT treated as preview. */\nexport function isPreviewHost(hostname: string): boolean {\n return hostname.endsWith('.vercel.app')\n}\n\n/**\n * ALL unique cookie base domains (the cross-subdomain SSO mechanism).\n *\n * NON-PURE (the sole such export): reads `typeof window` + `process.env` to\n * preserve byte-identical cookie behavior. Keeps the original three branches:\n * 1. localhost / private IP → [] (host-only cookies)\n * 2. Vercel preview (env OR host) → ['.vercel.app','vercel.app']\n * 3. production → for each non-pseudo platform, registrable base of its resolved\n * host, emitted as both `.base` and bare `base`.\n *\n * Because `getPlatformProductionUrl` always yields a host (override OR default),\n * `.flamingo.so` / `.flamingo.run` / `.openmsp.ai` / `.tmcg.miami` / `.openframe.ai`\n * are ALWAYS present → cross-hub SSO is byte-identical to today.\n */\nexport function getAllPlatformBaseDomains(): string[] {\n if (typeof window === 'undefined') return []\n\n const hostname = window.location.hostname\n\n // Case 1: localhost / private IP — no domains\n if (hostname === 'localhost' || hostname === '127.0.0.1' || hostname.startsWith('127.')) {\n return []\n }\n\n // Case 2: Vercel preview — vercel.app domain\n const previewEnv =\n process.env.VERCEL_ENV === 'preview' ||\n process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview' ||\n isPreviewHost(hostname)\n if (previewEnv) {\n return ['.vercel.app', 'vercel.app']\n }\n\n // Case 3: production — registrable base of every non-pseudo platform's resolved host\n const baseDomains = new Set<string>()\n for (const entry of PLATFORM_DOMAINS) {\n if (entry.pseudo) continue\n const host = hostOf(getPlatformProductionUrl(entry.key))\n if (!host) continue\n const base = toRegistrableBaseDomain(host)\n if (base) {\n baseDomains.add(`.${base}`)\n baseDomains.add(base)\n }\n }\n return Array.from(baseDomains)\n}\n\n// ── Cookie-domain guard + match (single owner; shared by the client cookie-domain.ts +\n// server-only cookie-domain-server.ts resolvers, which previously hand-rolled both 3×) ──\n\n/**\n * Hosts that must NOT receive a `Domain=` cookie → the caller returns undefined (host-only):\n * localhost, loopback/private IPs, and any `*.vercel.app`. `vercel.app` is on the Public Suffix\n * List, so browsers SILENTLY drop `Set-Cookie: Domain=.vercel.app` — which broke the PKCE verifier\n * + session cookies on preview deploys. Host-only is sufficient there (the same preview host\n * round-trips the OAuth chain); production hosts (`.flamingo.so`/`.openmsp.ai`/…) fall through.\n */\nexport function isNonCookieableHost(hostname: string): boolean {\n return (\n hostname === 'localhost' ||\n hostname === '127.0.0.1' ||\n hostname.startsWith('127.') ||\n hostname.startsWith('192.168.') ||\n hostname.startsWith('10.') ||\n hostname.includes('.vercel.app')\n )\n}\n\n/**\n * Match a hostname against a set of registrable base domains → the dotted cookie `Domain`\n * (`.flamingo.so`), or undefined when none contains the host. Accepts bases with or without a\n * leading dot and always returns the dotted form. Single owner for the match loop both resolvers ran.\n */\nexport function matchCookieDomain(hostname: string, baseDomains: string[]): string | undefined {\n for (const domain of baseDomains) {\n const bare = domain.startsWith('.') ? domain.slice(1) : domain\n if (hostname === bare || hostname.endsWith(`.${bare}`)) {\n return domain.startsWith('.') ? domain : `.${domain}`\n }\n }\n return undefined\n}\n\n// ── Module-load ordering self-check (NON-fatal — this module is imported by cn.ts → ~everything,\n// so a hard throw would be a total outage if the assertion were ever over-strict). Checks the REAL\n// invariant — table order — STRUCTURALLY (findIndex), NOT via getPlatformByHostname on a hardcoded\n// host: the latter false-positives when NEXT_PUBLIC_FLAMINGO_URL is overridden to a non-default host\n// (flamingo's resolved host changes, so `www.flamingo.run` no longer reverse-maps to it though the\n// ordering is fine). The alias checks below ARE env-immune (aliasHostnames are unique per key). The\n// authoritative guard is the reverse-map vitest. ⚠️ keep `flamingo` before `flamingo-teaser`/`universal`.\nconst _orderIdx = (k: PlatformDomainKey) => PLATFORM_DOMAINS.findIndex((e) => e.key === k)\nif (\n _orderIdx('flamingo') > _orderIdx('flamingo-teaser') ||\n _orderIdx('flamingo') > _orderIdx('universal') ||\n getPlatformByHostname('flamingo.cx') !== 'flamingo-teaser' ||\n getPlatformByHostname('hub.openframe.ai') !== 'openframe'\n) {\n // eslint-disable-next-line no-console\n console.error(\n '[platform-domains] ⚠️ PLATFORM_DOMAINS ordering invariant violated — `flamingo` must precede ' +\n '`flamingo-teaser`/`universal`, and the openframe/teaser aliases must be intact. Do not reorder the table.',\n )\n}\n","import { clsx, type ClassValue } from \"clsx\"\nimport { extendTailwindMerge } from \"tailwind-merge\"\n// Platform→domain resolution moved to the SSOT module `src/platform-domains.ts`.\n// `getPlatformProductionUrl` / `getAllPlatformBaseDomains` now live there (re-exported\n// via the utils barrel for existing callers); `getBaseUrl` stays here because it owns the\n// dev-localhost + Vercel-self-origin branches, and delegates its platform branch.\nimport { getPlatformProductionUrl } from \"../platform-domains\"\n\nconst twMerge = extendTailwindMerge<'ods-typography'>({\n extend: {\n classGroups: {\n 'ods-typography': ['text-h1', 'text-h2', 'text-h3', 'text-h4', 'text-h5', 'text-h6'],\n },\n },\n})\n\n/**\n * Combine class names with Tailwind's merge utility\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n/**\n * Get the application base URL for the current environment\n *\n * @param platform - Optional platform name (openmsp, flamingo, tmcg, openframe, etc.)\n * @returns The base URL with protocol (https:// or http://)\n *\n * Priority order:\n * 1. Development (http://localhost:3000)\n * 2. Platform-specific URL via the SSOT (if `platform` provided) — env override ?? default\n * 3. VERCEL_PROJECT_PRODUCTION_URL (Vercel production domain)\n * 4. Production fallback: the DEPLOYING platform's canonical URL (NEXT_PUBLIC_APP_TYPE),\n * openmsp if unset — sourced from the SSOT, no hardcoded literal.\n *\n * The per-platform canonical URLs + their `NEXT_PUBLIC_*_URL` overrides are the single\n * source of truth in `src/platform-domains.ts` (`PLATFORM_DOMAINS`).\n *\n * @example\n * getBaseUrl() // Current deployment's URL\n * getBaseUrl('flamingo') // https://www.flamingo.run (prod) or http://localhost:3000 (dev)\n */\nexport function getBaseUrl(platform?: string): string {\n // In development, always use localhost (regardless of platform)\n if (process.env.NODE_ENV !== 'production') {\n return process.env.NEXT_PUBLIC_DEV_URL || 'http://localhost:3000'\n }\n\n // If platform is specified, return its production URL (env override ?? default)\n if (platform) {\n return getPlatformProductionUrl(platform)\n }\n\n // Production: Use Vercel domain if available\n if (process.env.VERCEL_PROJECT_PRODUCTION_URL) {\n return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`\n }\n\n // Production fallback: the deploying platform's canonical www domain (avoids Google\n // \"Page with redirect\"). Derived from the SSOT for the current app type (openmsp when\n // unset → 'https://www.openmsp.ai', byte-identical to the old hardcoded fallback).\n return getPlatformProductionUrl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,CAAC,MAAyB,iBAAiB,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC;AACzF,QACE,UAAU,UAAU,IAAI,UAAU,iBAAiB,KACnD,UAAU,UAAU,IAAI,UAAU,WAAW,KAC7C,sBAAsB,aAAa,MAAM,qBACzC,sBAAsB,kBAAkB,MAAM,aAC9C;AAEA,cAAQ;AAAA,QACN;AAAA,MAEF;AAAA,IACF;AAAA;AAAA;;;AC1SA,SAAS,YAA6B;AACtC,SAAS,2BAA2B;AAkB7B,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;AAsBO,SAAS,WAAW,UAA2B;AAEpD,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,WAAO,QAAQ,IAAI,uBAAuB;AAAA,EAC5C;AAGA,MAAI,UAAU;AACZ,WAAO,yBAAyB,QAAQ;AAAA,EAC1C;AAGA,MAAI,QAAQ,IAAI,+BAA+B;AAC7C,WAAO,WAAW,QAAQ,IAAI,6BAA6B;AAAA,EAC7D;AAKA,SAAO,yBAAyB,QAAQ,IAAI,wBAAwB,SAAS;AAC/E;AA/DA,IAQM;AARN;AAAA;AAAA;AAMA;AAEA,IAAM,UAAU,oBAAsC;AAAA,MACpD,QAAQ;AAAA,QACN,aAAa;AAAA,UACX,kBAAkB,CAAC,WAAW,WAAW,WAAW,WAAW,WAAW,SAAS;AAAA,QACrF;AAAA,MACF;AAAA,IACF,CAAC;AAAA;AAAA;","names":[]}
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkCG6AZ2MCcjs = require('./chunk-CG6AZ2MC.cjs');
5
+ var _chunkFIG2RKZFcjs = require('./chunk-FIG2RKZF.cjs');
6
6
 
7
7
 
8
8
 
@@ -1557,7 +1557,7 @@ function EmptyVendorIcon({ className }) {
1557
1557
  }
1558
1558
 
1559
1559
  // src/components/icons/error-icon.tsx
1560
- _chunkCG6AZ2MCcjs.init_cn.call(void 0, );
1560
+ _chunkFIG2RKZFcjs.init_cn.call(void 0, );
1561
1561
 
1562
1562
  function ErrorIcon({ className, fill = "#FF6B6B", ...props }) {
1563
1563
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -1570,7 +1570,7 @@ function ErrorIcon({ className, fill = "#FF6B6B", ...props }) {
1570
1570
  strokeWidth: "2",
1571
1571
  strokeLinecap: "round",
1572
1572
  strokeLinejoin: "round",
1573
- className: _chunkCG6AZ2MCcjs.cn.call(void 0, "inline-block", className),
1573
+ className: _chunkFIG2RKZFcjs.cn.call(void 0, "inline-block", className),
1574
1574
  ...props,
1575
1575
  children: [
1576
1576
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "10" }),
@@ -1986,7 +1986,7 @@ function XLogo({ className = "", color = "white", ...props }) {
1986
1986
  }
1987
1987
 
1988
1988
  // src/components/icons/hubspot-icon.tsx
1989
- _chunkCG6AZ2MCcjs.init_cn.call(void 0, );
1989
+ _chunkFIG2RKZFcjs.init_cn.call(void 0, );
1990
1990
 
1991
1991
  function HubspotIcon({ className, fill = "#FF7A59", ...props }) {
1992
1992
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1995,7 +1995,7 @@ function HubspotIcon({ className, fill = "#FF7A59", ...props }) {
1995
1995
  xmlns: "http://www.w3.org/2000/svg",
1996
1996
  viewBox: "0 0 512 512",
1997
1997
  fill,
1998
- className: _chunkCG6AZ2MCcjs.cn.call(void 0, "inline-block", className),
1998
+ className: _chunkFIG2RKZFcjs.cn.call(void 0, "inline-block", className),
1999
1999
  ...props,
2000
2000
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M266.197 216.109c-22.551 21.293-36.655 51.48-36.655 84.991 0 26.326 8.714 50.582 23.359 70.08l-44.473 44.74c-3.953-1.438-8.176-2.245-12.579-2.245-9.702 0-18.776 3.774-25.605 10.602-6.828 6.827-10.602 15.989-10.602 25.696 0 9.701 3.773 18.775 10.602 25.605 6.829 6.826 15.993 10.42 25.605 10.42 9.703 0 18.777-3.505 25.695-10.42 6.829-6.83 10.602-15.994 10.602-25.605 0-3.774-.538-7.369-1.707-10.873l44.923-45.102c19.765 15.183 44.381 24.169 71.244 24.169 64.599 0 116.797-52.38 116.797-116.977 0-58.578-42.854-107.093-99.007-115.628v-55.343c15.723-6.65 25.335-21.384 25.335-38.545 0-23.449-18.777-43.034-42.227-43.034-23.448 0-41.956 19.585-41.956 43.034 0 17.161 9.613 31.895 25.335 38.545v54.983c-13.655 1.887-26.593 6.019-38.362 12.219-24.796-18.778-105.565-76.997-151.746-112.126 1.078-3.953 1.798-8.085 1.798-12.397 0-25.875-21.113-46.898-47.078-46.898-25.875 0-46.898 21.023-46.898 46.898 0 25.965 21.023 46.988 46.898 46.988 8.805 0 16.98-2.606 24.078-6.828L266.197 216.109zM346.606 363.095c-34.229 0-61.991-27.763-61.991-61.994 0-34.229 27.762-61.99 61.991-61.99 34.23 0 61.992 27.761 61.992 61.99 0 34.231-27.762 61.994-61.992 61.994z" })
2001
2001
  }
@@ -3726,7 +3726,7 @@ function LinuxIcon({ className, color = "white", ...props }) {
3726
3726
  }
3727
3727
 
3728
3728
  // src/components/icons/double-chevron-icon.tsx
3729
- _chunkCG6AZ2MCcjs.init_cn.call(void 0, );
3729
+ _chunkFIG2RKZFcjs.init_cn.call(void 0, );
3730
3730
 
3731
3731
  var rotationMap = {
3732
3732
  left: "rotate-0",
@@ -3748,7 +3748,7 @@ function DoubleChevronIcon({
3748
3748
  viewBox: "0 0 24 24",
3749
3749
  fill: "none",
3750
3750
  xmlns: "http://www.w3.org/2000/svg",
3751
- className: _chunkCG6AZ2MCcjs.cn.call(void 0,
3751
+ className: _chunkFIG2RKZFcjs.cn.call(void 0,
3752
3752
  "transition-transform duration-200",
3753
3753
  rotationMap[direction],
3754
3754
  className
@@ -4696,4 +4696,4 @@ var PilotIcon = ({ className = "w-6 h-6", color = "var(--ods-system-greys-white)
4696
4696
 
4697
4697
 
4698
4698
  exports.OpenmspLogo = OpenmspLogo; exports.OpenFrameLogo = OpenFrameLogo; exports.OpenFrameText = OpenFrameText; exports.FLAMINGO_LOGO_SVG_PATH = FLAMINGO_LOGO_SVG_PATH; exports.FLAMINGO_LOGO_VIEWBOX = FLAMINGO_LOGO_VIEWBOX; exports.FlamingoLogo = FlamingoLogo; exports.ElestioLogo = ElestioLogo; exports.MlgLogo = MlgLogo; exports.MiamiCyberGangLogo = MiamiCyberGangLogo; exports.MiamiCyberGangLogoFaceOnly = MiamiCyberGangLogoFaceOnly; exports.VendorsIcon = VendorsIcon; exports.CompareIcon = CompareIcon; exports.CommunityIcon = CommunityIcon; exports.VendorDirectoryIcon = VendorDirectoryIcon; exports.OpenSourceIcon = OpenSourceIcon; exports.CommunityHubIcon = CommunityHubIcon; exports.AboutIcon = AboutIcon; exports.UserIcon = UserIcon; exports.HamburgerIcon = HamburgerIcon; exports.MenuIcon = MenuIcon; exports.ExploreCategoriesIcon = ExploreCategoriesIcon; exports.FilterIcon = FilterIcon; exports.SearchIcon = SearchIcon; exports.ScriptIcon = ScriptIcon; exports.RemoteControlIcon = RemoteControlIcon; exports.ShellIcon = ShellIcon; exports.MingoIcon = MingoIcon; exports.PoliciesIcon = PoliciesIcon; exports.QueriesIcon = QueriesIcon; exports.DocumentIcon = DocumentIcon; exports.SlidersIcon = SlidersIcon; exports.CheckCircleIcon = CheckCircleIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.MinusCircleIcon = MinusCircleIcon; exports.InfoCircleIcon = InfoCircleIcon; exports.ThumbsUpIcon = ThumbsUpIcon; exports.ThumbsDownIcon = ThumbsDownIcon; exports.SunIcon = SunIcon; exports.MoonIcon = MoonIcon; exports.CoinsIcon = CoinsIcon; exports.DonutIcon = DonutIcon; exports.HandDollarIcon = HandDollarIcon; exports.SendIcon = SendIcon; exports.EditProfileIcon = EditProfileIcon; exports.EmptyVendorIcon = EmptyVendorIcon; exports.ErrorIcon = ErrorIcon; exports.MarginCrisisIcon = MarginCrisisIcon; exports.CopyIcon = CopyIcon; exports.CutVendorCostsIcon = CutVendorCostsIcon; exports.AutomateEverythingIcon = AutomateEverythingIcon; exports.ReclaimProfitsIcon = ReclaimProfitsIcon; exports.GitHubIcon = GitHubIcon; exports.SlackIcon = SlackIcon; exports.ClickUpIcon = ClickUpIcon; exports.MicrosoftIcon = MicrosoftIcon; exports.GoogleLogo = GoogleLogo; exports.RedditIcon = RedditIcon; exports.XLogo = XLogo; exports.HubspotIcon = HubspotIcon; exports.ClaudeIcon = ClaudeIcon; exports.LinkedInIcon = LinkedInIcon; exports.LumaIcon = LumaIcon; exports.LivestormIcon = LivestormIcon; exports.PodbeanIcon = PodbeanIcon; exports.WhatsAppIcon = WhatsAppIcon; exports.FigmaIcon = FigmaIcon; exports.ImageIcon = ImageIcon; exports.OpenAiIcon = OpenAiIcon; exports.GoogleGeminiIcon = GoogleGeminiIcon; exports.GlobeIcon = GlobeIcon; exports.MessageCircleIcon = MessageCircleIcon; exports.TelegramIcon = TelegramIcon; exports.YouTubeIcon = YouTubeIcon; exports.InstagramIcon = InstagramIcon; exports.FacebookIcon = FacebookIcon; exports.ArchiveIcon = ArchiveIcon; exports.CpuIcon = CpuIcon; exports.NetworkIcon = NetworkIcon; exports.ShieldIcon = ShieldIcon; exports.FileCheckIcon = FileCheckIcon; exports.BotIcon = BotIcon; exports.UsersIcon = UsersIcon; exports.PackageIcon = PackageIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.FileTextIcon = FileTextIcon; exports.SSOConfigurationIcon = SSOConfigurationIcon; exports.XIcon = XIcon; exports.CustomStarIcon = CustomStarIcon; exports.CustomForkIcon = CustomForkIcon; exports.CustomLicenseIcon = CustomLicenseIcon; exports.CustomTimeIcon = CustomTimeIcon; exports.CustomExternalLinkIcon = CustomExternalLinkIcon; exports.VendorShowcaseMainIcon = VendorShowcaseMainIcon; exports.TransparentTrustedIcon = TransparentTrustedIcon; exports.ModularHellIcon = ModularHellIcon; exports.RapidInnovationIcon = RapidInnovationIcon; exports.LowerTCOIcon = LowerTCOIcon; exports.AiRobotIcon = AiRobotIcon; exports.SparklesIcon = SparklesIcon; exports.NaturalLanguageIcon = NaturalLanguageIcon; exports.AutomatedDiagnosticsIcon = AutomatedDiagnosticsIcon; exports.StatusUpdatesIcon = StatusUpdatesIcon; exports.SmartEscalationIcon = SmartEscalationIcon; exports.ScriptGenerationIcon = ScriptGenerationIcon; exports.PatchPolicyIcon = PatchPolicyIcon; exports.BulkOperationsIcon = BulkOperationsIcon; exports.AuditLoggingIcon = AuditLoggingIcon; exports.SOCIcon = SOCIcon; exports.NOCIcon = NOCIcon; exports.ITIcon = ITIcon; exports.OPSIcon = OPSIcon; exports.DashboardIcon = DashboardIcon; exports.DevicesIcon = DevicesIcon; exports.LogsIcon = LogsIcon; exports.OrganizationsIcon = OrganizationsIcon; exports.SettingsIcon = SettingsIcon; exports.LogOutIcon = LogOutIcon; exports.WindowsIcon = WindowsIcon; exports.MacOSIcon = MacOSIcon; exports.LinuxIcon = LinuxIcon; exports.DoubleChevronIcon = DoubleChevronIcon; exports.GridViewIcon = GridViewIcon; exports.TableViewIcon = TableViewIcon; exports.ShieldLockIcon = ShieldLockIcon; exports.ShieldKeyIcon = ShieldKeyIcon; exports.EyeIcon = EyeIcon; exports.ShapeCircleDashIcon = ShapeCircleDashIcon; exports.BuildingsIcon = BuildingsIcon; exports.UsersGroupIcon = UsersGroupIcon; exports.FolderShieldIcon = FolderShieldIcon; exports.ShieldCheckIcon = ShieldCheckIcon; exports.HotelIcon = HotelIcon; exports.JumpInIcon = JumpInIcon; exports.renderSvgIcon = renderSvgIcon; exports.PowerShellIcon = PowerShellIcon; exports.CmdIcon = CmdIcon; exports.BashIcon = BashIcon; exports.PythonIcon = PythonIcon; exports.NushellIcon = NushellIcon; exports.DenoIcon = DenoIcon; exports.DesktopIcon = DesktopIcon; exports.LaptopIcon = LaptopIcon2; exports.ServerIcon = ServerIcon; exports.getDeviceTypeIcon = getDeviceTypeIcon; exports.G2Icon = G2Icon; exports.CapterraIcon = CapterraIcon; exports.TrustpilotIcon = TrustpilotIcon; exports.GetAppIcon = GetAppIcon; exports.CartaIcon = CartaIcon; exports.PilotIcon = PilotIcon;
4699
- //# sourceMappingURL=chunk-W4NBBPQL.cjs.map
4699
+ //# sourceMappingURL=chunk-Z4IBEIWD.cjs.map