@flamingo-stack/openframe-frontend-core 0.0.296 → 0.0.297-snapshot.20260621022511

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 (278) hide show
  1. package/README.md +9 -0
  2. package/dist/{chunk-7RIYT7ZH.js → chunk-2QG57XOJ.js} +1067 -205
  3. package/dist/chunk-2QG57XOJ.js.map +1 -0
  4. package/dist/{chunk-D3LEFMOA.cjs → chunk-54KNMC2R.cjs} +3 -3
  5. package/dist/{chunk-D3LEFMOA.cjs.map → chunk-54KNMC2R.cjs.map} +1 -1
  6. package/dist/{chunk-WHMATDVP.js → chunk-7YNG257E.js} +9 -15
  7. package/dist/{chunk-WHMATDVP.js.map → chunk-7YNG257E.js.map} +1 -1
  8. package/dist/chunk-FBWXMMRB.cjs +2 -0
  9. package/dist/chunk-FBWXMMRB.cjs.map +1 -0
  10. package/dist/{chunk-IE6OU3WQ.cjs → chunk-FQOTC3UU.cjs} +318 -16
  11. package/dist/chunk-FQOTC3UU.cjs.map +1 -0
  12. package/dist/{chunk-MBFWU2EM.js → chunk-G6JDD3LU.js} +6 -10
  13. package/dist/{chunk-MBFWU2EM.js.map → chunk-G6JDD3LU.js.map} +1 -1
  14. package/dist/{chunk-6GCI7JOE.js → chunk-GAVVRWQM.js} +8 -7
  15. package/dist/{chunk-6GCI7JOE.js.map → chunk-GAVVRWQM.js.map} +1 -1
  16. package/dist/chunk-GZ4C3XW6.js +2 -0
  17. package/dist/chunk-GZ4C3XW6.js.map +1 -0
  18. package/dist/chunk-IDMNFM4N.js +144 -0
  19. package/dist/chunk-IDMNFM4N.js.map +1 -0
  20. package/dist/{chunk-LCNMR277.js → chunk-IZ7JSBFP.js} +1 -1
  21. package/dist/chunk-IZ7JSBFP.js.map +1 -0
  22. package/dist/{chunk-EL6QLAWX.js → chunk-JALO4TAZ.js} +357 -55
  23. package/dist/chunk-JALO4TAZ.js.map +1 -0
  24. package/dist/{chunk-ZP4AVIZP.js → chunk-JGA5KBUO.js} +4 -6
  25. package/dist/{chunk-ZP4AVIZP.js.map → chunk-JGA5KBUO.js.map} +1 -1
  26. package/dist/{chunk-GLLDTKZK.cjs → chunk-JUBR24HC.cjs} +7 -9
  27. package/dist/chunk-JUBR24HC.cjs.map +1 -0
  28. package/dist/{chunk-AQOWFSMB.cjs → chunk-L6PSSIUQ.cjs} +1 -1
  29. package/dist/chunk-L6PSSIUQ.cjs.map +1 -0
  30. package/dist/chunk-MFAKIJJU.cjs +144 -0
  31. package/dist/chunk-MFAKIJJU.cjs.map +1 -0
  32. package/dist/{chunk-YIGPRLQY.cjs → chunk-MVTHRLDI.cjs} +21 -20
  33. package/dist/chunk-MVTHRLDI.cjs.map +1 -0
  34. package/dist/{chunk-XREEV72C.cjs → chunk-N3V434AN.cjs} +19 -25
  35. package/dist/chunk-N3V434AN.cjs.map +1 -0
  36. package/dist/{chunk-5P3B2LZW.js → chunk-N67N3OWW.js} +8 -14
  37. package/dist/{chunk-5P3B2LZW.js.map → chunk-N67N3OWW.js.map} +1 -1
  38. package/dist/{chunk-EYEW6PTA.cjs → chunk-NVSAPIIA.cjs} +358 -118
  39. package/dist/chunk-NVSAPIIA.cjs.map +1 -0
  40. package/dist/{chunk-X6BV7MB7.cjs → chunk-OW3Q7DSU.cjs} +37 -31
  41. package/dist/chunk-OW3Q7DSU.cjs.map +1 -0
  42. package/dist/{chunk-3ZXUQQL4.js → chunk-PI4WSYQV.js} +2 -2
  43. package/dist/{chunk-X647HY3F.cjs → chunk-Q22JYCQK.cjs} +33 -37
  44. package/dist/chunk-Q22JYCQK.cjs.map +1 -0
  45. package/dist/{chunk-QHIXS3W2.cjs → chunk-S6DXA35S.cjs} +11591 -2106
  46. package/dist/chunk-S6DXA35S.cjs.map +1 -0
  47. package/dist/{chunk-OY7OF7E7.js → chunk-TNF3DTTC.js} +30 -24
  48. package/dist/chunk-TNF3DTTC.js.map +1 -0
  49. package/dist/{chunk-K2PFPBMF.js → chunk-UFVKCF2C.js} +15050 -5565
  50. package/dist/chunk-UFVKCF2C.js.map +1 -0
  51. package/dist/{chunk-5E2HOSSH.cjs → chunk-WMSTJAZT.cjs} +913 -51
  52. package/dist/chunk-WMSTJAZT.cjs.map +1 -0
  53. package/dist/{chunk-E4XABBSU.js → chunk-YFZ7R4Z4.js} +338 -98
  54. package/dist/chunk-YFZ7R4Z4.js.map +1 -0
  55. package/dist/{chunk-W6M2FLLT.cjs → chunk-ZZOZKXQM.cjs} +40 -46
  56. package/dist/chunk-ZZOZKXQM.cjs.map +1 -0
  57. package/dist/components/case-studies/index.cjs +126 -0
  58. package/dist/components/case-studies/index.cjs.map +1 -0
  59. package/dist/components/case-studies/index.d.ts +2 -0
  60. package/dist/components/case-studies/index.d.ts.map +1 -0
  61. package/dist/components/case-studies/index.js +126 -0
  62. package/dist/components/case-studies/index.js.map +1 -0
  63. package/dist/components/case-studies/share-experience-section.d.ts +48 -0
  64. package/dist/components/case-studies/share-experience-section.d.ts.map +1 -0
  65. package/dist/components/chat/guide-welcome.d.ts.map +1 -1
  66. package/dist/components/chat/index.cjs +8 -18
  67. package/dist/components/chat/index.cjs.map +1 -1
  68. package/dist/components/chat/index.js +75 -85
  69. package/dist/components/contact/index.cjs +8 -15
  70. package/dist/components/contact/index.cjs.map +1 -1
  71. package/dist/components/contact/index.js +7 -14
  72. package/dist/components/docs/doc-viewer.d.ts +39 -2
  73. package/dist/components/docs/doc-viewer.d.ts.map +1 -1
  74. package/dist/components/docs/docs-hub-page.d.ts +46 -0
  75. package/dist/components/docs/docs-hub-page.d.ts.map +1 -0
  76. package/dist/components/docs/index.cjs +17 -9
  77. package/dist/components/docs/index.cjs.map +1 -1
  78. package/dist/components/docs/index.d.ts +4 -0
  79. package/dist/components/docs/index.d.ts.map +1 -1
  80. package/dist/components/docs/index.js +16 -8
  81. package/dist/components/docs/skeletons.d.ts +32 -0
  82. package/dist/components/docs/skeletons.d.ts.map +1 -0
  83. package/dist/components/docs/use-docs-resolve-link.d.ts +20 -0
  84. package/dist/components/docs/use-docs-resolve-link.d.ts.map +1 -0
  85. package/dist/components/docs/use-document-tree.d.ts.map +1 -1
  86. package/dist/components/embeds/embed-container.d.ts +37 -0
  87. package/dist/components/embeds/embed-container.d.ts.map +1 -0
  88. package/dist/components/embeds/embed-iframe.d.ts.map +1 -1
  89. package/dist/components/embeds/file-download-card.d.ts +18 -0
  90. package/dist/components/embeds/file-download-card.d.ts.map +1 -0
  91. package/dist/components/embeds/index.cjs +38 -15
  92. package/dist/components/embeds/index.cjs.map +1 -1
  93. package/dist/components/embeds/index.d.ts +8 -0
  94. package/dist/components/embeds/index.d.ts.map +1 -1
  95. package/dist/components/embeds/index.js +40 -17
  96. package/dist/components/embeds/linkedin-embed-client.d.ts +8 -0
  97. package/dist/components/embeds/linkedin-embed-client.d.ts.map +1 -0
  98. package/dist/components/embeds/markdown-image.d.ts +5 -0
  99. package/dist/components/embeds/markdown-image.d.ts.map +1 -0
  100. package/dist/components/embeds/reddit-embed-client.d.ts +7 -0
  101. package/dist/components/embeds/reddit-embed-client.d.ts.map +1 -0
  102. package/dist/components/embeds/rich-markdown-runtime.d.ts +46 -0
  103. package/dist/components/embeds/rich-markdown-runtime.d.ts.map +1 -0
  104. package/dist/components/embeds/twitter-embed-client.d.ts +8 -0
  105. package/dist/components/embeds/twitter-embed-client.d.ts.map +1 -0
  106. package/dist/components/faq/index.cjs +9 -16
  107. package/dist/components/faq/index.cjs.map +1 -1
  108. package/dist/components/faq/index.js +8 -15
  109. package/dist/components/features/index.cjs +8 -16
  110. package/dist/components/features/index.cjs.map +1 -1
  111. package/dist/components/features/index.js +24 -32
  112. package/dist/components/index.cjs +257 -452
  113. package/dist/components/index.cjs.map +1 -1
  114. package/dist/components/index.js +781 -976
  115. package/dist/components/index.js.map +1 -1
  116. package/dist/components/layout/page-header.d.ts +78 -0
  117. package/dist/components/layout/page-header.d.ts.map +1 -0
  118. package/dist/components/layout/page-layout.d.ts +10 -1
  119. package/dist/components/layout/page-layout.d.ts.map +1 -1
  120. package/dist/components/layout/page-with-header.d.ts +67 -0
  121. package/dist/components/layout/page-with-header.d.ts.map +1 -0
  122. package/dist/components/layout/title-block.d.ts +17 -1
  123. package/dist/components/layout/title-block.d.ts.map +1 -1
  124. package/dist/components/navigation/index.cjs +7 -15
  125. package/dist/components/navigation/index.cjs.map +1 -1
  126. package/dist/components/navigation/index.js +9 -17
  127. package/dist/components/onboarding-guides/index.cjs +35 -36
  128. package/dist/components/onboarding-guides/index.cjs.map +1 -1
  129. package/dist/components/onboarding-guides/index.js +13 -14
  130. package/dist/components/onboarding-guides/index.js.map +1 -1
  131. package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts +1 -1
  132. package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -1
  133. package/dist/components/related-content/index.cjs +9 -16
  134. package/dist/components/related-content/index.cjs.map +1 -1
  135. package/dist/components/related-content/index.js +8 -15
  136. package/dist/components/shared/dev-section/dev-section-page.d.ts +9 -0
  137. package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
  138. package/dist/components/shared/dev-section/dev-section-view.d.ts.map +1 -1
  139. package/dist/components/shared/dev-section/index.d.ts +1 -1
  140. package/dist/components/shared/dev-section/index.d.ts.map +1 -1
  141. package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -1
  142. package/dist/components/shared/legal-document/legal-document-page.d.ts.map +1 -1
  143. package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
  144. package/dist/components/tickets/index.cjs +100 -112
  145. package/dist/components/tickets/index.cjs.map +1 -1
  146. package/dist/components/tickets/index.js +20 -32
  147. package/dist/components/tickets/index.js.map +1 -1
  148. package/dist/components/ui/file-manager/index.cjs +50 -52
  149. package/dist/components/ui/file-manager/index.cjs.map +1 -1
  150. package/dist/components/ui/file-manager/index.js +4 -6
  151. package/dist/components/ui/file-manager/index.js.map +1 -1
  152. package/dist/components/ui/index.cjs +13 -19
  153. package/dist/components/ui/index.cjs.map +1 -1
  154. package/dist/components/ui/index.d.ts +2 -0
  155. package/dist/components/ui/index.d.ts.map +1 -1
  156. package/dist/components/ui/index.js +133 -139
  157. package/dist/components/ui/release-changelog-section.d.ts +6 -2
  158. package/dist/components/ui/release-changelog-section.d.ts.map +1 -1
  159. package/dist/components/ui/rich-markdown-renderer.d.ts +34 -0
  160. package/dist/components/ui/rich-markdown-renderer.d.ts.map +1 -0
  161. package/dist/components/ui/simple-markdown-renderer.d.ts +2 -8
  162. package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
  163. package/dist/contexts/chat-runtime-context.d.ts +14 -0
  164. package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
  165. package/dist/contexts/index.cjs +3 -3
  166. package/dist/contexts/index.js +5 -5
  167. package/dist/embed-shims/index.cjs +3 -3
  168. package/dist/embed-shims/index.cjs.map +1 -1
  169. package/dist/embed-shims/index.js +4 -4
  170. package/dist/hooks/index.cjs +4 -9
  171. package/dist/hooks/index.cjs.map +1 -1
  172. package/dist/hooks/index.js +6 -11
  173. package/dist/index.cjs +14 -20
  174. package/dist/index.cjs.map +1 -1
  175. package/dist/index.js +362 -368
  176. package/dist/types/doc-source.d.ts +31 -1
  177. package/dist/types/doc-source.d.ts.map +1 -1
  178. package/dist/utils/index.cjs +4 -0
  179. package/dist/utils/index.cjs.map +1 -1
  180. package/dist/utils/index.d.ts +1 -0
  181. package/dist/utils/index.d.ts.map +1 -1
  182. package/dist/utils/index.js +4 -1
  183. package/dist/utils/index.js.map +1 -1
  184. package/dist/utils/page-header-constants.d.ts +15 -0
  185. package/dist/utils/page-header-constants.d.ts.map +1 -0
  186. package/dist/utils/social-embed-cache.d.ts +29 -0
  187. package/dist/utils/social-embed-cache.d.ts.map +1 -0
  188. package/package.json +7 -1
  189. package/src/components/case-studies/index.ts +4 -0
  190. package/src/components/case-studies/share-experience-section.tsx +185 -0
  191. package/src/components/chat/embeddable-chat.tsx +1 -1
  192. package/src/components/chat/guide-welcome.tsx +12 -3
  193. package/src/components/docs/doc-viewer.tsx +111 -19
  194. package/src/components/docs/docs-hub-page.tsx +149 -0
  195. package/src/components/docs/index.ts +17 -0
  196. package/src/components/docs/skeletons.tsx +138 -0
  197. package/src/components/docs/use-docs-resolve-link.ts +52 -0
  198. package/src/components/docs/use-document-tree.ts +21 -0
  199. package/src/components/embeds/embed-container.tsx +80 -0
  200. package/src/components/embeds/embed-iframe.tsx +7 -9
  201. package/src/components/embeds/file-download-card.tsx +54 -0
  202. package/src/components/embeds/index.ts +30 -0
  203. package/src/components/embeds/linkedin-embed-client.tsx +100 -0
  204. package/src/components/embeds/markdown-image.tsx +88 -0
  205. package/src/components/embeds/og-link-preview.tsx +13 -13
  206. package/src/components/embeds/reddit-embed-client.tsx +550 -0
  207. package/src/components/embeds/rich-markdown-runtime.tsx +79 -0
  208. package/src/components/embeds/twitter-embed-client.tsx +308 -0
  209. package/src/components/layout/page-header.tsx +182 -0
  210. package/src/components/layout/page-layout.tsx +14 -1
  211. package/src/components/layout/page-with-header.tsx +110 -0
  212. package/src/components/layout/title-block.tsx +40 -62
  213. package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +3 -3
  214. package/src/components/shared/dev-section/dev-section-page.tsx +9 -1
  215. package/src/components/shared/dev-section/dev-section-view.tsx +14 -9
  216. package/src/components/shared/dev-section/index.ts +1 -1
  217. package/src/components/shared/doc-search/use-doc-search.ts +7 -3
  218. package/src/components/shared/legal-document/legal-document-page.tsx +2 -2
  219. package/src/components/shared/product-release/release-detail-page.tsx +6 -4
  220. package/src/components/ui/index.ts +2 -0
  221. package/src/components/ui/release-changelog-section.tsx +7 -2
  222. package/src/components/ui/rich-markdown-renderer.tsx +1203 -0
  223. package/src/components/ui/simple-markdown-renderer.tsx +7 -11
  224. package/src/contexts/chat-runtime-context.tsx +14 -0
  225. package/src/types/doc-source.ts +33 -1
  226. package/src/utils/index.ts +1 -0
  227. package/src/utils/page-header-constants.ts +15 -0
  228. package/src/utils/social-embed-cache.ts +391 -0
  229. package/dist/chunk-26PKDALD.js +0 -2379
  230. package/dist/chunk-26PKDALD.js.map +0 -1
  231. package/dist/chunk-3MCHAFHB.js +0 -89
  232. package/dist/chunk-3MCHAFHB.js.map +0 -1
  233. package/dist/chunk-5E2HOSSH.cjs.map +0 -1
  234. package/dist/chunk-66AANIOC.cjs +0 -619
  235. package/dist/chunk-66AANIOC.cjs.map +0 -1
  236. package/dist/chunk-6JINAOI7.cjs +0 -311
  237. package/dist/chunk-6JINAOI7.cjs.map +0 -1
  238. package/dist/chunk-7RIYT7ZH.js.map +0 -1
  239. package/dist/chunk-AQOWFSMB.cjs.map +0 -1
  240. package/dist/chunk-BOCFIKYS.cjs +0 -3009
  241. package/dist/chunk-BOCFIKYS.cjs.map +0 -1
  242. package/dist/chunk-D652TJBQ.js +0 -3009
  243. package/dist/chunk-D652TJBQ.js.map +0 -1
  244. package/dist/chunk-E4XABBSU.js.map +0 -1
  245. package/dist/chunk-EL6QLAWX.js.map +0 -1
  246. package/dist/chunk-EYEW6PTA.cjs.map +0 -1
  247. package/dist/chunk-FQJK446R.js +0 -1606
  248. package/dist/chunk-FQJK446R.js.map +0 -1
  249. package/dist/chunk-GLLDTKZK.cjs.map +0 -1
  250. package/dist/chunk-IE6OU3WQ.cjs.map +0 -1
  251. package/dist/chunk-J54Z3OCR.cjs +0 -1606
  252. package/dist/chunk-J54Z3OCR.cjs.map +0 -1
  253. package/dist/chunk-K2PFPBMF.js.map +0 -1
  254. package/dist/chunk-KXCRGTRN.cjs +0 -2379
  255. package/dist/chunk-KXCRGTRN.cjs.map +0 -1
  256. package/dist/chunk-LCNMR277.js.map +0 -1
  257. package/dist/chunk-LFGGF7OT.cjs +0 -449
  258. package/dist/chunk-LFGGF7OT.cjs.map +0 -1
  259. package/dist/chunk-M2OCXTNT.js +0 -311
  260. package/dist/chunk-M2OCXTNT.js.map +0 -1
  261. package/dist/chunk-ME4EVDFP.js +0 -619
  262. package/dist/chunk-ME4EVDFP.js.map +0 -1
  263. package/dist/chunk-OQ6X7ZOC.js +0 -449
  264. package/dist/chunk-OQ6X7ZOC.js.map +0 -1
  265. package/dist/chunk-OY7OF7E7.js.map +0 -1
  266. package/dist/chunk-POKKCWKF.js +0 -354
  267. package/dist/chunk-POKKCWKF.js.map +0 -1
  268. package/dist/chunk-QHIXS3W2.cjs.map +0 -1
  269. package/dist/chunk-TFSYSWPS.cjs +0 -89
  270. package/dist/chunk-TFSYSWPS.cjs.map +0 -1
  271. package/dist/chunk-W6M2FLLT.cjs.map +0 -1
  272. package/dist/chunk-X647HY3F.cjs.map +0 -1
  273. package/dist/chunk-X6BV7MB7.cjs.map +0 -1
  274. package/dist/chunk-XREEV72C.cjs.map +0 -1
  275. package/dist/chunk-YETA25JW.cjs +0 -354
  276. package/dist/chunk-YETA25JW.cjs.map +0 -1
  277. package/dist/chunk-YIGPRLQY.cjs.map +0 -1
  278. /package/dist/{chunk-3ZXUQQL4.js.map → chunk-PI4WSYQV.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/contexts/chat-runtime-context.tsx"],"sourcesContent":["'use client'\n\n/**\n * Chat runtime context — single seam for embedding the chat panel in a\n * different host (e.g. user1.openframe.ai reverse-proxying API calls\n * under /api/mingo-guide/* to hub.openframe.ai/api/*).\n *\n * Three concerns, one context:\n * 1. API endpoints: chatStreamUrl / approvalToolUrl / commandsUrl /\n * buildListUrl + attachment endpoints + chat-identity. The chat\n * reads them from runtime; hub vs embedded app supply different\n * strings via different providers.\n * 2. Navigation mode + callbacks: 'host' or 'embed' mode. Host wires\n * its own router/docNav via the optional `navigate` callback\n * (plain function, NOT a hook); embed forces new-tab via\n * `defaultContentOrigin` + lib's `resolveExternalNavigation`.\n * 3. Identity context: only `source` (required for localStorage\n * namespacing). The display identity (greeting first-name etc.)\n * comes from the server via `useChatIdentity()` — never injected\n * client-side, so it always matches the server-resolved auth.\n *\n * Sibling of EndpointsRuntimeContext (announcement bar, contact form,\n * access codes). Each runtime stays an independent React context so\n * embedders can opt into either feature without forcing the other.\n *\n * IMPORTANT for embedders: memoize the value passed to\n * `<ChatRuntimeContext.Provider value={...}>` (e.g. via React.useMemo).\n * Every change to its reference identity invalidates downstream\n * `useMemo` consumers (the chat input's slash-commands binding,\n * useNavLink's embed-resolution memo, useDocChat's streamFn factory).\n * The hub's `<HubRuntimeProvider>` already memoizes correctly with\n * stable deps. Embedded apps that build the value inline on each render\n * will pay an avoidable re-render cost across the entire chat tree.\n */\n\nimport { createContext, useContext, type ReactNode } from 'react'\n\nimport type { ComposeContentUrl } from '../utils/content-href'\n\n/**\n * Runtime config consumed by the chat panel.\n */\nexport interface ChatRuntime {\n endpoints: {\n /** POST streaming chat. Hub: '/api/docs/chat'. */\n chatStreamUrl: string\n /** POST agent approve/reject. Hub: '/api/chat/agent/confirm-tool'. */\n approvalToolUrl: string\n /** Customer-ticket agent endpoints (Help Center). OPTIONAL — when unset,\n * the ticket hooks fall back to the bare hub paths\n * (`/api/chat/agent/{find-ticket,ticket-action,list-engagements}`).\n * Embedders behind a reverse proxy set these to their proxied paths\n * (e.g. `/content/api/chat/agent/...`) so tickets route through the SAME\n * endpoint config + proxy as every other endpoint. */\n findTicketUrl?: string\n ticketActionUrl?: string\n listEngagementsUrl?: string\n /** GET slash-command catalog. Hub: '/api/docs/commands'. */\n commandsUrl: string\n /** GET RAG-search endpoint behind `<DocSearchBar>` (the in-source search\n * bar mounted by `<DocViewer>` / `<DocsHubPage>` when `showAIChat` is on).\n * Hub: '/api/docs/search'. OPTIONAL — falls back to the hub path so\n * same-origin Next.js hosts don't need to set it. Cross-origin embedders\n * set their proxied path so the search bar routes through the same\n * reverse proxy as everything else. Same pattern as `findTicketUrl`. */\n docsSearchUrl?: string\n /** POST internal-link resolver. The in-source markdown renderer (lib or\n * custom) calls `<DocViewer>`'s `handlers.onResolveLink(href, currentPath)`\n * for relative hrefs like `./getting-started/intro.md` — that callback\n * posts to this URL with `{ link, currentPath, source }` and expects a\n * `ResolveLinkResult` back. Hub: '/api/docs/resolve-link'. OPTIONAL — same\n * fall-back chain as `docsSearchUrl`: prop override → runtime → default. */\n docsResolveLinkUrl?: string\n /** GET per-platform empty-state config (admin-edited in\n * `/admin/chat-config`): `{ greeting, enabledRagTableIds, suggestedQueries }`.\n * Hub: '/api/docs/empty-state'. OPTIONAL — the in-app (host-mode) chat\n * injects these values as SSR props instead, so it leaves this unset.\n * Cross-origin EMBEDDERS (no server hop) set it to their proxied path\n * (e.g. '/content/api/docs/empty-state') so `<EmbeddableChat>` can fetch\n * the greeting / quick-action chips / RAG-source filter at runtime. When\n * unset, the chat falls back to the explicit `emptyStateGreeting` /\n * `suggestedQueries` / `enabledRagTableIds` props (or in-code defaults). */\n emptyStateUrl?: string\n /** Build entity-card list URL for a content type + ids. Hub delegates\n * to the rag-table-config registry; embedded app provides its own\n * per-type URL builder against the reverse proxy. Returns null when\n * the type has no list endpoint (caller skips rendering). */\n buildListUrl: (type: string, ids: string[]) => string | null\n /** Chat-attachment endpoints — added for the v2 attachment feature.\n *\n * Three concerns:\n * - `attachmentUploadUrl` — POSTed by the chat-attachment hook\n * to mint a Supabase signed-upload-URL + HMAC view token.\n * - `attachmentViewUrlPrefix` — embedded in markdown URLs the\n * chat hosts in user message bubbles (`![]()` / `[Attached]`).\n * Stored in chat history; chosen at SEND time. In host mode the\n * relative `/api/storage/view/chat-attachments/` is sufficient\n * (same-origin); embedders supply an absolute hub URL so the\n * browser can fetch cross-origin.\n * - `identityUrl` — GET endpoint the `useChatIdentity` hook\n * hits to learn the `{authTier, source, attachmentsEnabled}`\n * capability bag for the current session. Used beyond chat\n * (tickets / contact form / any embedded surface that needs\n * to identify the proxied customer), so the name has no\n * \"chat\" prefix even though the consuming hook still does. */\n attachmentUploadUrl: string\n attachmentViewUrlPrefix: string\n identityUrl: string\n /** Optional URL prefix for the image proxy (`<prefix>?url=<external>`).\n * When unset, lib's `getProxiedImageUrl` returns the original URL\n * unchanged. Hub default: '/api/image-proxy'. Embedders that don't\n * host an image-proxy route leave this undefined → images load\n * directly cross-origin (CORS-permitting). */\n imageProxyUrlPrefix?: string\n /** Optional list of hostnames that should bypass the image proxy\n * (rendered direct). Hub uses ['openmsp.ai']; embedders typically\n * leave it unset. Matches the `skipDomains` parameter of\n * `getProxiedImageUrl`. */\n imageProxySkipDomains?: string[]\n /** Supabase storage origin (e.g. `https://xyz.supabase.co`) — used\n * by `useVideoWarmup` to scope the `<link rel=\"preload\" as=\"video\">`\n * hint to MP4s the deployment actually hosts. Hub wires it via\n * `getSupabaseStorageOrigin()`; embedders without a Supabase\n * storage origin leave it unset (preload is then skipped; Mux/\n * YouTube preconnect still fires). */\n supabaseStorageOrigin?: string\n }\n navigation: {\n /** ONE knob, two behaviors:\n * - 'host' = use the host page's existing click-routing untouched.\n * The chat panel calls `navigate?.()` for in-app routing.\n * - 'embed' = guest inside another app: short-circuit at the top\n * of click handlers to force new-tab + absolutize via\n * resolveExternalNavigation. */\n mode: 'host' | 'embed'\n /** Embed-only fallback origin for relative URLs whose target platform\n * can't be inferred. Used by resolveExternalNavigation when\n * `targetPlatform` is null — without this, a relative `/foo` href would\n * window.open against the embedder's origin, which is WRONG.\n * Set to your content host (e.g. 'https://hub.openframe.ai').\n * Required by the embedded app whenever mode='embed'. */\n defaultContentOrigin?: string\n /** Override for opening external URLs. MUST BE SYNCHRONOUS —\n * Safari/Firefox block popups opened outside a direct user gesture.\n * Default: window.open(href, '_blank', 'noopener,noreferrer'). */\n openExternal?: (href: string) => void\n /** Optional in-app navigation callback (host-mode only).\n * Returns `true` if the host handled the click in-app\n * (router.push + docNav.navigate); returns `false`, `undefined`,\n * or `void` → lib falls back to window.location.assign(href).\n * Hub wires this via HubRuntimeProvider's HubNavigationWiring;\n * embedders not in Next.js leave it undefined. */\n navigate?: (input: { href: string; path?: string | null; targetPlatform?: string | null }) => boolean | void\n /** Optional new-tab decision callback. Returns true → lib opens in\n * new tab; false → same tab via `navigate`. Hub wires the existing\n * `decideNewTab` logic from use-nav-link.tsx (re-imports the pure\n * helper from lib). Embedders may omit; lib defaults to:\n * same-origin/same-platform → same tab, else new tab. */\n decideNewTab?: (args: { href: string; targetPlatform?: string | null }) => boolean\n }\n /** Optional OG placeholder URL builder. Returns a branded\n * `/api/og-placeholder?...` URL for the given title. Hub wires this\n * to its `buildOgPlaceholderUrl` (resolves CSS-var ODS colors to\n * hex via the static map). Embedders can wire any equivalent that\n * hits their own placeholder route — or omit, in which case entity\n * cards fall back to no placeholder.\n *\n * Pure synchronous function — NOT a hook. Callers wrap with\n * `useMemo`/`useOgPlaceholder` for memoization. */\n resolvePlaceholderUrl?: (\n title: string,\n options?: { site?: string; aspect?: 'wide' | 'square' },\n ) => string\n /** Optional content-URL composer. Returns the platform-aware href +\n * target-platform tuple for a content entity. Hub wires this to its\n * `buildContentURL(type, slug, extractPrimaryPlatform(platforms))`\n * pipeline so the lib catalog/detail views can derive cross-\n * platform hrefs without knowing the hub's platform topology\n * (openmsp.ai / openframe.app / flamingo.run / tmcg).\n *\n * THE single content-href authority for every embeddable surface — page\n * views (onboarding catalog/detail, releases) AND chat cards / chips /\n * search results all resolve content links through this one seam, so a\n * given type lands in the SAME place regardless of where it's rendered.\n * Embedders wire `makeComposeContentUrl({ hostedTypes, contentOrigin })`;\n * omit it and lib views fall back to a same-origin relative path\n * (`buildDefaultHref`).\n *\n * Takes a single `ComposeContentUrlInput`: `type` + `identifier` (page\n * views pass the slug; chat rows pass the id + `externalUrl`, whose path\n * yields the slug for in-app routing) + optional `platforms` /\n * `externalUrl` / `targetPlatform`. */\n composeContentUrl?: ComposeContentUrl\n /** Per-`documentType` doc-viewer targets — the UNIFIED, DYNAMIC replacement for\n * the single `chipBasePlatform` prop. Maps a doc-table documentType\n * (`'markdown'`, `'data_room_doc'`, …) → `{ platform, basePath }` for the PUBLIC\n * doc viewer that hosts it. Doc chips with no `externalUrl` resolve PER ROW to\n * `getBaseUrl(platform)/<basePath>/<path>`, so a chat mixing several doc sources\n * sends EACH to its own home (markdown→flamingo/knowledge-base,\n * data_room_doc→company-hub/data-room) instead of one static fallback. The hub\n * may keep using `chipBasePlatform` (one doc source per platform); embedders that\n * surface multiple doc sources wire this. Threaded into `resolveSourceRowCTA`. */\n docPlatformTargets?: Record<string, { platform: string; basePath: string }>\n /** Chat source / platform identifier — OPTIONAL. The hub sets it from\n * `currentPlatform()`; EMBEDDERS leave it unset and stay platform-agnostic.\n *\n * It is NOT required for chat to work. The wire resolves source server-side\n * (`/docs/chat|search|commands` reject any client `source`); the\n * same-tab-vs-new-tab link decision falls back to an origin comparison when\n * it's absent (`decideNewTab` → `isCrossOriginUrl`); and the localStorage\n * history namespace falls back to a stable constant. Set it only where the\n * client legitimately needs to know its platform a priori — i.e. the hub,\n * where several platforms share related origins so \"same platform\" can't be\n * inferred from a URL alone. */\n source?: string\n // NOTE: No `user` field. The chat's display identity (greeting\n // first-name, etc.) comes from the SERVER-resolved auth via\n // `useChatIdentity()` — the same identity the server uses to\n // authorize requests. Letting embedders pass a client-side `user`\n // would let it desync from the actual auth tier, causing greetings\n // like \"Hey Bob\" while the server treats the session as\n // alice@example.com. Single source of truth: the server.\n}\n\nexport const ChatRuntimeContext = createContext<ChatRuntime | null>(null)\n\n/**\n * Returns the active runtime, or null when no provider is mounted.\n * NULL is a first-class value — it signals \"no chat runtime configured.\"\n * Optional consumers fall back to no-op behavior; strict consumers\n * use `useRequiredChatRuntime` (below).\n */\nexport function useChatRuntime(): ChatRuntime | null {\n return useContext(ChatRuntimeContext)\n}\n\n/**\n * Strict variant used INSIDE the chat panel. Throws if no provider.\n * The hub guarantees one exists by mounting `<HubRuntimeProvider>` at\n * root; the embedded app mounts its own `<ChatRuntimeContext.Provider>`\n * at the tree root. In Jest / Storybook tests that render chat\n * internals directly, wrap with `<HubRuntimeProvider>` (hub defaults)\n * or supply `<ChatRuntimeContext.Provider value={mockedRuntime}>`.\n */\nexport function useRequiredChatRuntime(): ChatRuntime {\n const v = useContext(ChatRuntimeContext)\n if (!v) {\n throw new Error(\n '[chat-runtime] hook called outside a <ChatRuntimeContext.Provider>. ' +\n 'The hub mounts <HubRuntimeProvider> at root — this only fires when ' +\n 'chat internals are rendered above the provider tree. ' +\n 'Fix: ensure the rendering subtree descends from the runtime provider. ' +\n 'In tests/Storybook: wrap with <HubRuntimeProvider> or supply ' +\n 'a <ChatRuntimeContext.Provider value={mockedRuntime}>.',\n )\n }\n return v\n}\n"],"mappings":";;;AAmCA,SAAS,eAAe,kBAAkC;AA6LnD,IAAM,qBAAqB,cAAkC,IAAI;AAQjE,SAAS,iBAAqC;AACnD,SAAO,WAAW,kBAAkB;AACtC;AAUO,SAAS,yBAAsC;AACpD,QAAM,IAAI,WAAW,kBAAkB;AACvC,MAAI,CAAC,GAAG;AACN,UAAM,IAAI;AAAA,MACR;AAAA,IAMF;AAAA,EACF;AACA,SAAO;AACT;","names":[]}