@flamingo-stack/openframe-frontend-core 0.0.204 → 0.0.205

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 (509) hide show
  1. package/dist/{chunk-4CWSZPXH.cjs → chunk-24KCAECR.cjs} +9 -9
  2. package/dist/{chunk-4CWSZPXH.cjs.map → chunk-24KCAECR.cjs.map} +1 -1
  3. package/dist/chunk-27APPAJN.cjs +24 -0
  4. package/dist/chunk-27APPAJN.cjs.map +1 -0
  5. package/dist/{chunk-UC43NICZ.cjs → chunk-664KA5FI.cjs} +2 -35
  6. package/dist/chunk-664KA5FI.cjs.map +1 -0
  7. package/dist/chunk-6RZYJICV.cjs +24 -0
  8. package/dist/chunk-6RZYJICV.cjs.map +1 -0
  9. package/dist/chunk-7L4DWM7P.js +24 -0
  10. package/dist/chunk-7L4DWM7P.js.map +1 -0
  11. package/dist/chunk-BZFW3FOF.cjs +21 -0
  12. package/dist/chunk-BZFW3FOF.cjs.map +1 -0
  13. package/dist/{chunk-N57KWHDB.js → chunk-CIPO6DXK.js} +5 -5
  14. package/dist/chunk-EL5YVPD5.js +21 -0
  15. package/dist/chunk-EL5YVPD5.js.map +1 -0
  16. package/dist/{chunk-ARQ4XP64.cjs → chunk-FDCFI7YT.cjs} +40080 -31492
  17. package/dist/chunk-FDCFI7YT.cjs.map +1 -0
  18. package/dist/chunk-G7UE6RKV.cjs +121 -0
  19. package/dist/chunk-G7UE6RKV.cjs.map +1 -0
  20. package/dist/{chunk-25LVV26X.cjs → chunk-JUZGUQMX.cjs} +178 -50
  21. package/dist/chunk-JUZGUQMX.cjs.map +1 -0
  22. package/dist/{chunk-SZPJ5R5B.js → chunk-KSOOKNBG.js} +1 -34
  23. package/dist/chunk-KSOOKNBG.js.map +1 -0
  24. package/dist/{chunk-RMB5DVED.cjs → chunk-KUZGEA7U.cjs} +83 -66
  25. package/dist/chunk-KUZGEA7U.cjs.map +1 -0
  26. package/dist/chunk-LXC6P2EO.js +63 -0
  27. package/dist/chunk-LXC6P2EO.js.map +1 -0
  28. package/dist/chunk-MJNXIEV2.js +24 -0
  29. package/dist/chunk-MJNXIEV2.js.map +1 -0
  30. package/dist/{chunk-CPXLQ57U.js → chunk-MVGGXOFA.js} +37 -20
  31. package/dist/chunk-MVGGXOFA.js.map +1 -0
  32. package/dist/{chunk-LY34ORX6.js → chunk-O55ZUAX7.js} +39920 -31332
  33. package/dist/chunk-O55ZUAX7.js.map +1 -0
  34. package/dist/chunk-OHPI2HRK.js +47 -0
  35. package/dist/chunk-OHPI2HRK.js.map +1 -0
  36. package/dist/chunk-PLJLE4A4.js +121 -0
  37. package/dist/chunk-PLJLE4A4.js.map +1 -0
  38. package/dist/{chunk-XGL5FKIK.js → chunk-SCN5WFIZ.js} +148 -20
  39. package/dist/chunk-SCN5WFIZ.js.map +1 -0
  40. package/dist/chunk-WBR7H6E3.cjs +47 -0
  41. package/dist/chunk-WBR7H6E3.cjs.map +1 -0
  42. package/dist/chunk-XL4V2PYG.cjs +63 -0
  43. package/dist/chunk-XL4V2PYG.cjs.map +1 -0
  44. package/dist/components/announcement-bar.d.ts.map +1 -1
  45. package/dist/components/chat/chat-attachment-bar.d.ts +66 -0
  46. package/dist/components/chat/chat-attachment-bar.d.ts.map +1 -0
  47. package/dist/components/chat/chat-container.d.ts +21 -1
  48. package/dist/components/chat/chat-container.d.ts.map +1 -1
  49. package/dist/components/chat/chat-input.d.ts.map +1 -1
  50. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  51. package/dist/components/chat/chat-message-list.d.ts.map +1 -1
  52. package/dist/components/chat/chat-panel-context.d.ts +9 -0
  53. package/dist/components/chat/chat-panel-context.d.ts.map +1 -0
  54. package/dist/components/chat/chat-ticket-list.d.ts +1 -1
  55. package/dist/components/chat/chat-ticket-list.d.ts.map +1 -1
  56. package/dist/components/chat/embeddable-chat.d.ts +42 -0
  57. package/dist/components/chat/embeddable-chat.d.ts.map +1 -0
  58. package/dist/components/chat/entity-cards/admin-content-card.d.ts +34 -0
  59. package/dist/components/chat/entity-cards/admin-content-card.d.ts.map +1 -0
  60. package/dist/components/chat/entity-cards/block-card.d.ts.map +1 -0
  61. package/dist/components/chat/entity-cards/blog-card.d.ts +30 -0
  62. package/dist/components/chat/entity-cards/blog-card.d.ts.map +1 -0
  63. package/dist/components/chat/entity-cards/blog-image-placeholder.d.ts +26 -0
  64. package/dist/components/chat/entity-cards/blog-image-placeholder.d.ts.map +1 -0
  65. package/dist/components/chat/entity-cards/campaign-card-admin.d.ts +33 -0
  66. package/dist/components/chat/entity-cards/campaign-card-admin.d.ts.map +1 -0
  67. package/dist/components/chat/entity-cards/case-study-card.d.ts +20 -0
  68. package/dist/components/chat/entity-cards/case-study-card.d.ts.map +1 -0
  69. package/dist/components/chat/entity-cards/chat-ticket-item.d.ts.map +1 -0
  70. package/dist/components/chat/{chat-video-entity-card.d.ts → entity-cards/chat-video-entity-card.d.ts} +1 -1
  71. package/dist/components/chat/entity-cards/chat-video-entity-card.d.ts.map +1 -0
  72. package/dist/components/chat/entity-cards/customer-interview-card.d.ts +19 -0
  73. package/dist/components/chat/entity-cards/customer-interview-card.d.ts.map +1 -0
  74. package/dist/components/chat/entity-cards/data-room-doc-card.d.ts +47 -0
  75. package/dist/components/chat/entity-cards/data-room-doc-card.d.ts.map +1 -0
  76. package/dist/components/chat/entity-cards/dispatch.d.ts +119 -0
  77. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -0
  78. package/dist/components/chat/entity-cards/entity-author-card.d.ts +87 -0
  79. package/dist/components/chat/entity-cards/entity-author-card.d.ts.map +1 -0
  80. package/dist/components/chat/entity-cards/generic-entity-card.d.ts +42 -0
  81. package/dist/components/chat/entity-cards/generic-entity-card.d.ts.map +1 -0
  82. package/dist/components/chat/entity-cards/github-activity-card.d.ts +37 -0
  83. package/dist/components/chat/entity-cards/github-activity-card.d.ts.map +1 -0
  84. package/dist/components/chat/entity-cards/hubspot-ticket-card.d.ts +28 -0
  85. package/dist/components/chat/entity-cards/hubspot-ticket-card.d.ts.map +1 -0
  86. package/dist/components/chat/entity-cards/index.d.ts +32 -0
  87. package/dist/components/chat/entity-cards/index.d.ts.map +1 -0
  88. package/dist/components/chat/entity-cards/investor-update-card.d.ts +19 -0
  89. package/dist/components/chat/entity-cards/investor-update-card.d.ts.map +1 -0
  90. package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts +20 -0
  91. package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts.map +1 -0
  92. package/dist/components/chat/entity-cards/product-release-card-defaults.d.ts +21 -0
  93. package/dist/components/chat/entity-cards/product-release-card-defaults.d.ts.map +1 -0
  94. package/dist/components/chat/entity-cards/product-release-card.d.ts +12 -0
  95. package/dist/components/chat/entity-cards/product-release-card.d.ts.map +1 -0
  96. package/dist/components/chat/entity-cards/program-card-defaults.d.ts +32 -0
  97. package/dist/components/chat/entity-cards/program-card-defaults.d.ts.map +1 -0
  98. package/dist/components/chat/entity-cards/program-card.d.ts +37 -0
  99. package/dist/components/chat/entity-cards/program-card.d.ts.map +1 -0
  100. package/dist/components/chat/entity-cards/roadmap-card.d.ts +28 -0
  101. package/dist/components/chat/entity-cards/roadmap-card.d.ts.map +1 -0
  102. package/dist/components/chat/entity-cards/roadmap-vote-button.d.ts +12 -0
  103. package/dist/components/chat/entity-cards/roadmap-vote-button.d.ts.map +1 -0
  104. package/dist/components/chat/entity-cards/slack-message-card.d.ts +28 -0
  105. package/dist/components/chat/entity-cards/slack-message-card.d.ts.map +1 -0
  106. package/dist/components/chat/entity-cards/task-type-icon.d.ts +6 -0
  107. package/dist/components/chat/entity-cards/task-type-icon.d.ts.map +1 -0
  108. package/dist/components/chat/hooks/index.d.ts +10 -0
  109. package/dist/components/chat/hooks/index.d.ts.map +1 -1
  110. package/dist/components/chat/hooks/use-chat-attachment-image-gallery.d.ts +5 -0
  111. package/dist/components/chat/hooks/use-chat-attachment-image-gallery.d.ts.map +1 -0
  112. package/dist/components/chat/hooks/use-chat-attachments.d.ts +33 -0
  113. package/dist/components/chat/hooks/use-chat-attachments.d.ts.map +1 -0
  114. package/dist/components/chat/hooks/use-chat-card-item.d.ts +7 -0
  115. package/dist/components/chat/hooks/use-chat-card-item.d.ts.map +1 -0
  116. package/dist/components/chat/hooks/use-chat-identity.d.ts +44 -0
  117. package/dist/components/chat/hooks/use-chat-identity.d.ts.map +1 -0
  118. package/dist/components/chat/hooks/use-chat.d.ts +30 -0
  119. package/dist/components/chat/hooks/use-chat.d.ts.map +1 -0
  120. package/dist/components/chat/hooks/use-close-on-navigation.d.ts +2 -0
  121. package/dist/components/chat/hooks/use-close-on-navigation.d.ts.map +1 -0
  122. package/dist/components/chat/hooks/use-embedded-chat.d.ts +174 -0
  123. package/dist/components/chat/hooks/use-embedded-chat.d.ts.map +1 -0
  124. package/dist/components/chat/hooks/use-proxied-image-url.d.ts +18 -0
  125. package/dist/components/chat/hooks/use-proxied-image-url.d.ts.map +1 -0
  126. package/dist/components/chat/hooks/use-slash-commands.d.ts +32 -0
  127. package/dist/components/chat/hooks/use-slash-commands.d.ts.map +1 -0
  128. package/dist/components/chat/hooks/use-sse.d.ts +57 -0
  129. package/dist/components/chat/hooks/use-sse.d.ts.map +1 -0
  130. package/dist/components/chat/index.cjs +393 -0
  131. package/dist/components/chat/index.cjs.map +1 -0
  132. package/dist/components/chat/index.d.ts +5 -3
  133. package/dist/components/chat/index.d.ts.map +1 -1
  134. package/dist/components/chat/index.js +393 -0
  135. package/dist/components/chat/index.js.map +1 -0
  136. package/dist/components/chat/nav-link-anchor-via-runtime.d.ts +33 -0
  137. package/dist/components/chat/nav-link-anchor-via-runtime.d.ts.map +1 -0
  138. package/dist/components/chat/source-action-button.d.ts +39 -0
  139. package/dist/components/chat/source-action-button.d.ts.map +1 -0
  140. package/dist/components/chat/types/chat.types.d.ts +36 -0
  141. package/dist/components/chat/types/chat.types.d.ts.map +1 -1
  142. package/dist/components/chat/types/component.types.d.ts +56 -11
  143. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  144. package/dist/components/chat/types/entities/blog.d.ts +14 -0
  145. package/dist/components/chat/types/entities/blog.d.ts.map +1 -0
  146. package/dist/components/chat/types/entities/case-study.d.ts +10 -0
  147. package/dist/components/chat/types/entities/case-study.d.ts.map +1 -0
  148. package/dist/components/chat/types/entities/content-ref.d.ts +23 -0
  149. package/dist/components/chat/types/entities/content-ref.d.ts.map +1 -0
  150. package/dist/components/chat/types/entities/customer-interview.d.ts +10 -0
  151. package/dist/components/chat/types/entities/customer-interview.d.ts.map +1 -0
  152. package/dist/components/chat/types/entities/data-room-doc.d.ts +37 -0
  153. package/dist/components/chat/types/entities/data-room-doc.d.ts.map +1 -0
  154. package/dist/components/chat/types/entities/github-activity.d.ts +29 -0
  155. package/dist/components/chat/types/entities/github-activity.d.ts.map +1 -0
  156. package/dist/components/chat/types/entities/hubspot-ticket.d.ts +39 -0
  157. package/dist/components/chat/types/entities/hubspot-ticket.d.ts.map +1 -0
  158. package/dist/components/chat/types/entities/index.d.ts +28 -0
  159. package/dist/components/chat/types/entities/index.d.ts.map +1 -0
  160. package/dist/components/chat/types/entities/investor-update.d.ts +83 -0
  161. package/dist/components/chat/types/entities/investor-update.d.ts.map +1 -0
  162. package/dist/components/chat/types/entities/onboarding-guide.d.ts +79 -0
  163. package/dist/components/chat/types/entities/onboarding-guide.d.ts.map +1 -0
  164. package/dist/components/chat/types/entities/program-types.d.ts +303 -0
  165. package/dist/components/chat/types/entities/program-types.d.ts.map +1 -0
  166. package/dist/components/chat/types/entities/roadmap-item.d.ts +41 -0
  167. package/dist/components/chat/types/entities/roadmap-item.d.ts.map +1 -0
  168. package/dist/components/chat/types/entities/slack-message.d.ts +28 -0
  169. package/dist/components/chat/types/entities/slack-message.d.ts.map +1 -0
  170. package/dist/components/chat/types/index.d.ts +1 -0
  171. package/dist/components/chat/types/index.d.ts.map +1 -1
  172. package/dist/components/chat/utils/agent-status-message.d.ts +18 -0
  173. package/dist/components/chat/utils/agent-status-message.d.ts.map +1 -0
  174. package/dist/components/chat/utils/auto-continuation-directive.d.ts +38 -0
  175. package/dist/components/chat/utils/auto-continuation-directive.d.ts.map +1 -0
  176. package/dist/components/chat/utils/chat-attachment-markdown.d.ts +114 -0
  177. package/dist/components/chat/utils/chat-attachment-markdown.d.ts.map +1 -0
  178. package/dist/components/chat/utils/chat-authed-fetch.d.ts +13 -0
  179. package/dist/components/chat/utils/chat-authed-fetch.d.ts.map +1 -0
  180. package/dist/components/chat/utils/chat-nav-resolution.d.ts +72 -0
  181. package/dist/components/chat/utils/chat-nav-resolution.d.ts.map +1 -0
  182. package/dist/components/chat/utils/chat-proxy-auth-storage.d.ts +43 -0
  183. package/dist/components/chat/utils/chat-proxy-auth-storage.d.ts.map +1 -0
  184. package/dist/components/chat/utils/chip-action-class.d.ts +16 -0
  185. package/dist/components/chat/utils/chip-action-class.d.ts.map +1 -0
  186. package/dist/components/chat/utils/chip-styles.d.ts +32 -0
  187. package/dist/components/chat/utils/chip-styles.d.ts.map +1 -0
  188. package/dist/components/chat/utils/clickup-task-type-utils.d.ts +38 -0
  189. package/dist/components/chat/utils/clickup-task-type-utils.d.ts.map +1 -0
  190. package/dist/components/chat/utils/compact-card-classes.d.ts +50 -0
  191. package/dist/components/chat/utils/compact-card-classes.d.ts.map +1 -0
  192. package/dist/components/chat/utils/decide-new-tab.d.ts +39 -0
  193. package/dist/components/chat/utils/decide-new-tab.d.ts.map +1 -0
  194. package/dist/components/chat/utils/external-app-urls.d.ts +14 -0
  195. package/dist/components/chat/utils/external-app-urls.d.ts.map +1 -0
  196. package/dist/components/chat/utils/flatten-assistant-content.d.ts +25 -0
  197. package/dist/components/chat/utils/flatten-assistant-content.d.ts.map +1 -0
  198. package/dist/components/chat/utils/icon-registry.d.ts +67 -0
  199. package/dist/components/chat/utils/icon-registry.d.ts.map +1 -0
  200. package/dist/components/chat/utils/index.d.ts +21 -0
  201. package/dist/components/chat/utils/index.d.ts.map +1 -1
  202. package/dist/components/chat/utils/is-cross-origin-url.d.ts +22 -0
  203. package/dist/components/chat/utils/is-cross-origin-url.d.ts.map +1 -0
  204. package/dist/components/chat/utils/nav-anchor-props.d.ts +54 -0
  205. package/dist/components/chat/utils/nav-anchor-props.d.ts.map +1 -0
  206. package/dist/components/chat/utils/nav-click-handler.d.ts +51 -0
  207. package/dist/components/chat/utils/nav-click-handler.d.ts.map +1 -0
  208. package/dist/components/chat/utils/scroll-anchor.d.ts +30 -0
  209. package/dist/components/chat/utils/scroll-anchor.d.ts.map +1 -0
  210. package/dist/components/chat/utils/slash-dispatch-utils.d.ts +109 -0
  211. package/dist/components/chat/utils/slash-dispatch-utils.d.ts.map +1 -0
  212. package/dist/components/chat/utils/source-icons.d.ts +8 -0
  213. package/dist/components/chat/utils/source-icons.d.ts.map +1 -0
  214. package/dist/components/chat/utils/source-row-cta.d.ts +111 -0
  215. package/dist/components/chat/utils/source-row-cta.d.ts.map +1 -0
  216. package/dist/components/features/figma-prototype-viewer.d.ts.map +1 -1
  217. package/dist/components/features/index.cjs +12 -6
  218. package/dist/components/features/index.cjs.map +1 -1
  219. package/dist/components/features/index.js +11 -5
  220. package/dist/components/features/video.d.ts.map +1 -1
  221. package/dist/components/icons/index.cjs +3 -3
  222. package/dist/components/icons/index.js +2 -2
  223. package/dist/components/index.cjs +274 -8
  224. package/dist/components/index.cjs.map +1 -1
  225. package/dist/components/index.js +273 -7
  226. package/dist/components/interactive-wrapper.d.ts +3 -3
  227. package/dist/components/navigation/index.cjs +12 -6
  228. package/dist/components/navigation/index.cjs.map +1 -1
  229. package/dist/components/navigation/index.js +11 -5
  230. package/dist/components/resizable.d.ts +1 -1
  231. package/dist/components/shared/product-release/product-release-card-skeleton.d.ts +1 -1
  232. package/dist/components/shared/product-release/product-release-card-skeleton.d.ts.map +1 -1
  233. package/dist/components/shared/product-release/product-release-card.d.ts +19 -12
  234. package/dist/components/shared/product-release/product-release-card.d.ts.map +1 -1
  235. package/dist/components/shared/product-release/release-detail-page.d.ts +2 -4
  236. package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
  237. package/dist/components/ui/button/button.d.ts +13 -0
  238. package/dist/components/ui/button/button.d.ts.map +1 -1
  239. package/dist/components/ui/dashboard-info-card.d.ts.map +1 -1
  240. package/dist/components/ui/entity-image.d.ts.map +1 -1
  241. package/dist/components/ui/file-manager/index.cjs +71 -70
  242. package/dist/components/ui/file-manager/index.cjs.map +1 -1
  243. package/dist/components/ui/file-manager/index.js +6 -5
  244. package/dist/components/ui/file-manager/index.js.map +1 -1
  245. package/dist/components/ui/hover-dropdown.d.ts +66 -0
  246. package/dist/components/ui/hover-dropdown.d.ts.map +1 -0
  247. package/dist/components/ui/index.cjs +276 -6
  248. package/dist/components/ui/index.cjs.map +1 -1
  249. package/dist/components/ui/index.d.ts +1 -0
  250. package/dist/components/ui/index.d.ts.map +1 -1
  251. package/dist/components/ui/index.js +278 -8
  252. package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
  253. package/dist/components/ui/square-avatar.d.ts.map +1 -1
  254. package/dist/contexts/chat-runtime-context.d.ts +109 -0
  255. package/dist/contexts/chat-runtime-context.d.ts.map +1 -0
  256. package/dist/contexts/endpoints-runtime-context.d.ts +28 -0
  257. package/dist/contexts/endpoints-runtime-context.d.ts.map +1 -0
  258. package/dist/contexts/index.cjs +30 -0
  259. package/dist/contexts/index.cjs.map +1 -0
  260. package/dist/contexts/index.d.ts +26 -0
  261. package/dist/contexts/index.d.ts.map +1 -0
  262. package/dist/contexts/index.js +30 -0
  263. package/dist/contexts/index.js.map +1 -0
  264. package/dist/contexts/use-outer-or-default.d.ts +29 -0
  265. package/dist/contexts/use-outer-or-default.d.ts.map +1 -0
  266. package/dist/embed-shims/index.cjs +51 -0
  267. package/dist/embed-shims/index.cjs.map +1 -0
  268. package/dist/embed-shims/index.d.ts +31 -0
  269. package/dist/embed-shims/index.d.ts.map +1 -0
  270. package/dist/embed-shims/index.js +51 -0
  271. package/dist/embed-shims/index.js.map +1 -0
  272. package/dist/embed-shims/next-dynamic.cjs +12 -0
  273. package/dist/embed-shims/next-dynamic.cjs.map +1 -0
  274. package/dist/embed-shims/next-dynamic.d.ts +47 -0
  275. package/dist/embed-shims/next-dynamic.d.ts.map +1 -0
  276. package/dist/embed-shims/next-dynamic.js +12 -0
  277. package/dist/embed-shims/next-dynamic.js.map +1 -0
  278. package/dist/embed-shims/next-image.cjs +12 -0
  279. package/dist/embed-shims/next-image.cjs.map +1 -0
  280. package/dist/embed-shims/next-image.d.ts +28 -0
  281. package/dist/embed-shims/next-image.d.ts.map +1 -0
  282. package/dist/embed-shims/next-image.js +12 -0
  283. package/dist/embed-shims/next-image.js.map +1 -0
  284. package/dist/embed-shims/next-link.cjs +14 -0
  285. package/dist/embed-shims/next-link.cjs.map +1 -0
  286. package/dist/embed-shims/next-link.d.ts +22 -0
  287. package/dist/embed-shims/next-link.d.ts.map +1 -0
  288. package/dist/embed-shims/next-link.js +14 -0
  289. package/dist/embed-shims/next-link.js.map +1 -0
  290. package/dist/embed-shims/next-navigation.cjs +30 -0
  291. package/dist/embed-shims/next-navigation.cjs.map +1 -0
  292. package/dist/embed-shims/next-navigation.d.ts +46 -0
  293. package/dist/embed-shims/next-navigation.d.ts.map +1 -0
  294. package/dist/embed-shims/next-navigation.js +30 -0
  295. package/dist/embed-shims/next-navigation.js.map +1 -0
  296. package/dist/hooks/index.cjs +10 -4
  297. package/dist/hooks/index.cjs.map +1 -1
  298. package/dist/hooks/index.d.ts +2 -0
  299. package/dist/hooks/index.d.ts.map +1 -1
  300. package/dist/hooks/index.js +9 -3
  301. package/dist/hooks/use-access-code-integration.d.ts +48 -0
  302. package/dist/hooks/use-access-code-integration.d.ts.map +1 -0
  303. package/dist/hooks/use-contact-submission.d.ts.map +1 -1
  304. package/dist/hooks/use-og-placeholder.d.ts +31 -0
  305. package/dist/hooks/use-og-placeholder.d.ts.map +1 -0
  306. package/dist/hooks/use-toast.d.ts +1 -1
  307. package/dist/index.cjs +367 -7
  308. package/dist/index.cjs.map +1 -1
  309. package/dist/index.js +378 -18
  310. package/dist/types/index.cjs.map +1 -1
  311. package/dist/types/index.js.map +1 -1
  312. package/dist/utils/access-code-client.d.ts +21 -37
  313. package/dist/utils/access-code-client.d.ts.map +1 -1
  314. package/dist/utils/cn.d.ts +0 -27
  315. package/dist/utils/cn.d.ts.map +1 -1
  316. package/dist/utils/color-analysis.d.ts +33 -0
  317. package/dist/utils/color-analysis.d.ts.map +1 -0
  318. package/dist/utils/date-formatters.d.ts +16 -5
  319. package/dist/utils/date-formatters.d.ts.map +1 -1
  320. package/dist/utils/fetch-priority.d.ts +3 -0
  321. package/dist/utils/fetch-priority.d.ts.map +1 -0
  322. package/dist/utils/format.d.ts +192 -1
  323. package/dist/utils/format.d.ts.map +1 -1
  324. package/dist/utils/image-proxy.d.ts +67 -2
  325. package/dist/utils/image-proxy.d.ts.map +1 -1
  326. package/dist/utils/index.cjs +1274 -155
  327. package/dist/utils/index.cjs.map +1 -1
  328. package/dist/utils/index.d.ts +19 -3
  329. package/dist/utils/index.d.ts.map +1 -1
  330. package/dist/utils/index.js +1200 -157
  331. package/dist/utils/index.js.map +1 -1
  332. package/dist/utils/local-storage-adapter.d.ts +46 -0
  333. package/dist/utils/local-storage-adapter.d.ts.map +1 -0
  334. package/dist/utils/source-icons.d.ts +78 -0
  335. package/dist/utils/source-icons.d.ts.map +1 -0
  336. package/package.json +29 -2
  337. package/src/components/announcement-bar.tsx +26 -4
  338. package/src/components/categories-cart.tsx +1 -1
  339. package/src/components/chat/chat-attachment-bar.tsx +323 -0
  340. package/src/components/chat/chat-container.tsx +39 -5
  341. package/src/components/chat/chat-input.tsx +7 -1
  342. package/src/components/chat/chat-message-enhanced.tsx +32 -22
  343. package/src/components/chat/chat-message-list.tsx +53 -4
  344. package/src/components/chat/chat-panel-context.tsx +37 -0
  345. package/src/components/chat/chat-ticket-list.tsx +1 -1
  346. package/src/components/chat/embeddable-chat.tsx +1106 -0
  347. package/src/components/chat/entity-cards/admin-content-card.tsx +155 -0
  348. package/src/components/chat/entity-cards/blog-card.tsx +259 -0
  349. package/src/components/chat/entity-cards/blog-image-placeholder.tsx +52 -0
  350. package/src/components/chat/entity-cards/campaign-card-admin.tsx +113 -0
  351. package/src/components/chat/entity-cards/case-study-card.tsx +192 -0
  352. package/src/components/chat/{chat-ticket-item.tsx → entity-cards/chat-ticket-item.tsx} +2 -2
  353. package/src/components/chat/{chat-video-entity-card.tsx → entity-cards/chat-video-entity-card.tsx} +2 -2
  354. package/src/components/chat/entity-cards/customer-interview-card.tsx +211 -0
  355. package/src/components/chat/entity-cards/data-room-doc-card.tsx +120 -0
  356. package/src/components/chat/entity-cards/dispatch.tsx +1093 -0
  357. package/src/components/chat/entity-cards/entity-author-card.tsx +193 -0
  358. package/src/components/chat/entity-cards/generic-entity-card.tsx +144 -0
  359. package/src/components/chat/entity-cards/github-activity-card.tsx +305 -0
  360. package/src/components/chat/entity-cards/hubspot-ticket-card.tsx +205 -0
  361. package/src/components/chat/entity-cards/index.ts +125 -0
  362. package/src/components/chat/entity-cards/investor-update-card.tsx +150 -0
  363. package/src/components/chat/entity-cards/onboarding-guide-card.tsx +326 -0
  364. package/src/components/chat/entity-cards/product-release-card-defaults.ts +57 -0
  365. package/src/components/chat/entity-cards/product-release-card.tsx +19 -0
  366. package/src/components/chat/entity-cards/program-card-defaults.ts +62 -0
  367. package/src/components/chat/entity-cards/program-card.tsx +451 -0
  368. package/src/components/chat/entity-cards/roadmap-card.tsx +356 -0
  369. package/src/components/chat/entity-cards/roadmap-vote-button.tsx +54 -0
  370. package/src/components/chat/entity-cards/slack-message-card.tsx +182 -0
  371. package/src/components/chat/entity-cards/task-type-icon.tsx +60 -0
  372. package/src/components/chat/hooks/index.ts +22 -0
  373. package/src/components/chat/hooks/use-chat-attachment-image-gallery.tsx +114 -0
  374. package/src/components/chat/hooks/use-chat-attachments.ts +429 -0
  375. package/src/components/chat/hooks/use-chat-card-item.ts +102 -0
  376. package/src/components/chat/hooks/use-chat-identity.ts +139 -0
  377. package/src/components/chat/hooks/use-chat.ts +501 -0
  378. package/src/components/chat/hooks/use-close-on-navigation.ts +87 -0
  379. package/src/components/chat/hooks/use-embedded-chat.ts +1023 -0
  380. package/src/components/chat/hooks/use-proxied-image-url.ts +31 -0
  381. package/src/components/chat/hooks/use-slash-commands.ts +106 -0
  382. package/src/components/chat/hooks/use-sse.ts +143 -0
  383. package/src/components/chat/index.ts +30 -4
  384. package/src/components/chat/nav-link-anchor-via-runtime.tsx +72 -0
  385. package/src/components/chat/source-action-button.tsx +120 -0
  386. package/src/components/chat/types/chat.types.ts +61 -0
  387. package/src/components/chat/types/component.types.ts +57 -11
  388. package/src/components/chat/types/entities/blog.ts +27 -0
  389. package/src/components/chat/types/entities/case-study.ts +14 -0
  390. package/src/components/chat/types/entities/content-ref.ts +23 -0
  391. package/src/components/chat/types/entities/customer-interview.ts +15 -0
  392. package/src/components/chat/types/entities/data-room-doc.ts +37 -0
  393. package/src/components/chat/types/entities/github-activity.ts +36 -0
  394. package/src/components/chat/types/entities/hubspot-ticket.ts +39 -0
  395. package/src/components/chat/types/entities/index.ts +28 -0
  396. package/src/components/chat/types/entities/investor-update.ts +100 -0
  397. package/src/components/chat/types/entities/onboarding-guide.ts +101 -0
  398. package/src/components/chat/types/entities/program-types.ts +433 -0
  399. package/src/components/chat/types/entities/roadmap-item.ts +42 -0
  400. package/src/components/chat/types/entities/slack-message.ts +28 -0
  401. package/src/components/chat/types/index.ts +1 -0
  402. package/src/components/chat/utils/agent-status-message.ts +52 -0
  403. package/src/components/chat/utils/auto-continuation-directive.ts +70 -0
  404. package/src/components/chat/utils/chat-attachment-markdown.ts +190 -0
  405. package/src/components/chat/utils/chat-authed-fetch.ts +73 -0
  406. package/src/components/chat/utils/chat-nav-resolution.ts +151 -0
  407. package/src/components/chat/utils/chat-proxy-auth-storage.ts +148 -0
  408. package/src/components/chat/utils/chip-action-class.ts +19 -0
  409. package/src/components/chat/utils/chip-styles.ts +51 -0
  410. package/src/components/chat/utils/clickup-task-type-utils.ts +59 -0
  411. package/src/components/chat/utils/compact-card-classes.ts +97 -0
  412. package/src/components/chat/utils/decide-new-tab.ts +57 -0
  413. package/src/components/chat/utils/external-app-urls.ts +19 -0
  414. package/src/components/chat/utils/flatten-assistant-content.ts +35 -0
  415. package/src/components/chat/utils/icon-registry.ts +297 -0
  416. package/src/components/chat/utils/index.ts +133 -0
  417. package/src/components/chat/utils/is-cross-origin-url.ts +28 -0
  418. package/src/components/chat/utils/nav-anchor-props.ts +78 -0
  419. package/src/components/chat/utils/nav-click-handler.ts +81 -0
  420. package/src/components/chat/utils/scroll-anchor.ts +35 -0
  421. package/src/components/chat/utils/slash-dispatch-utils.ts +183 -0
  422. package/src/components/chat/utils/source-icons.ts +14 -0
  423. package/src/components/chat/utils/source-row-cta.ts +215 -0
  424. package/src/components/empty-state.tsx +1 -1
  425. package/src/components/features/board/ticket-card.tsx +1 -1
  426. package/src/components/features/figma-prototype-viewer.tsx +2 -1
  427. package/src/components/features/media-gallery-manager.tsx +1 -1
  428. package/src/components/features/parallax-image-showcase.tsx +1 -1
  429. package/src/components/features/release-media-manager.tsx +1 -1
  430. package/src/components/features/seo-editor-preview.tsx +1 -1
  431. package/src/components/features/video.tsx +54 -3
  432. package/src/components/footer-waitlist-button.tsx +1 -1
  433. package/src/components/navigation/header.tsx +1 -1
  434. package/src/components/shared/onboarding/onboarding-step-card.tsx +1 -1
  435. package/src/components/shared/product-release/product-release-card-skeleton.tsx +8 -44
  436. package/src/components/shared/product-release/product-release-card.tsx +31 -116
  437. package/src/components/shared/product-release/release-detail-page.tsx +12 -16
  438. package/src/components/ui/actions-menu.tsx +1 -1
  439. package/src/components/ui/button/button.tsx +41 -11
  440. package/src/components/ui/button/split-button.tsx +1 -1
  441. package/src/components/ui/dashboard-info-card.tsx +2 -3
  442. package/src/components/ui/data-table/data-table-row.tsx +1 -1
  443. package/src/components/ui/entity-image.tsx +2 -8
  444. package/src/components/ui/hover-dropdown.tsx +258 -0
  445. package/src/components/ui/image-gallery-modal.tsx +1 -1
  446. package/src/components/ui/index.ts +1 -0
  447. package/src/components/ui/markdown-editor.tsx +1 -1
  448. package/src/components/ui/more-actions-menu.tsx +1 -1
  449. package/src/components/ui/organization-card.tsx +1 -1
  450. package/src/components/ui/simple-markdown-renderer.tsx +53 -5
  451. package/src/components/ui/square-avatar.tsx +3 -12
  452. package/src/components/ui/tab-navigation.tsx +1 -1
  453. package/src/components/ui/table/table-row.tsx +1 -1
  454. package/src/components/unified-filter-logic.tsx +1 -1
  455. package/src/components/unified-pagination.tsx +1 -1
  456. package/src/components/user-summary-stub.tsx +1 -1
  457. package/src/components/vendor-display-button.tsx +1 -1
  458. package/src/components/vendor-icon.tsx +1 -1
  459. package/src/contexts/chat-runtime-context.tsx +163 -0
  460. package/src/contexts/endpoints-runtime-context.tsx +68 -0
  461. package/src/contexts/index.ts +38 -0
  462. package/src/contexts/use-outer-or-default.ts +42 -0
  463. package/src/embed-shims/index.ts +42 -0
  464. package/src/embed-shims/next-dynamic.tsx +70 -0
  465. package/src/embed-shims/next-image.tsx +114 -0
  466. package/src/embed-shims/next-link.tsx +91 -0
  467. package/src/embed-shims/next-navigation.tsx +201 -0
  468. package/src/hooks/index.ts +9 -0
  469. package/src/hooks/state/use-api-params.ts +1 -1
  470. package/src/hooks/state/use-query-params.ts +1 -1
  471. package/src/hooks/use-access-code-integration.ts +107 -0
  472. package/src/hooks/use-contact-submission.ts +7 -3
  473. package/src/hooks/use-og-placeholder.ts +45 -0
  474. package/src/stories/OnboardingStepCard.stories.tsx +140 -0
  475. package/src/styles/chat-animations.css +65 -0
  476. package/src/styles/index.css +1 -0
  477. package/src/utils/access-code-client.ts +32 -75
  478. package/src/utils/cn.ts +0 -65
  479. package/src/utils/color-analysis.ts +205 -0
  480. package/src/utils/date-formatters.ts +54 -11
  481. package/src/utils/fetch-priority.ts +41 -0
  482. package/src/utils/format.ts +525 -1
  483. package/src/utils/image-proxy.ts +127 -7
  484. package/src/utils/index.ts +145 -5
  485. package/src/utils/local-storage-adapter.ts +105 -0
  486. package/src/utils/source-icons.ts +219 -0
  487. package/dist/chunk-25LVV26X.cjs.map +0 -1
  488. package/dist/chunk-ARQ4XP64.cjs.map +0 -1
  489. package/dist/chunk-CPXLQ57U.js.map +0 -1
  490. package/dist/chunk-LY34ORX6.js.map +0 -1
  491. package/dist/chunk-RMB5DVED.cjs.map +0 -1
  492. package/dist/chunk-SZPJ5R5B.js.map +0 -1
  493. package/dist/chunk-UC43NICZ.cjs.map +0 -1
  494. package/dist/chunk-XGL5FKIK.js.map +0 -1
  495. package/dist/components/chat/block-card.d.ts.map +0 -1
  496. package/dist/components/chat/chat-ticket-item.d.ts.map +0 -1
  497. package/dist/components/chat/chat-video-entity-card.d.ts.map +0 -1
  498. package/dist/utils/dynamic-icons.d.ts +0 -26
  499. package/dist/utils/dynamic-icons.d.ts.map +0 -1
  500. package/dist/utils/format-relative-time.d.ts +0 -21
  501. package/dist/utils/format-relative-time.d.ts.map +0 -1
  502. package/src/utils/.dynamic-icons.md +0 -30
  503. package/src/utils/.format-relative-time.md +0 -36
  504. package/src/utils/dynamic-icons.tsx +0 -120
  505. package/src/utils/format-relative-time.ts +0 -52
  506. /package/dist/{chunk-N57KWHDB.js.map → chunk-CIPO6DXK.js.map} +0 -0
  507. /package/dist/components/chat/{block-card.d.ts → entity-cards/block-card.d.ts} +0 -0
  508. /package/dist/components/chat/{chat-ticket-item.d.ts → entity-cards/chat-ticket-item.d.ts} +0 -0
  509. /package/src/components/chat/{block-card.tsx → entity-cards/block-card.tsx} +0 -0
