@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
@@ -0,0 +1,46 @@
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
+ export type WebStorageBackend = 'local' | 'session';
21
+ export interface LocalStorageAdapter<T> {
22
+ load(): T | null;
23
+ save(value: T): void;
24
+ clear(): void;
25
+ /** Resolved storage key for the current call. Useful for tests. */
26
+ resolveKey(): string;
27
+ }
28
+ export interface LocalStorageAdapterOptions<T> {
29
+ /** Base storage key. Combined with `namespace()` when provided. */
30
+ key: string;
31
+ /** Optional dynamic namespace prefix appended via `.` separator.
32
+ * Called on EVERY read/write so the key can vary across the page
33
+ * lifetime (e.g. when the platform or user identity changes). */
34
+ namespace?: () => string | null | undefined;
35
+ /** Runtime shape check. Falsey return → `load()` yields null. */
36
+ validate?: (parsed: unknown) => parsed is T;
37
+ /** Diagnostic prefix written to `console.warn` on parse / write
38
+ * failures. Defaults to `'[local-storage]'`. */
39
+ logTag?: string;
40
+ /** Which Web-Storage backend to use. Defaults to `'local'`. Pass
41
+ * `'session'` for anything auth-adjacent so the value evaporates
42
+ * when the tab closes. */
43
+ backend?: WebStorageBackend;
44
+ }
45
+ export declare function createLocalStorageAdapter<T>(options: LocalStorageAdapterOptions<T>): LocalStorageAdapter<T>;
46
+ //# sourceMappingURL=local-storage-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-storage-adapter.d.ts","sourceRoot":"","sources":["../../src/utils/local-storage-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,CAAA;AAEnD,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAA;IAChB,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;IACpB,KAAK,IAAI,IAAI,CAAA;IACb,mEAAmE;IACnE,UAAU,IAAI,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,0BAA0B,CAAC,CAAC;IAC3C,mEAAmE;IACnE,GAAG,EAAE,MAAM,CAAA;IACX;;sEAEkE;IAClE,SAAS,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAC3C,iEAAiE;IACjE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,IAAI,CAAC,CAAA;IAC3C;qDACiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;+BAE2B;IAC3B,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAC5B;AAaD,wBAAgB,yBAAyB,CAAC,CAAC,EACzC,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACrC,mBAAmB,CAAC,CAAC,CAAC,CA2CxB"}
@@ -0,0 +1,78 @@
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
+ /** Map RagTableConfig.id → icon_name (resolvable via `getIconComponent`). */
27
+ export declare const SOURCE_ICON_NAMES: Record<string, string>;
28
+ /** Lookup an icon name by RagTableConfig.id. Returns undefined when
29
+ * unknown so callers can decide whether to fall back to documentType
30
+ * or to the generic FileText glyph in the icon registry. */
31
+ export declare function getSourceIconName(tableId: string | null | undefined): string | undefined;
32
+ /**
33
+ * Per-table display LABEL — used by SERVER-SIDE chip-strip rendering
34
+ * (the row's "Customer Interviews (8 records)" chip below an assistant
35
+ * message).
36
+ *
37
+ * The chip GRID + autocomplete DROPDOWN read their command label
38
+ * from the DB (per-source `chat_admin_slash_commands.label`) — those
39
+ * surfaces can carry per-source labels (e.g. "OpenFrame Commits" vs
40
+ * "GitHub Commits" for the same table). This map is the TABLE-LEVEL
41
+ * label used by sub-message chips where a SINGLE label per table is
42
+ * sufficient regardless of which source's chat is rendering.
43
+ */
44
+ export declare const SOURCE_LABELS_BY_TABLE: Record<string, string>;
45
+ /** Lookup a human-readable label by RagTableConfig.id. Falls back
46
+ * to the raw id (chip text becomes the table slug — visible bug
47
+ * that prompts an entry to land in `SOURCE_LABELS_BY_TABLE`). */
48
+ export declare function getSourceLabel(tableId: string): string;
49
+ /**
50
+ * Default `documentType → RagTableConfig.id` reverse map.
51
+ *
52
+ * Mirrors the canonical lookup the hub registers via
53
+ * `lib/config/rag-table-config.ts:tableIdForDocumentType()` — same vocabulary
54
+ * the LLM emits inside `[card://<type>:<id>]` markers, same tableIds the
55
+ * retrieval layer routes by, and same set of keys covered by
56
+ * `SOURCE_ICON_NAMES` / `SOURCE_LABELS_BY_TABLE` above.
57
+ *
58
+ * Server-safe (no `'use client'` banner), keyed by string for forward
59
+ * compatibility — adding a new RAG table is a single-line edit here so
60
+ * lib-based embedders pick it up without re-publishing.
61
+ *
62
+ * Embedders that need a CUSTOM mapping (e.g. polymorphic types whose
63
+ * tableId depends on per-tenant config) still pass their own
64
+ * `tableIdForDocumentType` callback to `useEmbeddedChat`; this default
65
+ * only applies when no callback is supplied.
66
+ *
67
+ * Inverse mapping audited 2026-05-24 against the hub registry — every
68
+ * entry in `RAG_TABLE_CONFIGS` with a `documentType` is represented.
69
+ */
70
+ export declare const DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID: Record<string, string>;
71
+ /**
72
+ * Default `tableIdForDocumentType` resolver used by `useEmbeddedChat` when
73
+ * the caller didn't pass an explicit callback. Returns `null` for
74
+ * unrecognized document types so downstream `discussRef` / `displayRef`
75
+ * still short-circuits gracefully on stale or custom types.
76
+ */
77
+ export declare function defaultTableIdForDocumentType(documentType: string): string | null;
78
+ //# sourceMappingURL=source-icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-icons.d.ts","sourceRoot":"","sources":["../../src/utils/source-icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2CpD,CAAA;AAED;;6DAE6D;AAC7D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGxF;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2CzD,CAAA;AAED;;kEAEkE;AAClE,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2CpE,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEjF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.204",
3
+ "version": "0.0.205",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -18,6 +18,12 @@
18
18
  "require": "./dist/index.cjs",