@@ -1,5 +1,9 @@
1
1
  // Utils exports - client-side only
2
- export { cn, formatDate, formatNumber, formatPrice, formatBytes, getAllPlatformBaseDomains } from './cn'
2
+ export { cn, getAllPlatformBaseDomains } from './cn'
3
+ // Number / currency / byte / date formatters live in `./format` (single
4
+ // source of truth). Re-exported here so existing callers that pull from
5
+ // the barrel keep working without changing imports.
6
+ export { formatDate, formatNumber, formatPrice, formatBytes } from './format'
3
7
  // SVG path constants — re-exported here (server-safe) because icons-v2 has "use client"
4
8
  export { PLAY_ICON_PATH } from '../components/icons-v2-generated/media-playback/play-icon'
5
9
  export { getPlatformAccentColor, getCurrentPlatform, type ColorCategory } from './ods-color-utils'
@@ -16,9 +20,18 @@ export * from './validation-utils'
16
20
  export * from './confidence-helpers'
17
21
  // Release date formatting utilities
18
22
  export * from './date-formatters'
19
- export * from './format-relative-time'
20
- // Dynamic icon registry
21
- export * from './dynamic-icons'
23
+ // Dynamic icon registry — single source of truth lives at
24
+ // components/chat/utils/icon-registry. Re-exported here so existing
25
+ // `@flamingo-stack/openframe-frontend-core/utils` callers (hub admin
26
+ // social-account screens) keep working without changing their import path.
27
+ export {
28
+ getDynamicIcon,
29
+ type DynamicIconSize,
30
+ ICON_REGISTRY,
31
+ getIconComponent,
32
+ normalizeIconKey,
33
+ } from '../components/chat/utils/icon-registry'
34
+ export { getPlatformIconComponent as getPlatformLogo } from './platform-config'
22
35
  // Tool type utilities
23
36
  export * from './tool-utils'
24
37
  // Shell type utilities
@@ -28,4 +41,131 @@ export * from './os-utils'
28
41
  // Phone utilities
29
42
  export * from './country-phone-utils'
30
43
  // Generic domain detection
31
- export * from './generic-domain-utils'
44
+ export * from './generic-domain-utils'
45
+
46
+ // Color analysis (canvas-based image color extraction)
47
+ export * from './color-analysis'
48
+
49
+ // Image-proxy URL builder (pure, runtime-configurable)
50
+ export {
51
+ type GetProxiedImageUrlOptions,
52
+ getProxiedImageUrl,
53
+ urlPathLooksLikeSvg,
54
+ shouldProxyImage,
55
+ generateImageSizes,
56
+ } from './image-proxy'
57
+
58
+ // Number / byte / duration / time / UTC date / initials / metric /
59
+ // trend / range / text helpers — single canonical home for every
60
+ // generic formatter consumed across the lib AND the hub. Hub keeps
61
+ // only vendor-specific helpers (formatClassification / formatPricingModel
62
+ // in `lib/utils/vendor-text.ts`).
63
+ export {
64
+ formatLargeNumber,
65
+ formatAbbreviatedNumber,
66
+ nameInitials,
67
+ getFirstLastInitials,
68
+ formatDurationMMSS,
69
+ formatDurationCompact,
70
+ formatTimeWithTimezone,
71
+ formatDurationFromRange,
72
+ type FormatDateUTCOptions,
73
+ formatDateUTC,
74
+ formatCurrency,
75
+ formatPercent,
76
+ formatWholeDollars,
77
+ formatLegalDate,
78
+ formatBytesShort,
79
+ formatDateTimeAt,
80
+ formatDurationFromMs,
81
+ type MetricFormat,
82
+ type TrendPolarity,
83
+ formatCompactMetric,
84
+ getTrendColors,
85
+ formatDateRange,
86
+ formatDuration,
87
+ formatUnderscoreText,
88
+ stripHtml,
89
+ formatBioText,
90
+ formatClassification,
91
+ formatPricingModel,
92
+ } from './format'
93
+
94
+ // Date / time helpers (relative, absolute, range checks, UTC timestamp)
95
+ export {
96
+ formatRelativeTime,
97
+ formatAbsoluteDate,
98
+ formatDateTime,
99
+ getDetailedTimeDifference,
100
+ isToday,
101
+ isWithinMinutes,
102
+ createUTCTimestamp,
103
+ } from './date-utils'
104
+
105
+ // Chat source-icons + labels (server-safe — lives here in src/utils/
106
+ // instead of src/components/chat/utils/ so server-side hub callers like
107
+ // doc-chat-utils can use them without tripping the 'use client' boundary)
108
+ export {
109
+ SOURCE_ICON_NAMES,
110
+ getSourceIconName,
111
+ SOURCE_LABELS_BY_TABLE,
112
+ getSourceLabel,
113
+ } from './source-icons'
114
+
115
+ // Pure text/wire helpers that originated under components/chat/utils/
116
+ // but are needed by SERVER-SIDE hub callers (doc-chat-utils,
117
+ // hubspot-files-utils, rag-mappers). Re-exporting through utils/ keeps
118
+ // them out of the 'use client' bundle. The chat-side re-export chain
119
+ // stays intact for client consumers via components/chat barrel.
120
+ export {
121
+ escapeMarkdownInline,
122
+ type ChatAttachment,
123
+ buildChatAttachmentViewUrl,
124
+ formatChatAttachmentMarkdownForBubble,
125
+ CHAT_ATTACHMENT_VIEW_URL_PREFIX,
126
+ CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM,
127
+ ANTHROPIC_SUPPORTED_IMAGE_MIME,
128
+ CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED,
129
+ CHAT_ATTACHMENT_MARKDOWN_PATTERN,
130
+ stripChatAttachmentMarkdown,
131
+ } from '../components/chat/utils/chat-attachment-markdown'
132
+ export {
133
+ AUTO_CONTINUATION_DIRECTIVE_PREFIX,
134
+ buildAutoContinuationDirective,
135
+ type BuildAutoContinuationOptions,
136
+ } from '../components/chat/utils/auto-continuation-directive'
137
+ export { flattenAssistantContent } from '../components/chat/utils/flatten-assistant-content'
138
+ export {
139
+ SCROLL_ANCHOR,
140
+ type ScrollAnchor,
141
+ SCROLL_ANCHOR_WIRE_KEY,
142
+ parseScrollAnchor,
143
+ } from '../components/chat/utils/scroll-anchor'
144
+ export {
145
+ type WireCommandOverride,
146
+ parseWireCommandOverride,
147
+ sanitizeTitleForChat,
148
+ formatSingularLookupInvocation,
149
+ type CommandOverride,
150
+ extractEntityIdFilter,
151
+ buildDiscussAddendum,
152
+ } from '../components/chat/utils/slash-dispatch-utils'
153
+
154
+ // ClickUp taxonomy constants + label resolver — server-safe so the
155
+ // delivery aggregator + sync engine can read CUSTOM_ITEM_ID.BUG/.REQUEST
156
+ // without going through the 'use client' chat barrel (which erases the
157
+ // values to undefined when imported from server code).
158
+ export { CUSTOM_ITEM_ID, getTaskTypeLabel } from '../components/chat/utils/clickup-task-type-utils'
159
+
160
+ // Status color scheme + clickup URL helpers (pure, server-safe)
161
+ export { type ColorScheme, getStatusColorScheme } from '../components/chat/utils/agent-status-message'
162
+ export { clickupTaskUrl } from '../components/chat/utils/external-app-urls'
163
+
164
+ // Cross-origin URL detection (pure — used by server-side rag-mappers
165
+ // + content-url-builder for cross-origin same-tab decisions)
166
+ export { isCrossOriginUrl } from '../components/chat/utils/is-cross-origin-url'
167
+
168
+ // React-version-aware `fetchpriority` prop builder — spread into `<img>`
169
+ // / `<iframe>` so the rendered DOM attribute is correct under React 18
170
+ // (lowercase) AND React 19 (camelCase) without console warnings.
171
+ export { fetchPriorityProp, type FetchPriorityValue } from './fetch-priority'
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Thin JSON-typed Web-Storage adapter (localStorage or sessionStorage).
3
+ *
4
+ * Centralizes the SSR-guard + try/catch + silent quota-failure pattern
5
+ * that every per-feature storage util would otherwise re-implement.
6
+ *
7
+ * Optional `namespace` prefix supports platform / user partitioning —
8
+ * the resolver runs lazily at call time so the namespace can vary across
9
+ * the lifetime of the page (e.g. proxy-auth switches user, which switches
10
+ * the key suffix).
11
+ *
12
+ * Backend selection (`backend: 'local' | 'session'`):
13
+ * - `'local'` (default): persists across browser sessions. Use for
14
+ * UI state, chat history metadata, feature-flag opt-ins.
15
+ * - `'session'`: cleared when the tab closes. Use for ANY auth-adjacent
16
+ * value (bearer tokens, act-as identity, proxy credentials). Reduces
17
+ * the XSS-exfiltration attack window from "indefinite" to "until tab
18
+ * close" without losing per-session ergonomics.
19
+ */
20
+
21
+ export type WebStorageBackend = 'local' | 'session'
22
+
23
+ export interface LocalStorageAdapter<T> {
24
+ load(): T | null
25
+ save(value: T): void
26
+ clear(): void
27
+ /** Resolved storage key for the current call. Useful for tests. */
28
+ resolveKey(): string
29
+ }
30
+
31
+ export interface LocalStorageAdapterOptions<T> {
32
+ /** Base storage key. Combined with `namespace()` when provided. */
33
+ key: string
34
+ /** Optional dynamic namespace prefix appended via `.` separator.
35
+ * Called on EVERY read/write so the key can vary across the page
36
+ * lifetime (e.g. when the platform or user identity changes). */
37
+ namespace?: () => string | null | undefined
38
+ /** Runtime shape check. Falsey return → `load()` yields null. */
39
+ validate?: (parsed: unknown) => parsed is T
40
+ /** Diagnostic prefix written to `console.warn` on parse / write
41
+ * failures. Defaults to `'[local-storage]'`. */
42
+ logTag?: string
43
+ /** Which Web-Storage backend to use. Defaults to `'local'`. Pass
44
+ * `'session'` for anything auth-adjacent so the value evaporates
45
+ * when the tab closes. */
46
+ backend?: WebStorageBackend
47
+ }
48
+
49
+ function getStorage(backend: WebStorageBackend): Storage | null {
50
+ if (typeof window === 'undefined') return null
51
+ try {
52
+ return backend === 'session' ? window.sessionStorage : window.localStorage
53
+ } catch {
54
+ // Some sandboxed contexts (Safari private mode older versions,
55
+ // strict CSP) throw on storage access — treat as unavailable.
56
+ return null
57
+ }
58
+ }
59
+
60
+ export function createLocalStorageAdapter<T>(
61
+ options: LocalStorageAdapterOptions<T>,
62
+ ): LocalStorageAdapter<T> {
63
+ const tag = options.logTag ?? '[local-storage]'
64
+ const backend: WebStorageBackend = options.backend ?? 'local'
65
+ const resolveKey = (): string => {
66
+ const ns = options.namespace?.()
67
+ return ns ? `${ns}.${options.key}` : options.key
68
+ }
69
+
70
+ return {
71
+ resolveKey,
72
+ load() {
73
+ const storage = getStorage(backend)
74
+ if (!storage) return null
75
+ try {
76
+ const raw = storage.getItem(resolveKey())
77
+ if (!raw) return null
78
+ const parsed = JSON.parse(raw) as unknown
79
+ if (options.validate && !options.validate(parsed)) return null
80
+ return parsed as T
81
+ } catch (err) {
82
+ console.warn(`${tag} parse failed for key ${resolveKey()}:`, err)
83
+ return null
84
+ }
85
+ },
86
+ save(value: T) {
87
+ const storage = getStorage(backend)
88
+ if (!storage) return
89
+ try {
90
+ storage.setItem(resolveKey(), JSON.stringify(value))
91
+ } catch (err) {
92
+ console.warn(`${tag} write failed for key ${resolveKey()}:`, err)
93
+ }
94
+ },
95
+ clear() {
96
+ const storage = getStorage(backend)
97
+ if (!storage) return
98
+ try {
99
+ storage.removeItem(resolveKey())
100
+ } catch (err) {
101
+ console.warn(`${tag} clear failed for key ${resolveKey()}:`, err)
102
+ }
103
+ },
104
+ }
105
+ }
@@ -0,0 +1,219 @@
1
+ /**
2
+ * Per-source icon-name + label lookup. Keyed by `RagTableConfig.id` (the same
3
+ * id used in `chat_source_rag_tables.rag_table_id` and on each
4
+ * `ChatRef.sourceRepo`).
5
+ *
6
+ * Server-safe — lives in `src/utils/` (no `'use client'` banner) so
7
+ * hub server-side rag-mappers + chat route handlers can call
8
+ * `getSourceLabel()` / `getSourceIconName()` directly. The client-side
9
+ * chat barrel re-exports from here for ergonomic client imports.
10
+ *
11
+ * Used by SOURCE-LEVEL chip surfaces:
12
+ * - The chip strip below an assistant message.
13
+ * - The tracking-row source glyph on inline entity cards.
14
+ *
15
+ * Why a small map here instead of a column on RAG_TABLE_CONFIGS:
16
+ * - The icon NAME is a small string; the resolver (icon-name → React
17
+ * component) lives in `src/components/chat/utils/icon-registry.ts`
18
+ * where it can stay client-only. Server-side consumers stay
19
+ * icon-component-free.
20
+ * - The mapping is intrinsic to the TABLE, not per-platform — same
21
+ * entry serves every (platform, source) binding.
22
+ *
23
+ * Per-table admin-UI bucket id (`SOURCE_CATEGORIES_BY_TABLE`) stays
24
+ * hub-side because it depends on the hub's `RagSourceCategoryId` enum.
25
+ */
26
+
27
+ /** Map RagTableConfig.id → icon_name (resolvable via `getIconComponent`). */
28
+ export const SOURCE_ICON_NAMES: Record<string, string> = {
29
+ // Doc tables
30
+ 'openframe-docs': 'openframe',
31
+ 'data-room-docs': 'shield',
32
+
33
+ // CMS / programs
34
+ 'blog-posts': 'newspaper',
35
+ 'product-releases': 'rocket',
36
+ 'case-studies': 'briefcase',
37
+ 'onboarding-guides': 'graduation-cap',
38
+ webinars: 'video',
39
+ events: 'calendar',
40
+ podcasts: 'headphones',
41
+ 'customer-interviews': 'users',
42
+
43
+ // Financials
44
+ 'investor-updates': 'mail',
45
+ 'financial-kpis': 'activity',
46
+ 'financial-cap-table': 'table',
47
+ 'financial-pnl': 'trending-up',
48
+ 'financial-balance-sheet': 'dollar-sign',
49
+ 'financial-cash-flow': 'banknote',
50
+
51
+ // ClickUp
52
+ 'clickup-roadmap': 'clickup',
53
+ 'clickup-delivery': 'clickup',
54
+ 'clickup-tasks-internal': 'clickup',
55
+
56
+ // GitHub
57
+ 'github-commits': 'github',
58
+ 'github-pull-requests': 'github',
59
+ 'github-pr-reviews': 'github',
60
+ 'github-commits-public': 'github',
61
+ 'github-pull-requests-public': 'github',
62
+ 'github-pr-reviews-public': 'github',
63
+
64
+ // HubSpot
65
+ 'hubspot-tickets': 'hubspot',
66
+ 'hubspot-tickets-anon': 'hubspot',
67
+ 'hubspot-tickets-self': 'hubspot',
68
+
69
+ // Communications
70
+ 'slack-messages': 'slack',
71
+ }
72
+
73
+ /** Lookup an icon name by RagTableConfig.id. Returns undefined when
74
+ * unknown so callers can decide whether to fall back to documentType
75
+ * or to the generic FileText glyph in the icon registry. */
76
+ export function getSourceIconName(tableId: string | null | undefined): string | undefined {
77
+ if (!tableId) return undefined
78
+ return SOURCE_ICON_NAMES[tableId]
79
+ }
80
+
81
+ /**
82
+ * Per-table display LABEL — used by SERVER-SIDE chip-strip rendering
83
+ * (the row's "Customer Interviews (8 records)" chip below an assistant
84
+ * message).
85
+ *
86
+ * The chip GRID + autocomplete DROPDOWN read their command label
87
+ * from the DB (per-source `chat_admin_slash_commands.label`) — those
88
+ * surfaces can carry per-source labels (e.g. "OpenFrame Commits" vs
89
+ * "GitHub Commits" for the same table). This map is the TABLE-LEVEL
90
+ * label used by sub-message chips where a SINGLE label per table is
91
+ * sufficient regardless of which source's chat is rendering.
92
+ */
93
+ export const SOURCE_LABELS_BY_TABLE: Record<string, string> = {
94
+ // Doc tables
95
+ 'openframe-docs': 'OpenFrame Docs',
96
+ 'data-room-docs': 'Data Room',
97
+
98
+ // CMS / programs
99
+ 'blog-posts': 'Blog Posts',
100
+ 'product-releases': 'Product Releases',
101
+ 'case-studies': 'Case Studies',
102
+ 'onboarding-guides': 'Onboarding Guides',
103
+ webinars: 'Webinars',
104
+ events: 'Events',
105
+ podcasts: 'Podcasts',
106
+ 'customer-interviews': 'Customer Interviews',
107
+
108
+ // Financials
109
+ 'investor-updates': 'Investor Updates',
110
+ 'financial-kpis': 'Financial KPIs',
111
+ 'financial-cap-table': 'Cap Table',
112
+ 'financial-pnl': 'Profit & Loss',
113
+ 'financial-balance-sheet': 'Balance Sheet',
114
+ 'financial-cash-flow': 'Cash Flow',
115
+
116
+ // ClickUp
117
+ 'clickup-roadmap': 'ClickUp Roadmap',
118
+ 'clickup-delivery': 'ClickUp Delivery',
119
+ 'clickup-tasks-internal': 'ClickUp Tasks',
120
+
121
+ // GitHub
122
+ 'github-commits': 'GitHub Commits',
123
+ 'github-pull-requests': 'GitHub Pull Requests',
124
+ 'github-pr-reviews': 'GitHub PR Reviews',
125
+ 'github-commits-public': 'OpenFrame Commits',
126
+ 'github-pull-requests-public': 'OpenFrame Pull Requests',
127
+ 'github-pr-reviews-public': 'OpenFrame PR Reviews',
128
+
129
+ // HubSpot
130
+ 'hubspot-tickets': 'HubSpot Tickets',
131
+ 'hubspot-tickets-anon': 'Known Issues',
132
+ 'hubspot-tickets-self': 'My Tickets',
133
+
134
+ // Communications
135
+ 'slack-messages': 'OpenMSP Community',
136
+ }
137
+
138
+ /** Lookup a human-readable label by RagTableConfig.id. Falls back
139
+ * to the raw id (chip text becomes the table slug — visible bug
140
+ * that prompts an entry to land in `SOURCE_LABELS_BY_TABLE`). */
141
+ export function getSourceLabel(tableId: string): string {
142
+ return SOURCE_LABELS_BY_TABLE[tableId] ?? tableId
143
+ }
144
+
145
+ /**
146
+ * Default `documentType → RagTableConfig.id` reverse map.
147
+ *
148
+ * Mirrors the canonical lookup the hub registers via
149
+ * `lib/config/rag-table-config.ts:tableIdForDocumentType()` — same vocabulary
150
+ * the LLM emits inside `[card://<type>:<id>]` markers, same tableIds the
151
+ * retrieval layer routes by, and same set of keys covered by
152
+ * `SOURCE_ICON_NAMES` / `SOURCE_LABELS_BY_TABLE` above.
153
+ *
154
+ * Server-safe (no `'use client'` banner), keyed by string for forward
155
+ * compatibility — adding a new RAG table is a single-line edit here so
156
+ * lib-based embedders pick it up without re-publishing.
157
+ *
158
+ * Embedders that need a CUSTOM mapping (e.g. polymorphic types whose
159
+ * tableId depends on per-tenant config) still pass their own
160
+ * `tableIdForDocumentType` callback to `useEmbeddedChat`; this default
161
+ * only applies when no callback is supplied.
162
+ *
163
+ * Inverse mapping audited 2026-05-24 against the hub registry — every
164
+ * entry in `RAG_TABLE_CONFIGS` with a `documentType` is represented.
165
+ */
166
+ export const DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID: Record<string, string> = {
167
+ // Doc tables
168
+ markdown: 'openframe-docs',
169
+ data_room_doc: 'data-room-docs',
170
+
171
+ // CMS / programs
172
+ blog_post: 'blog-posts',
173
+ product_release: 'product-releases',
174
+ case_study: 'case-studies',
175
+ onboarding_guide: 'onboarding-guides',
176
+ webinar: 'webinars',
177
+ event: 'events',
178
+ podcast: 'podcasts',
179
+ customer_interview: 'customer-interviews',
180
+
181
+ // Financials
182
+ investor_update: 'investor-updates',
183
+ financial_kpi: 'financial-kpis',
184
+ cap_table: 'financial-cap-table',
185
+ profit_loss: 'financial-pnl',
186
+ balance_sheet: 'financial-balance-sheet',
187
+ cash_flow: 'financial-cash-flow',
188
+
189
+ // ClickUp
190
+ roadmap_item: 'clickup-roadmap',
191
+ delivery_item: 'clickup-delivery',
192
+ internal_task: 'clickup-tasks-internal',
193
+
194
+ // GitHub
195
+ github_commit: 'github-commits',
196
+ github_pull_request: 'github-pull-requests',
197
+ github_pr_review: 'github-pr-reviews',
198
+ github_commit_public: 'github-commits-public',
199
+ github_pull_request_public: 'github-pull-requests-public',
200
+ github_pr_review_public: 'github-pr-reviews-public',
201
+
202
+ // HubSpot
203
+ hubspot_ticket: 'hubspot-tickets',
204
+ hubspot_ticket_anon: 'hubspot-tickets-anon',
205
+ hubspot_ticket_self: 'hubspot-tickets-self',
206
+
207
+ // Communications
208
+ slack_message: 'slack-messages',
209
+ }
210
+
211
+ /**
212
+ * Default `tableIdForDocumentType` resolver used by `useEmbeddedChat` when
213
+ * the caller didn't pass an explicit callback. Returns `null` for
214
+ * unrecognized document types so downstream `discussRef` / `displayRef`
215
+ * still short-circuits gracefully on stale or custom types.
216
+ */
217
+ export function defaultTableIdForDocumentType(documentType: string): string | null {
218
+ return DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID[documentType] ?? null
219
+ }