19
19
  "default": "./dist/index.js"
20
20
  },
21
+ "./contexts": {
22
+ "types": "./dist/contexts/index.d.ts",
23
+ "import": "./dist/contexts/index.js",
24
+ "require": "./dist/contexts/index.cjs",
25
+ "default": "./dist/contexts/index.js"
26
+ },
21
27
  "./components": {
22
28
  "types": "./dist/components/index.d.ts",
23
29
  "import": "./dist/components/index.js",
@@ -30,6 +36,12 @@
30
36
  "require": "./dist/components/ui/index.cjs",
31
37
  "default": "./dist/components/ui/index.js"
32
38
  },
39
+ "./components/chat": {
40
+ "types": "./dist/components/chat/index.d.ts",
41
+ "import": "./dist/components/chat/index.js",
42
+ "require": "./dist/components/chat/index.cjs",
43
+ "default": "./dist/components/chat/index.js"
44
+ },
33
45
  "./components/ui/file-manager": {
34
46
  "types": "./dist/components/ui/file-manager/index.d.ts",
35
47
  "import": "./dist/components/ui/file-manager/index.js",
@@ -66,6 +78,18 @@
66
78
  "require": "./dist/hooks/index.cjs",
67
79
  "default": "./dist/hooks/index.js"
68
80
  },
81
+ "./embed-shims": {
82
+ "types": "./dist/embed-shims/index.d.ts",
83
+ "import": "./dist/embed-shims/index.js",
84
+ "require": "./dist/embed-shims/index.cjs",
85
+ "default": "./dist/embed-shims/index.js"
86
+ },
87
+ "./embed-shims/*": {
88
+ "types": "./dist/embed-shims/*.d.ts",
89
+ "import": "./dist/embed-shims/*.js",
90
+ "require": "./dist/embed-shims/*.cjs",
91
+ "default": "./dist/embed-shims/*.js"
92
+ },
69
93
  "./nats": {
70
94
  "types": "./dist/nats/index.d.ts",
71
95
  "import": "./dist/nats/index.js",
@@ -137,7 +161,7 @@
137
161
  "test:ui": "vitest --ui",
138
162
  "test:run": "vitest run",
139
163
  "test:coverage": "vitest run --coverage",
140
- "yalc:watch": "NODE_OPTIONS='--max-old-space-size=4096' nodemon --watch src --watch tsconfig.json --watch tsup.config.ts --watch tailwind.config.ts -e ts,tsx,json,css --ignore dist --ignore node_modules --ignore '*.lock' --ignore .yalc --ignore yalc.lock --exec 'tsup && yalc push --changed'",
164
+ "yalc:watch": "NODE_OPTIONS='--max-old-space-size=4096' nodemon --watch src --watch tsconfig.json --watch tsup.config.ts --watch tailwind.config.ts --watch package.json -e ts,tsx,json,css --ignore dist --ignore node_modules --ignore '*.lock' --ignore .yalc --ignore yalc.lock --exec 'rm -rf dist && tsup && yalc push --changed'",
141
165
  "yalc:push": "yalc push",
142
166
  "yalc:publish": "yalc publish",
143
167
  "generate:icons": "node scripts/generate-icons.mjs",
@@ -157,6 +181,8 @@
157
181
  "@floating-ui/react": "^0.27.15",
158
182
  "@headlessui/react": "^2.2.9",
159
183
  "@mux/mux-player-react": "^3.13.0",
184
+ "@react-aria/overlays": "^3.31.0",
185
+ "@react-aria/utils": "^3.32.0",
160
186
  "@radix-ui/react-accordion": "^1.1.2",
161
187
  "@radix-ui/react-alert-dialog": "^1.1.14",
162
188
  "@radix-ui/react-aspect-ratio": "^1.0.3",
@@ -192,6 +218,7 @@
192
218
  "clsx": "^2.1.1",
193
219
  "cmdk": "^1.0.4",
194
220
  "embla-carousel-react": "^8.6.0",
221
+ "file-type": "^22.0.1",
195
222
  "framer-motion": "^12.23.12",
196
223
  "graphql": "^16.12.0",
197
224
  "libphonenumber-js": "^1.12.40",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { useState, useEffect } from 'react';
4
- import Image from 'next/image';
4
+ import Image from '../embed-shims/next-image';
5
5
  import { X } from 'lucide-react';
6
6
  import { Button } from './ui/button';
7
7
  import { renderSvgIcon } from './icon-utils';
@@ -12,6 +12,7 @@ import {
12
12
  } from '../utils/announcement-storage';
13
13
  import { Announcement } from '../types/announcement';
14
14
  import { getAppType } from '../utils/app-config';
15
+ import { useEndpointsRuntime } from '../contexts/endpoints-runtime-context';
15
16
 
16
17
  // Helper that defers to renderSvgIcon so we don't need local icon imports
17
18
  const getSvgIcon = (
@@ -33,6 +34,15 @@ export function AnnouncementBar() {
33
34
  // Get the platform type for platform-specific localStorage keys
34
35
  const platform = getAppType();
35
36
 
37
+ // Optional endpoint runtime: when no provider is mounted (e.g. on a
38
+ // bare React-tree page that doesn't wrap with HubRuntimeProvider),
39
+ // the bar silently skips its fetch instead of throwing. Apps that DO
40
+ // mount the provider get the configured URL — typically
41
+ // '/api/announcements/active' in the hub, or a proxied path in an
42
+ // embedded host.
43
+ const endpoints = useEndpointsRuntime();
44
+ const announcementsUrl = endpoints?.announcementsUrl;
45
+
36
46
  // Helper to determine dismissal key for localStorage
37
47
  const getDismissKey = (id: string) => `${platform}-announcement-${id}-dismissed`;
38
48
 
@@ -41,9 +51,12 @@ export function AnnouncementBar() {
41
51
 
42
52
  // Fetch active announcement from API and update state + LS
43
53
  const fetchActiveAnnouncement = async () => {
54
+ // No provider mounted → no URL configured → skip fetch silently.
55
+ // Cached announcement from previous sessions still renders if present.
56
+ if (!announcementsUrl) return;
44
57
  try {
45
58
  // Server-side platform injection - no URL parameter needed
46
- const response = await fetch(`/api/announcements/active`);
59
+ const response = await fetch(announcementsUrl);
47
60
 
48
61
  if (response.ok) {
49
62
  const data = await response.json();
@@ -92,13 +105,22 @@ export function AnnouncementBar() {
92
105
  setIsVisible(!isDismissed);
93
106
  }
94
107
 
108
+ // No provider mounted → no URL → no fetch / no polling. Cached
109
+ // announcement still painted above. Skip scheduling the 5-min
110
+ // interval entirely to avoid an idle timer + repeated short-circuit
111
+ // calls.
112
+ if (!announcementsUrl) return;
113
+
95
114
  // Always fetch latest on mount
96
115
  fetchActiveAnnouncement();
97
116
 
98
- // Schedule refresh every 5 minutes
117
+ // Schedule refresh every 5 minutes. When announcementsUrl flips
118
+ // (e.g. provider value swap), the effect re-runs and restarts the
119
+ // interval against the new URL — no stale captured fetch.
99
120
  const interval = setInterval(fetchActiveAnnouncement, 300_000);
100
121
  return () => clearInterval(interval);
101
- }, []);
122
+ // eslint-disable-next-line react-hooks/exhaustive-deps
123
+ }, [announcementsUrl]);
102
124
 
103
125
  // helpers
104
126
  const handleDismiss = () => {
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import React from 'react';
4
- import Link from 'next/link';
4
+ import Link from '../embed-shims/next-link';
5
5
  import { ChevronRight } from 'lucide-react';
6
6
  import { VendorIcon } from './vendor-icon';
7
7
  import type { CategoryCardProps, RealCategoryCardProps } from '../types/category';
@@ -0,0 +1,323 @@
1
+ 'use client'
2
+
3
+ /**
4
+ * Chat-attachment UI primitives.
5
+ *
6
+ * Split into two NAMED EXPORTS following 2026 chat-compose conventions
7
+ * (Claude.ai / ChatGPT / Cursor / Linear AI / etc.):
8
+ *
9
+ * 1. `<ChatAttachmentChipStrip>` — the thumbnail strip with per-file
10
+ * progress / × remove. Renders ABOVE the textarea (only when
11
+ * chips exist). Visible to the user as a small horizontal row of
12
+ * file pills that disappears when they Send.
13
+ *
14
+ * 2. `<ChatAttachmentAddButton>` — the standalone `+` glyph.
15
+ * Renders INLINE in the bottom-controls row alongside the
16
+ * `ModelDisplay` (BELOW the textarea, 2026 pattern).
17
+ * `attachmentsEnabled` arrives as a prop — the hub wires the
18
+ * `useChatIdentity().attachmentsEnabled` boolean; embedders supply
19
+ * their own gate. Reserves layout space when disabled
20
+ * (visibility, not display) so the row's width doesn't jump
21
+ * when chat-identity resolves.
22
+ *
23
+ * UI principles applied:
24
+ * - Borderless icon-only `+` (Claude.ai compose-box style).
25
+ * - Chips strip floats above input, dismissible per-file via ×.
26
+ * - All colors via ODS tokens; NO hex anywhere.
27
+ * - NO `capture="environment"` on the file input — iOS Safari would
28
+ * force camera-only mode and disable file picking.
29
+ */
30
+
31
+ import { useEffect, useRef, useState } from 'react'
32
+ import { PlusIcon } from '../icons-v2-generated/signs-and-symbols/plus-icon'
33
+ import { XmarkIcon } from '../icons-v2-generated/signs-and-symbols/xmark-icon'
34
+ import { Button } from '../ui/button'
35
+ import { ANTHROPIC_SUPPORTED_IMAGE_MIME } from './utils/chat-attachment-markdown'
36
+
37
+ // ===========================================================================
38
+ // CONSTANTS & TYPES — inlined from hub `lib/config/chat-attachment-config.ts`
39
+ // ===========================================================================
40
+
41
+ /** Hand-curated chat-attachment allow-list. Intentionally excludes
42
+ * `image/svg+xml` for XSS safety. */
43
+ export const CHAT_ATTACHMENT_MIME_TYPES = [
44
+ 'image/jpeg',
45
+ 'image/png',
46
+ 'image/webp',
47
+ 'image/gif',
48
+ 'video/mp4',
49
+ 'video/webm',
50
+ 'video/quicktime',
51
+ ] as const
52
+
53
+ /** Client-side cap on `addFiles` (the upload hook rejects 6+ files in a
54
+ * single selection). Server-side is per-IP-rate-limit; this is a UX
55
+ * hint more than a security boundary. */
56
+ export const CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = 5
57
+
58
+ type Status = 'sniffing' | 'uploading' | 'ready' | 'error'
59
+
60
+ /** Staged-attachment shape consumed by the chip strip. Mirrors the hub
61
+ * `StagedAttachment` produced by `useChatAttachments`. */
62
+ export interface StagedAttachment {
63
+ /** Stable client-side id; survives across re-renders. */
64
+ id: string
65
+ file: File
66
+ status: Status
67
+ /** Set when `status === 'ready'`. Server-issued. */
68
+ storagePath?: string
69
+ /** Set when `status === 'ready'`. Server-issued HMAC view token. */
70
+ viewToken?: string
71
+ /** 0-100 during 'uploading'. */
72
+ progress: number
73
+ /** Set when `status === 'error'`. */
74
+ errorMessage?: string
75
+ }
76
+
77
+ // ===========================================================================
78
+ // `+` ADD BUTTON — inline in the bottom-controls row (below input)
79
+ // ===========================================================================
80
+
81
+ export interface ChatAttachmentAddButtonProps {
82
+ /** Auth-gate flag. Hub passes `useChatIdentity().attachmentsEnabled`;
83
+ * embedders supply their own boolean. Disabled state collapses the
84
+ * button to a layout-reserving invisible placeholder. */
85
+ attachmentsEnabled: boolean
86
+ /** Current attachment count — drives the limit-reached disabled state. */
87
+ attachmentsCount: number
88
+ onAddFiles: (files: FileList | File[]) => void
89
+ /** External disable (e.g. while chat is streaming). */
90
+ disabled?: boolean
91
+ }
92
+
93
+ /**
94
+ * Settled `+` icon-only button for the bottom-controls row.
95
+ *
96
+ * LAYOUT STABILITY — first-paint placeholder pattern:
97
+ * `attachmentsEnabled` typically resolves ASYNCHRONOUSLY on mount
98
+ * (hub's `useChatIdentity()` round-trip ~100-500ms). When the flag is
99
+ * false (loading OR anon final state), the component renders an
100
+ * INVISIBLE placeholder `<span>` with the same `h-7 w-7 shrink-0`
101
+ * footprint as the real button. The placeholder reserves layout space
102
+ * from the very first paint; if `attachmentsEnabled` flips to `true`
103
+ * the button replaces the placeholder at the IDENTICAL 28×28
104
+ * position — ZERO shift.
105
+ *
106
+ * Truly-anon users see the invisible 28×28 spacer permanently —
107
+ * acceptable trade-off vs the universal jump on every panel open.
108
+ */
109
+ export function ChatAttachmentAddButton({
110
+ attachmentsEnabled,
111
+ attachmentsCount,
112
+ onAddFiles,
113
+ disabled = false,
114
+ }: ChatAttachmentAddButtonProps) {
115
+ const fileInputRef = useRef<HTMLInputElement | null>(null)
116
+
117
+ if (!attachmentsEnabled) {
118
+ return <span aria-hidden="true" className="inline-block h-7 w-7 shrink-0" />
119
+ }
120
+
121
+ const slotsAvailable = Math.max(
122
+ 0,
123
+ CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER - attachmentsCount,
124
+ )
125
+ const canAddMore = slotsAvailable > 0 && !disabled
126
+
127
+ const handlePick = () => {
128
+ if (!canAddMore) return
129
+ fileInputRef.current?.click()
130
+ }
131
+
132
+ return (
133
+ <>
134
+ <input
135
+ ref={fileInputRef}
136
+ type="file"
137
+ multiple
138
+ accept={CHAT_ATTACHMENT_MIME_TYPES.join(',')}
139
+ className="hidden"
140
+ onChange={(e) => {
141
+ const files = e.target.files
142
+ if (files && files.length > 0) {
143
+ onAddFiles(files)
144
+ }
145
+ // Reset so picking the same file twice in a row works
146
+ // (browsers don't refire change on identical selection).
147
+ e.target.value = ''
148
+ }}
149
+ />
150
+ <Button
151
+ type="button"
152
+ variant="transparent"
153
+ size="small"
154
+ onClick={handlePick}
155
+ disabled={!canAddMore}
156
+ aria-label={canAddMore ? 'Add attachments' : 'Attachment limit reached'}
157
+ title={
158
+ canAddMore
159
+ ? 'Add attachments'
160
+ : `Limit reached (${CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER})`
161
+ }
162
+ leftIcon={<PlusIcon className="h-4 w-4" />}
163
+ className="!h-7 !w-7 !p-0 shrink-0 text-ods-text-muted hover:text-ods-text-primary"
164
+ />
165
+ </>
166
+ )
167
+ }
168
+
169
+ // ===========================================================================
170
+ // CHIP STRIP — above input, only when chips exist
171
+ // ===========================================================================
172
+
173
+ export interface ChatAttachmentChipStripProps {
174
+ attachments: StagedAttachment[]
175
+ onRemove: (id: string) => void
176
+ /** External disable (e.g. while chat is streaming). */
177
+ disabled?: boolean
178
+ }
179
+
180
+ /**
181
+ * Horizontal strip of file chips that appears ABOVE the input when one
182
+ * or more attachments are staged. Returns `null` when empty — no
183
+ * permanent UI footprint.
184
+ */
185
+ export function ChatAttachmentChipStrip({
186
+ attachments,
187
+ onRemove,
188
+ disabled = false,
189
+ }: ChatAttachmentChipStripProps) {
190
+ if (attachments.length === 0) return null
191
+ return (
192
+ <div className="flex-shrink-0 px-5 pb-2">
193
+ <div className="flex items-center gap-2 flex-wrap">
194
+ {attachments.map((att) => (
195
+ <AttachmentChip
196
+ key={att.id}
197
+ attachment={att}
198
+ onRemove={() => onRemove(att.id)}
199
+ disabled={disabled}
200
+ />
201
+ ))}
202
+ </div>
203
+ </div>
204
+ )
205
+ }
206
+
207
+ // ---------------------------------------------------------------------------
208
+ // AttachmentChip — single row inside the chip strip
209
+ // ---------------------------------------------------------------------------
210
+
211
+ interface AttachmentChipProps {
212
+ attachment: StagedAttachment
213
+ onRemove: () => void
214
+ disabled: boolean
215
+ }
216
+
217
+ function AttachmentChip({ attachment, onRemove, disabled }: AttachmentChipProps) {
218
+ const { file, status, progress, errorMessage } = attachment
219
+ const isImage = (ANTHROPIC_SUPPORTED_IMAGE_MIME as readonly string[]).includes(file.type)
220
+
221
+ // Inline thumbnail for images during STAGING (pre-upload-complete).
222
+ // Local `URL.createObjectURL` blob — the user sees their image
223
+ // immediately, no waiting on the upload to finish.
224
+ const blobUrl = useObjectUrl(isImage ? file : null)
225
+
226
+ return (
227
+ <div
228
+ className="flex items-center gap-2 rounded-md border border-ods-border bg-ods-card px-2 py-1.5 max-w-[240px]"
229
+ role="group"
230
+ aria-label={`Attachment ${file.name}`}
231
+ >
232
+ {/* Thumbnail OR file-type initials */}
233
+ <div className="relative h-8 w-8 shrink-0 overflow-hidden rounded bg-ods-bg">
234
+ {isImage && blobUrl ? (
235
+ // eslint-disable-next-line @next/next/no-img-element -- blob: URLs
236
+ // cannot go through next/image; this is a transient pre-upload
237
+ // preview, NOT the chat-history render path.
238
+ <img src={blobUrl} alt={file.name} className="h-full w-full object-cover" />
239
+ ) : (
240
+ <div className="flex h-full w-full items-center justify-center text-[10px] font-mono uppercase text-ods-text-muted">
241
+ {extLabel(file.name)}
242
+ </div>
243
+ )}
244
+ {/* Progress overlay during 'uploading' state */}
245
+ {status === 'uploading' && (
246
+ <div className="absolute inset-x-0 bottom-0 h-1 bg-ods-bg">
247
+ <div
248
+ className="h-full bg-ods-accent transition-[width]"
249
+ style={{ width: `${progress}%` }}
250
+ />
251
+ </div>
252
+ )}
253
+ </div>
254
+
255
+ {/* Filename + status */}
256
+ <div className="min-w-0 flex-1">
257
+ <div className="truncate text-xs text-ods-text-primary" title={file.name}>
258
+ {file.name}
259
+ </div>
260
+ <div className="text-[10px] text-ods-text-muted">
261
+ {status === 'sniffing' && 'Checking…'}
262
+ {status === 'uploading' && `${progress}% · ${formatFileSize(file.size)}`}
263
+ {status === 'ready' && formatFileSize(file.size)}
264
+ {status === 'error' && (
265
+ <span className="text-ods-attention-red-error" title={errorMessage}>
266
+ {errorMessage ?? 'Upload failed'}
267
+ </span>
268
+ )}
269
+ </div>
270
+ </div>
271
+
272
+ {/* Remove button — UI-Kit Button with `transparent` + `small`. */}
273
+ <Button
274
+ type="button"
275
+ variant="transparent"
276
+ size="small"
277
+ onClick={onRemove}
278
+ disabled={disabled}
279
+ aria-label={`Remove ${file.name}`}
280
+ leftIcon={<XmarkIcon className="h-3.5 w-3.5" />}
281
+ className="!h-5 !w-5 !p-0 shrink-0 text-ods-text-muted hover:text-ods-text-primary"
282
+ />
283
+ </div>
284
+ )
285
+ }
286
+
287
+ // ---------------------------------------------------------------------------
288
+ // Helpers — inlined from hub upload-utils.ts to keep this file standalone
289
+ // ---------------------------------------------------------------------------
290
+
291
+ /** Same byte-rounding shape as the hub `formatFileSize` in
292
+ * `lib/utils/upload-utils.ts`. Inlined so the lib doesn't pull in the
293
+ * hub upload service. */
294
+ function formatFileSize(bytes: number): string {
295
+ if (bytes === 0) return '0 B'
296
+ const k = 1024
297
+ const sizes = ['B', 'KB', 'MB', 'GB']
298
+ const i = Math.floor(Math.log(bytes) / Math.log(k))
299
+ return `${parseFloat((bytes / Math.pow(k, i)).toFixed(1))} ${sizes[i]}`
300
+ }
301
+
302
+ function extLabel(fileName: string): string {
303
+ const dot = fileName.lastIndexOf('.')
304
+ if (dot === -1 || dot === fileName.length - 1) return '?'
305
+ return fileName.slice(dot + 1, dot + 4).toLowerCase()
306
+ }
307
+
308
+ /** Manage an `URL.createObjectURL` blob URL for the lifetime of the
309
+ * component. Returns null when `file` is null or during SSR.
310
+ * Revokes on unmount AND when `file` changes. */
311
+ function useObjectUrl(file: File | null): string | null {
312
+ const [url, setUrl] = useState<string | null>(null)
313
+ useEffect(() => {
314
+ if (!file) {
315
+ setUrl(null)
316
+ return
317
+ }
318
+ const next = URL.createObjectURL(file)
319
+ setUrl(next)
320
+ return () => URL.revokeObjectURL(next)
321
+ }, [file])
322
+ return url
323
+ }