@inkeep/agents-ui 0.0.0-dev-20260313222128

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 (557) hide show
  1. package/LICENSE +64 -0
  2. package/README.md +1 -0
  3. package/dist/_virtual/index.cjs +1 -0
  4. package/dist/_virtual/index.js +4 -0
  5. package/dist/_virtual/use-sync-external-store-shim.development.cjs +1 -0
  6. package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
  7. package/dist/_virtual/use-sync-external-store-shim.production.cjs +1 -0
  8. package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
  9. package/dist/color-mode/index.cjs +1 -0
  10. package/dist/color-mode/index.d.ts +20 -0
  11. package/dist/color-mode/index.js +170 -0
  12. package/dist/index.cjs +1 -0
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.js +238 -0
  15. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
  16. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
  17. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +9 -0
  18. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
  19. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.cjs +1 -0
  20. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.js +8 -0
  21. package/dist/primitives/atoms/avatars/ai.cjs +1 -0
  22. package/dist/primitives/atoms/avatars/ai.d.ts +3 -0
  23. package/dist/primitives/atoms/avatars/ai.js +99 -0
  24. package/dist/primitives/atoms/avatars/user.cjs +1 -0
  25. package/dist/primitives/atoms/avatars/user.d.ts +3 -0
  26. package/dist/primitives/atoms/avatars/user.js +27 -0
  27. package/dist/primitives/atoms/cmdk/command-score.cjs +1 -0
  28. package/dist/primitives/atoms/cmdk/command-score.d.ts +1 -0
  29. package/dist/primitives/atoms/cmdk/command-score.js +46 -0
  30. package/dist/primitives/atoms/cmdk/index.cjs +1 -0
  31. package/dist/primitives/atoms/cmdk/index.d.ts +460 -0
  32. package/dist/primitives/atoms/cmdk/index.js +521 -0
  33. package/dist/primitives/atoms/codeblock/index.cjs +1 -0
  34. package/dist/primitives/atoms/codeblock/index.d.ts +10 -0
  35. package/dist/primitives/atoms/codeblock/index.js +40 -0
  36. package/dist/primitives/atoms/combobox.cjs +1 -0
  37. package/dist/primitives/atoms/combobox.js +275 -0
  38. package/dist/primitives/atoms/custom-styles.cjs +1 -0
  39. package/dist/primitives/atoms/custom-styles.d.ts +5 -0
  40. package/dist/primitives/atoms/custom-styles.js +57 -0
  41. package/dist/primitives/atoms/dialog.cjs +1 -0
  42. package/dist/primitives/atoms/dialog.d.ts +94 -0
  43. package/dist/primitives/atoms/dialog.js +227 -0
  44. package/dist/primitives/atoms/error-boundary.cjs +1 -0
  45. package/dist/primitives/atoms/error-boundary.d.ts +6 -0
  46. package/dist/primitives/atoms/error-boundary.js +9 -0
  47. package/dist/primitives/atoms/icons/built-in-icon-renderer.cjs +1 -0
  48. package/dist/primitives/atoms/icons/built-in-icon-renderer.d.ts +6 -0
  49. package/dist/primitives/atoms/icons/built-in-icon-renderer.js +51 -0
  50. package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -0
  51. package/dist/primitives/atoms/icons/built-in-icons.d.ts +86 -0
  52. package/dist/primitives/atoms/icons/built-in-icons.js +89 -0
  53. package/dist/primitives/atoms/icons/checkbox-icon.cjs +1 -0
  54. package/dist/primitives/atoms/icons/checkbox-icon.d.ts +1 -0
  55. package/dist/primitives/atoms/icons/checkbox-icon.js +24 -0
  56. package/dist/primitives/atoms/icons/collections/bi.cjs +1 -0
  57. package/dist/primitives/atoms/icons/collections/bi.d.ts +4 -0
  58. package/dist/primitives/atoms/icons/collections/bi.js +49 -0
  59. package/dist/primitives/atoms/icons/collections/fi.cjs +1 -0
  60. package/dist/primitives/atoms/icons/collections/fi.d.ts +2 -0
  61. package/dist/primitives/atoms/icons/collections/fi.js +29 -0
  62. package/dist/primitives/atoms/icons/collections/gr.cjs +1 -0
  63. package/dist/primitives/atoms/icons/collections/gr.d.ts +2 -0
  64. package/dist/primitives/atoms/icons/collections/gr.js +21 -0
  65. package/dist/primitives/atoms/icons/collections/io5.cjs +1 -0
  66. package/dist/primitives/atoms/icons/collections/io5.d.ts +34 -0
  67. package/dist/primitives/atoms/icons/collections/io5.js +806 -0
  68. package/dist/primitives/atoms/icons/collections/pi.cjs +1 -0
  69. package/dist/primitives/atoms/icons/collections/pi.d.ts +4 -0
  70. package/dist/primitives/atoms/icons/collections/pi.js +49 -0
  71. package/dist/primitives/atoms/icons/custom-icon.cjs +1 -0
  72. package/dist/primitives/atoms/icons/custom-icon.d.ts +6 -0
  73. package/dist/primitives/atoms/icons/custom-icon.js +19 -0
  74. package/dist/primitives/atoms/icons/generate-icon.cjs +1 -0
  75. package/dist/primitives/atoms/icons/generate-icon.d.ts +28 -0
  76. package/dist/primitives/atoms/icons/generate-icon.js +56 -0
  77. package/dist/primitives/atoms/icons/index.cjs +1 -0
  78. package/dist/primitives/atoms/icons/index.d.ts +2 -0
  79. package/dist/primitives/atoms/icons/index.js +6 -0
  80. package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -0
  81. package/dist/primitives/atoms/icons/inkeep-default-icons.d.ts +2 -0
  82. package/dist/primitives/atoms/icons/inkeep-default-icons.js +28 -0
  83. package/dist/primitives/atoms/link.cjs +1 -0
  84. package/dist/primitives/atoms/link.d.ts +14 -0
  85. package/dist/primitives/atoms/link.js +35 -0
  86. package/dist/primitives/atoms/markdown/components.cjs +1 -0
  87. package/dist/primitives/atoms/markdown/components.d.ts +31 -0
  88. package/dist/primitives/atoms/markdown/components.js +76 -0
  89. package/dist/primitives/atoms/markdown/index.cjs +1 -0
  90. package/dist/primitives/atoms/markdown/index.d.ts +17 -0
  91. package/dist/primitives/atoms/markdown/index.js +121 -0
  92. package/dist/primitives/atoms/markdown/rehype-inline-code-property.cjs +1 -0
  93. package/dist/primitives/atoms/markdown/rehype-inline-code-property.d.ts +1 -0
  94. package/dist/primitives/atoms/markdown/rehype-inline-code-property.js +12 -0
  95. package/dist/primitives/atoms/portal-with-theme.cjs +1 -0
  96. package/dist/primitives/atoms/portal-with-theme.d.ts +2 -0
  97. package/dist/primitives/atoms/portal-with-theme.js +12 -0
  98. package/dist/primitives/atoms/portal.cjs +1 -0
  99. package/dist/primitives/atoms/portal.d.ts +8 -0
  100. package/dist/primitives/atoms/portal.js +19 -0
  101. package/dist/primitives/atoms/select.cjs +1 -0
  102. package/dist/primitives/atoms/select.d.ts +136 -0
  103. package/dist/primitives/atoms/select.js +785 -0
  104. package/dist/primitives/atoms/shadow/context.cjs +1 -0
  105. package/dist/primitives/atoms/shadow/context.d.ts +14 -0
  106. package/dist/primitives/atoms/shadow/context.js +54 -0
  107. package/dist/primitives/atoms/shadow/create.cjs +1 -0
  108. package/dist/primitives/atoms/shadow/create.d.ts +8 -0
  109. package/dist/primitives/atoms/shadow/create.js +56 -0
  110. package/dist/primitives/atoms/shadow/index.d.ts +1 -0
  111. package/dist/primitives/atoms/shadow/root.cjs +1 -0
  112. package/dist/primitives/atoms/shadow/root.d.ts +5 -0
  113. package/dist/primitives/atoms/shadow/root.js +22 -0
  114. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.cjs +1 -0
  115. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.d.ts +2 -0
  116. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.js +11 -0
  117. package/dist/primitives/atoms/shadow/utils.cjs +1 -0
  118. package/dist/primitives/atoms/shadow/utils.d.ts +9 -0
  119. package/dist/primitives/atoms/shadow/utils.js +16 -0
  120. package/dist/primitives/components/chat-bubble/index.cjs +1 -0
  121. package/dist/primitives/components/chat-bubble/index.d.ts +10 -0
  122. package/dist/primitives/components/chat-bubble/index.js +38 -0
  123. package/dist/primitives/components/chat-button.cjs +1 -0
  124. package/dist/primitives/components/chat-button.d.ts +20 -0
  125. package/dist/primitives/components/chat-button.js +51 -0
  126. package/dist/primitives/components/chat-history/index.cjs +1 -0
  127. package/dist/primitives/components/chat-history/index.d.ts +27 -0
  128. package/dist/primitives/components/chat-history/index.js +105 -0
  129. package/dist/primitives/components/data-summaries.cjs +1 -0
  130. package/dist/primitives/components/data-summaries.d.ts +14 -0
  131. package/dist/primitives/components/data-summaries.js +38 -0
  132. package/dist/primitives/components/embedded-chat/chat-provider.cjs +1 -0
  133. package/dist/primitives/components/embedded-chat/chat-provider.d.ts +19 -0
  134. package/dist/primitives/components/embedded-chat/chat-provider.js +20 -0
  135. package/dist/primitives/components/embedded-chat/use-captcha.cjs +1 -0
  136. package/dist/primitives/components/embedded-chat/use-captcha.d.ts +30 -0
  137. package/dist/primitives/components/embedded-chat/use-captcha.js +67 -0
  138. package/dist/primitives/components/embedded-chat/use-chat-action.cjs +1 -0
  139. package/dist/primitives/components/embedded-chat/use-chat-action.d.ts +9 -0
  140. package/dist/primitives/components/embedded-chat/use-chat-action.js +41 -0
  141. package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +3 -0
  142. package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +57 -0
  143. package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +312 -0
  144. package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -0
  145. package/dist/primitives/components/embedded-chat/use-stream-processor.d.ts +30 -0
  146. package/dist/primitives/components/embedded-chat/use-stream-processor.js +159 -0
  147. package/dist/primitives/components/embedded-chat.cjs +11 -0
  148. package/dist/primitives/components/embedded-chat.d.ts +461 -0
  149. package/dist/primitives/components/embedded-chat.js +2051 -0
  150. package/dist/primitives/components/embedded-search/search-provider.cjs +1 -0
  151. package/dist/primitives/components/embedded-search/search-provider.d.ts +21 -0
  152. package/dist/primitives/components/embedded-search/search-provider.js +26 -0
  153. package/dist/primitives/components/embedded-search/transform-results.cjs +1 -0
  154. package/dist/primitives/components/embedded-search/transform-results.d.ts +3 -0
  155. package/dist/primitives/components/embedded-search/transform-results.js +47 -0
  156. package/dist/primitives/components/embedded-search/url-query.cjs +1 -0
  157. package/dist/primitives/components/embedded-search/url-query.d.ts +4 -0
  158. package/dist/primitives/components/embedded-search/url-query.js +12 -0
  159. package/dist/primitives/components/embedded-search/use-inkeep-search.cjs +1 -0
  160. package/dist/primitives/components/embedded-search/use-inkeep-search.d.ts +19 -0
  161. package/dist/primitives/components/embedded-search/use-inkeep-search.js +35 -0
  162. package/dist/primitives/components/embedded-search/use-search-filter.cjs +1 -0
  163. package/dist/primitives/components/embedded-search/use-search-filter.d.ts +1 -0
  164. package/dist/primitives/components/embedded-search/use-search-filter.js +77 -0
  165. package/dist/primitives/components/embedded-search.cjs +1 -0
  166. package/dist/primitives/components/embedded-search.d.ts +249 -0
  167. package/dist/primitives/components/embedded-search.js +628 -0
  168. package/dist/primitives/components/factory.cjs +1 -0
  169. package/dist/primitives/components/factory.d.ts +19 -0
  170. package/dist/primitives/components/factory.js +39 -0
  171. package/dist/primitives/components/index.cjs +1 -0
  172. package/dist/primitives/components/index.d.ts +13 -0
  173. package/dist/primitives/components/index.js +33 -0
  174. package/dist/primitives/components/modal/modal-provider.cjs +1 -0
  175. package/dist/primitives/components/modal/modal-provider.d.ts +12 -0
  176. package/dist/primitives/components/modal/modal-provider.js +8 -0
  177. package/dist/primitives/components/modal/use-inkeep-modal.cjs +1 -0
  178. package/dist/primitives/components/modal/use-inkeep-modal.d.ts +7 -0
  179. package/dist/primitives/components/modal/use-inkeep-modal.js +9 -0
  180. package/dist/primitives/components/modal/widget-auto-focus.cjs +1 -0
  181. package/dist/primitives/components/modal/widget-auto-focus.d.ts +2 -0
  182. package/dist/primitives/components/modal/widget-auto-focus.js +25 -0
  183. package/dist/primitives/components/modal.cjs +1 -0
  184. package/dist/primitives/components/modal.d.ts +18 -0
  185. package/dist/primitives/components/modal.js +40 -0
  186. package/dist/primitives/components/presence.cjs +1 -0
  187. package/dist/primitives/components/presence.d.ts +8 -0
  188. package/dist/primitives/components/presence.js +26 -0
  189. package/dist/primitives/components/searchbar.cjs +1 -0
  190. package/dist/primitives/components/searchbar.d.ts +23 -0
  191. package/dist/primitives/components/searchbar.js +54 -0
  192. package/dist/primitives/components/sidebar-chat/index.cjs +1 -0
  193. package/dist/primitives/components/sidebar-chat/index.d.ts +9 -0
  194. package/dist/primitives/components/sidebar-chat/index.js +67 -0
  195. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.cjs +1 -0
  196. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.d.ts +5 -0
  197. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.js +34 -0
  198. package/dist/primitives/components/tagline-logo-icon.cjs +1 -0
  199. package/dist/primitives/components/tagline-logo-icon.d.ts +1 -0
  200. package/dist/primitives/components/tagline-logo-icon.js +26 -0
  201. package/dist/primitives/components/use-component-trigger.cjs +1 -0
  202. package/dist/primitives/components/use-component-trigger.d.ts +5 -0
  203. package/dist/primitives/components/use-component-trigger.js +17 -0
  204. package/dist/primitives/constants/search.cjs +1 -0
  205. package/dist/primitives/constants/search.d.ts +1 -0
  206. package/dist/primitives/constants/search.js +5 -0
  207. package/dist/primitives/hooks/index.cjs +1 -0
  208. package/dist/primitives/hooks/index.d.ts +12 -0
  209. package/dist/primitives/hooks/index.js +26 -0
  210. package/dist/primitives/hooks/use-anonymous-session.cjs +1 -0
  211. package/dist/primitives/hooks/use-anonymous-session.d.ts +12 -0
  212. package/dist/primitives/hooks/use-anonymous-session.js +82 -0
  213. package/dist/primitives/hooks/use-boolean.cjs +1 -0
  214. package/dist/primitives/hooks/use-boolean.d.ts +10 -0
  215. package/dist/primitives/hooks/use-boolean.js +17 -0
  216. package/dist/primitives/hooks/use-component-classnames.cjs +1 -0
  217. package/dist/primitives/hooks/use-component-classnames.d.ts +6 -0
  218. package/dist/primitives/hooks/use-component-classnames.js +14 -0
  219. package/dist/primitives/hooks/use-container-size.cjs +1 -0
  220. package/dist/primitives/hooks/use-container-size.d.ts +5 -0
  221. package/dist/primitives/hooks/use-container-size.js +18 -0
  222. package/dist/primitives/hooks/use-conversation-loader.cjs +1 -0
  223. package/dist/primitives/hooks/use-conversation-loader.d.ts +13 -0
  224. package/dist/primitives/hooks/use-conversation-loader.js +36 -0
  225. package/dist/primitives/hooks/use-copy-to-clipboard.cjs +1 -0
  226. package/dist/primitives/hooks/use-copy-to-clipboard.d.ts +3 -0
  227. package/dist/primitives/hooks/use-copy-to-clipboard.js +24 -0
  228. package/dist/primitives/hooks/use-debounce.cjs +1 -0
  229. package/dist/primitives/hooks/use-debounce.d.ts +1 -0
  230. package/dist/primitives/hooks/use-debounce.js +16 -0
  231. package/dist/primitives/hooks/use-inkeep-api-client.cjs +1 -0
  232. package/dist/primitives/hooks/use-inkeep-api-client.d.ts +33 -0
  233. package/dist/primitives/hooks/use-inkeep-api-client.js +87 -0
  234. package/dist/primitives/hooks/use-inkeep-open-state.cjs +1 -0
  235. package/dist/primitives/hooks/use-inkeep-open-state.d.ts +18 -0
  236. package/dist/primitives/hooks/use-inkeep-open-state.js +47 -0
  237. package/dist/primitives/hooks/use-instant-update.cjs +1 -0
  238. package/dist/primitives/hooks/use-instant-update.d.ts +16 -0
  239. package/dist/primitives/hooks/use-instant-update.js +16 -0
  240. package/dist/primitives/hooks/use-is-mounted.cjs +1 -0
  241. package/dist/primitives/hooks/use-is-mounted.d.ts +1 -0
  242. package/dist/primitives/hooks/use-is-mounted.js +11 -0
  243. package/dist/primitives/hooks/use-local-storage.cjs +1 -0
  244. package/dist/primitives/hooks/use-local-storage.d.ts +8 -0
  245. package/dist/primitives/hooks/use-local-storage.js +26 -0
  246. package/dist/primitives/hooks/use-media-query.cjs +1 -0
  247. package/dist/primitives/hooks/use-media-query.d.ts +1 -0
  248. package/dist/primitives/hooks/use-media-query.js +14 -0
  249. package/dist/primitives/hooks/use-resize-observer.cjs +1 -0
  250. package/dist/primitives/hooks/use-resize-observer.d.ts +12 -0
  251. package/dist/primitives/hooks/use-resize-observer.js +32 -0
  252. package/dist/primitives/hooks/use-scrolling-fades.cjs +1 -0
  253. package/dist/primitives/hooks/use-scrolling-fades.d.ts +2 -0
  254. package/dist/primitives/hooks/use-scrolling-fades.js +18 -0
  255. package/dist/primitives/hooks/use-settle-action.cjs +1 -0
  256. package/dist/primitives/hooks/use-settle-action.d.ts +3 -0
  257. package/dist/primitives/hooks/use-settle-action.js +11 -0
  258. package/dist/primitives/hooks/use-simple-scroll.cjs +1 -0
  259. package/dist/primitives/hooks/use-simple-scroll.d.ts +16 -0
  260. package/dist/primitives/hooks/use-simple-scroll.js +51 -0
  261. package/dist/primitives/hooks/use-streaming-events.cjs +1 -0
  262. package/dist/primitives/hooks/use-streaming-events.d.ts +8 -0
  263. package/dist/primitives/hooks/use-streaming-events.js +33 -0
  264. package/dist/primitives/index.cjs +1 -0
  265. package/dist/primitives/index.d.ts +13 -0
  266. package/dist/primitives/index.js +174 -0
  267. package/dist/primitives/providers/attachment-item-provider.cjs +1 -0
  268. package/dist/primitives/providers/attachment-item-provider.d.ts +9 -0
  269. package/dist/primitives/providers/attachment-item-provider.js +13 -0
  270. package/dist/primitives/providers/attachments-bar-provider.cjs +1 -0
  271. package/dist/primitives/providers/attachments-bar-provider.d.ts +30 -0
  272. package/dist/primitives/providers/attachments-bar-provider.js +57 -0
  273. package/dist/primitives/providers/base-events-provider.cjs +1 -0
  274. package/dist/primitives/providers/base-events-provider.d.ts +8 -0
  275. package/dist/primitives/providers/base-events-provider.js +37 -0
  276. package/dist/primitives/providers/chat-bubble-provider.cjs +1 -0
  277. package/dist/primitives/providers/chat-bubble-provider.d.ts +22 -0
  278. package/dist/primitives/providers/chat-bubble-provider.js +19 -0
  279. package/dist/primitives/providers/chat-form-provider.cjs +1 -0
  280. package/dist/primitives/providers/chat-form-provider.d.ts +26 -0
  281. package/dist/primitives/providers/chat-form-provider.js +109 -0
  282. package/dist/primitives/providers/chat-history-provider.cjs +1 -0
  283. package/dist/primitives/providers/chat-history-provider.d.ts +32 -0
  284. package/dist/primitives/providers/chat-history-provider.js +105 -0
  285. package/dist/primitives/providers/config-provider.cjs +1 -0
  286. package/dist/primitives/providers/config-provider.d.ts +24 -0
  287. package/dist/primitives/providers/config-provider.js +40 -0
  288. package/dist/primitives/providers/feedback-item-provider.cjs +1 -0
  289. package/dist/primitives/providers/feedback-item-provider.d.ts +10 -0
  290. package/dist/primitives/providers/feedback-item-provider.js +16 -0
  291. package/dist/primitives/providers/feedback-provider.cjs +1 -0
  292. package/dist/primitives/providers/feedback-provider.d.ts +16 -0
  293. package/dist/primitives/providers/feedback-provider.js +83 -0
  294. package/dist/primitives/providers/form-field-provider.cjs +1 -0
  295. package/dist/primitives/providers/form-field-provider.d.ts +15 -0
  296. package/dist/primitives/providers/form-field-provider.js +17 -0
  297. package/dist/primitives/providers/help-menu-provider.cjs +1 -0
  298. package/dist/primitives/providers/help-menu-provider.d.ts +11 -0
  299. package/dist/primitives/providers/help-menu-provider.js +19 -0
  300. package/dist/primitives/providers/hover-popover-provider.cjs +1 -0
  301. package/dist/primitives/providers/hover-popover-provider.d.ts +10 -0
  302. package/dist/primitives/providers/hover-popover-provider.js +13 -0
  303. package/dist/primitives/providers/index.cjs +1 -0
  304. package/dist/primitives/providers/index.d.ts +19 -0
  305. package/dist/primitives/providers/index.js +65 -0
  306. package/dist/primitives/providers/markdown-provider.cjs +1 -0
  307. package/dist/primitives/providers/markdown-provider.d.ts +9 -0
  308. package/dist/primitives/providers/markdown-provider.js +8 -0
  309. package/dist/primitives/providers/message-attachments-provider.cjs +1 -0
  310. package/dist/primitives/providers/message-attachments-provider.d.ts +13 -0
  311. package/dist/primitives/providers/message-attachments-provider.js +27 -0
  312. package/dist/primitives/providers/message-provider.cjs +1 -0
  313. package/dist/primitives/providers/message-provider.d.ts +10 -0
  314. package/dist/primitives/providers/message-provider.js +14 -0
  315. package/dist/primitives/providers/root-provider.cjs +1 -0
  316. package/dist/primitives/providers/root-provider.d.ts +8 -0
  317. package/dist/primitives/providers/root-provider.js +21 -0
  318. package/dist/primitives/providers/search-events-provider.cjs +1 -0
  319. package/dist/primitives/providers/search-events-provider.d.ts +8 -0
  320. package/dist/primitives/providers/search-events-provider.js +17 -0
  321. package/dist/primitives/providers/sidebar-chat-provider.cjs +1 -0
  322. package/dist/primitives/providers/sidebar-chat-provider.d.ts +61 -0
  323. package/dist/primitives/providers/sidebar-chat-provider.js +37 -0
  324. package/dist/primitives/providers/source-item-provider.cjs +1 -0
  325. package/dist/primitives/providers/source-item-provider.d.ts +12 -0
  326. package/dist/primitives/providers/source-item-provider.js +13 -0
  327. package/dist/primitives/providers/theme-provider.cjs +3 -0
  328. package/dist/primitives/providers/theme-provider.d.ts +3 -0
  329. package/dist/primitives/providers/theme-provider.js +79 -0
  330. package/dist/primitives/providers/widget-provider.cjs +1 -0
  331. package/dist/primitives/providers/widget-provider.d.ts +10 -0
  332. package/dist/primitives/providers/widget-provider.js +8 -0
  333. package/dist/primitives/utils/component-ids.cjs +1 -0
  334. package/dist/primitives/utils/component-ids.d.ts +662 -0
  335. package/dist/primitives/utils/component-ids.js +361 -0
  336. package/dist/primitives/utils/compose-event-handlers.cjs +1 -0
  337. package/dist/primitives/utils/compose-event-handlers.d.ts +3 -0
  338. package/dist/primitives/utils/compose-event-handlers.js +10 -0
  339. package/dist/primitives/utils/compose-refs.cjs +1 -0
  340. package/dist/primitives/utils/compose-refs.d.ts +5 -0
  341. package/dist/primitives/utils/compose-refs.js +30 -0
  342. package/dist/primitives/utils/default-settings.cjs +1 -0
  343. package/dist/primitives/utils/default-settings.d.ts +169 -0
  344. package/dist/primitives/utils/default-settings.js +52 -0
  345. package/dist/primitives/utils/form.cjs +1 -0
  346. package/dist/primitives/utils/form.d.ts +3 -0
  347. package/dist/primitives/utils/form.js +19 -0
  348. package/dist/primitives/utils/generate-uid.cjs +1 -0
  349. package/dist/primitives/utils/generate-uid.d.ts +2 -0
  350. package/dist/primitives/utils/generate-uid.js +14 -0
  351. package/dist/primitives/utils/get-message-metadata.d.ts +8 -0
  352. package/dist/primitives/utils/get-source-icon.cjs +1 -0
  353. package/dist/primitives/utils/get-source-icon.d.ts +2 -0
  354. package/dist/primitives/utils/get-source-icon.js +11 -0
  355. package/dist/primitives/utils/highlight-emphasis.cjs +1 -0
  356. package/dist/primitives/utils/highlight-emphasis.d.ts +4 -0
  357. package/dist/primitives/utils/highlight-emphasis.js +15 -0
  358. package/dist/primitives/utils/merge-props.cjs +1 -0
  359. package/dist/primitives/utils/merge-props.d.ts +7 -0
  360. package/dist/primitives/utils/merge-props.js +41 -0
  361. package/dist/primitives/utils/misc.cjs +1 -0
  362. package/dist/primitives/utils/misc.d.ts +12 -0
  363. package/dist/primitives/utils/misc.js +31 -0
  364. package/dist/primitives/utils/split-props.cjs +1 -0
  365. package/dist/primitives/utils/split-props.d.ts +14 -0
  366. package/dist/primitives/utils/split-props.js +10 -0
  367. package/dist/react/chat-button-modal.cjs +1 -0
  368. package/dist/react/chat-button-modal.d.ts +22 -0
  369. package/dist/react/chat-button-modal.js +41 -0
  370. package/dist/react/chat-button.cjs +1 -0
  371. package/dist/react/chat-button.d.ts +28 -0
  372. package/dist/react/chat-button.js +73 -0
  373. package/dist/react/embedded-chat.cjs +1 -0
  374. package/dist/react/embedded-chat.d.ts +15 -0
  375. package/dist/react/embedded-chat.js +431 -0
  376. package/dist/react/embedded-search-and-chat.cjs +1 -0
  377. package/dist/react/embedded-search-and-chat.d.ts +40 -0
  378. package/dist/react/embedded-search-and-chat.impl.cjs +1 -0
  379. package/dist/react/embedded-search-and-chat.impl.d.ts +9 -0
  380. package/dist/react/embedded-search-and-chat.impl.js +43 -0
  381. package/dist/react/embedded-search-and-chat.js +66 -0
  382. package/dist/react/embedded-search.cjs +1 -0
  383. package/dist/react/embedded-search.d.ts +17 -0
  384. package/dist/react/embedded-search.js +181 -0
  385. package/dist/react/index.cjs +1 -0
  386. package/dist/react/index.d.ts +13 -0
  387. package/dist/react/index.js +238 -0
  388. package/dist/react/modal.chat.cjs +1 -0
  389. package/dist/react/modal.chat.d.ts +9 -0
  390. package/dist/react/modal.chat.js +21 -0
  391. package/dist/react/modal.cjs +1 -0
  392. package/dist/react/modal.d.ts +23 -0
  393. package/dist/react/modal.js +27 -0
  394. package/dist/react/modal.search-and-chat.cjs +1 -0
  395. package/dist/react/modal.search-and-chat.d.ts +6 -0
  396. package/dist/react/modal.search-and-chat.js +27 -0
  397. package/dist/react/modal.search.cjs +1 -0
  398. package/dist/react/modal.search.d.ts +6 -0
  399. package/dist/react/modal.search.js +21 -0
  400. package/dist/react/searchbar.cjs +1 -0
  401. package/dist/react/searchbar.d.ts +13 -0
  402. package/dist/react/searchbar.js +68 -0
  403. package/dist/react/sidebar-chat.cjs +1 -0
  404. package/dist/react/sidebar-chat.d.ts +4 -0
  405. package/dist/react/sidebar-chat.js +53 -0
  406. package/dist/react/utils.cjs +1 -0
  407. package/dist/react/utils.d.ts +6 -0
  408. package/dist/react/utils.js +20 -0
  409. package/dist/react/widget-toggle.cjs +1 -0
  410. package/dist/react/widget-toggle.d.ts +14 -0
  411. package/dist/react/widget-toggle.js +65 -0
  412. package/dist/styled/components/chat-bubble.cjs +1 -0
  413. package/dist/styled/components/chat-bubble.d.ts +5 -0
  414. package/dist/styled/components/chat-bubble.js +70 -0
  415. package/dist/styled/components/chat-button.cjs +1 -0
  416. package/dist/styled/components/chat-button.d.ts +9 -0
  417. package/dist/styled/components/chat-button.js +60 -0
  418. package/dist/styled/components/chat-history.cjs +1 -0
  419. package/dist/styled/components/chat-history.d.ts +15 -0
  420. package/dist/styled/components/chat-history.js +197 -0
  421. package/dist/styled/components/data-summary-group.cjs +1 -0
  422. package/dist/styled/components/data-summary-group.d.ts +11 -0
  423. package/dist/styled/components/data-summary-group.js +96 -0
  424. package/dist/styled/components/embedded-chat/session-loading.cjs +1 -0
  425. package/dist/styled/components/embedded-chat/session-loading.d.ts +1 -0
  426. package/dist/styled/components/embedded-chat/session-loading.js +23 -0
  427. package/dist/styled/components/embedded-chat.cjs +1 -0
  428. package/dist/styled/components/embedded-chat.d.ts +211 -0
  429. package/dist/styled/components/embedded-chat.js +1997 -0
  430. package/dist/styled/components/embedded-search/results-loading.cjs +1 -0
  431. package/dist/styled/components/embedded-search/results-loading.d.ts +1 -0
  432. package/dist/styled/components/embedded-search/results-loading.js +39 -0
  433. package/dist/styled/components/embedded-search.cjs +1 -0
  434. package/dist/styled/components/embedded-search.d.ts +73 -0
  435. package/dist/styled/components/embedded-search.js +680 -0
  436. package/dist/styled/components/index.cjs +1 -0
  437. package/dist/styled/components/index.d.ts +13 -0
  438. package/dist/styled/components/index.js +28 -0
  439. package/dist/styled/components/loading-indicator.cjs +1 -0
  440. package/dist/styled/components/loading-indicator.d.ts +1 -0
  441. package/dist/styled/components/loading-indicator.js +36 -0
  442. package/dist/styled/components/message.cjs +1 -0
  443. package/dist/styled/components/message.d.ts +4 -0
  444. package/dist/styled/components/message.js +333 -0
  445. package/dist/styled/components/modal.cjs +1 -0
  446. package/dist/styled/components/modal.d.ts +6 -0
  447. package/dist/styled/components/modal.js +46 -0
  448. package/dist/styled/components/searchbar.cjs +1 -0
  449. package/dist/styled/components/searchbar.d.ts +11 -0
  450. package/dist/styled/components/searchbar.js +81 -0
  451. package/dist/styled/components/shadow.cjs +1 -0
  452. package/dist/styled/components/shadow.d.ts +3 -0
  453. package/dist/styled/components/shadow.js +8 -0
  454. package/dist/styled/components/sidebar-chat.cjs +1 -0
  455. package/dist/styled/components/sidebar-chat.d.ts +6 -0
  456. package/dist/styled/components/sidebar-chat.js +90 -0
  457. package/dist/styled/components/ui/markdown-styles.cjs +1 -0
  458. package/dist/styled/components/ui/markdown-styles.d.ts +23 -0
  459. package/dist/styled/components/ui/markdown-styles.js +39 -0
  460. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.cjs +1 -0
  461. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.d.ts +7 -0
  462. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.js +33 -0
  463. package/dist/styled/components/ui/recipes/attachment.cjs +1 -0
  464. package/dist/styled/components/ui/recipes/attachment.d.ts +4 -0
  465. package/dist/styled/components/ui/recipes/attachment.js +28 -0
  466. package/dist/styled/components/ui/recipes/button.cjs +1 -0
  467. package/dist/styled/components/ui/recipes/button.d.ts +6 -0
  468. package/dist/styled/components/ui/recipes/button.js +87 -0
  469. package/dist/styled/components/ui/recipes/checkbox.cjs +1 -0
  470. package/dist/styled/components/ui/recipes/checkbox.d.ts +4 -0
  471. package/dist/styled/components/ui/recipes/checkbox.js +23 -0
  472. package/dist/styled/components/ui/recipes/citation.cjs +1 -0
  473. package/dist/styled/components/ui/recipes/citation.d.ts +4 -0
  474. package/dist/styled/components/ui/recipes/citation.js +75 -0
  475. package/dist/styled/components/ui/recipes/combobox.cjs +1 -0
  476. package/dist/styled/components/ui/recipes/combobox.d.ts +4 -0
  477. package/dist/styled/components/ui/recipes/combobox.js +57 -0
  478. package/dist/styled/components/ui/recipes/icon.cjs +1 -0
  479. package/dist/styled/components/ui/recipes/icon.d.ts +2 -0
  480. package/dist/styled/components/ui/recipes/icon.js +6 -0
  481. package/dist/styled/components/ui/recipes/index.cjs +1 -0
  482. package/dist/styled/components/ui/recipes/index.d.ts +16 -0
  483. package/dist/styled/components/ui/recipes/index.js +39 -0
  484. package/dist/styled/components/ui/recipes/input.cjs +1 -0
  485. package/dist/styled/components/ui/recipes/input.d.ts +5 -0
  486. package/dist/styled/components/ui/recipes/input.js +34 -0
  487. package/dist/styled/components/ui/recipes/link.cjs +1 -0
  488. package/dist/styled/components/ui/recipes/link.d.ts +2 -0
  489. package/dist/styled/components/ui/recipes/link.js +13 -0
  490. package/dist/styled/components/ui/recipes/markdown.cjs +1 -0
  491. package/dist/styled/components/ui/recipes/markdown.d.ts +16 -0
  492. package/dist/styled/components/ui/recipes/markdown.js +103 -0
  493. package/dist/styled/components/ui/recipes/modal.cjs +1 -0
  494. package/dist/styled/components/ui/recipes/modal.d.ts +4 -0
  495. package/dist/styled/components/ui/recipes/modal.js +59 -0
  496. package/dist/styled/components/ui/recipes/popover.cjs +1 -0
  497. package/dist/styled/components/ui/recipes/popover.d.ts +4 -0
  498. package/dist/styled/components/ui/recipes/popover.js +20 -0
  499. package/dist/styled/components/ui/recipes/scrollable.cjs +1 -0
  500. package/dist/styled/components/ui/recipes/scrollable.d.ts +4 -0
  501. package/dist/styled/components/ui/recipes/scrollable.js +15 -0
  502. package/dist/styled/components/ui/recipes/select.cjs +1 -0
  503. package/dist/styled/components/ui/recipes/select.d.ts +4 -0
  504. package/dist/styled/components/ui/recipes/select.js +38 -0
  505. package/dist/styled/components/ui/recipes/skeleton.cjs +1 -0
  506. package/dist/styled/components/ui/recipes/skeleton.d.ts +2 -0
  507. package/dist/styled/components/ui/recipes/skeleton.js +16 -0
  508. package/dist/styled/components/ui/recipes/widget-toggle.cjs +1 -0
  509. package/dist/styled/components/ui/recipes/widget-toggle.d.ts +4 -0
  510. package/dist/styled/components/ui/recipes/widget-toggle.js +35 -0
  511. package/dist/styled/index.cjs +1 -0
  512. package/dist/styled/index.d.ts +2 -0
  513. package/dist/styled/index.js +200 -0
  514. package/dist/styled/inkeep.css.cjs +4567 -0
  515. package/dist/styled/inkeep.css.js +4571 -0
  516. package/dist/styled/utils.cjs +1 -0
  517. package/dist/styled/utils.d.ts +4 -0
  518. package/dist/styled/utils.js +11 -0
  519. package/dist/theme/color-utils.cjs +1 -0
  520. package/dist/theme/color-utils.d.ts +1 -0
  521. package/dist/theme/color-utils.js +21 -0
  522. package/dist/theme/colors.cjs +1 -0
  523. package/dist/theme/colors.d.ts +104 -0
  524. package/dist/theme/colors.js +143 -0
  525. package/dist/theme/index.cjs +1 -0
  526. package/dist/theme/index.d.ts +125 -0
  527. package/dist/theme/index.js +58 -0
  528. package/dist/theme/utils/create-css-variables.cjs +1 -0
  529. package/dist/theme/utils/create-css-variables.d.ts +2 -0
  530. package/dist/theme/utils/create-css-variables.js +24 -0
  531. package/dist/theme/utils/generate-theme-variables.cjs +1 -0
  532. package/dist/theme/utils/generate-theme-variables.d.ts +3 -0
  533. package/dist/theme/utils/generate-theme-variables.js +34 -0
  534. package/dist/types/color-mode.d.ts +44 -0
  535. package/dist/types/config/ai.d.ts +269 -0
  536. package/dist/types/config/base.d.ts +358 -0
  537. package/dist/types/config/components.d.ts +16 -0
  538. package/dist/types/config/filters.d.ts +17 -0
  539. package/dist/types/config/index.d.ts +36 -0
  540. package/dist/types/config/open-settings.d.ts +70 -0
  541. package/dist/types/config/search.d.ts +95 -0
  542. package/dist/types/config/settings/actions.d.ts +112 -0
  543. package/dist/types/config/settings/form.d.ts +83 -0
  544. package/dist/types/config/settings/jsonschema.d.ts +105 -0
  545. package/dist/types/config/settings/workflow.d.ts +86 -0
  546. package/dist/types/events.d.ts +188 -0
  547. package/dist/types/icons/built-in.d.ts +1 -0
  548. package/dist/types/icons/custom.d.ts +33 -0
  549. package/dist/types/icons/index.d.ts +2 -0
  550. package/dist/types/index.d.ts +20 -0
  551. package/dist/types/js/index.d.ts +55 -0
  552. package/dist/types/message.d.ts +43 -0
  553. package/dist/types/shadow.d.ts +15 -0
  554. package/dist/types/sources.d.ts +100 -0
  555. package/dist/types/theme.d.ts +25 -0
  556. package/dist/types/widget.d.ts +27 -0
  557. package/package.json +140 -0
@@ -0,0 +1,28 @@
1
+ import * as r from "./embedded-chat.js";
2
+ import * as a from "./chat-history.js";
3
+ import * as o from "./sidebar-chat.js";
4
+ import * as t from "./chat-bubble.js";
5
+ import * as e from "./embedded-search.js";
6
+ import * as m from "./modal.js";
7
+ import * as d from "./chat-button.js";
8
+ import * as p from "./searchbar.js";
9
+ import { Shadow as i } from "./shadow.js";
10
+ import { LoadingIndicator as x } from "./loading-indicator.js";
11
+ import { widgetToggle as c } from "./ui/recipes/widget-toggle.js";
12
+ import { EmbeddedChatMessagePart as u } from "./message.js";
13
+ import { DataSummaryGroup as g } from "./data-summary-group.js";
14
+ export {
15
+ t as ChatBubble,
16
+ d as ChatButton,
17
+ a as ChatHistory,
18
+ g as DataSummaryGroup,
19
+ r as EmbeddedChat,
20
+ u as EmbeddedChatMessagePart,
21
+ e as EmbeddedSearch,
22
+ x as LoadingIndicator,
23
+ m as Modal,
24
+ p as SearchBar,
25
+ i as Shadow,
26
+ o as SidebarChat,
27
+ c as widgetToggle
28
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),n=["Thinking","Looking for content","Analyzing"];function o(){const[i,s]=r.useState(0);return r.useEffect(()=>{const e=setInterval(()=>{s(a=>a+1<n.length?a+1:(clearInterval(e),a))},3500);return()=>clearInterval(e)},[]),t.jsxs("div",{className:"flex items-center space-x-2 font-medium text-sm text-gray-700 dark:text-gray-dark-300","aria-live":"polite",children:[t.jsx("span",{className:"animate-shimmer bg-[linear-gradient(to_bottom_right,_var(--ikp-color-gray-700),_var(--ikp-color-gray-400))] dark:bg-[linear-gradient(to_bottom_right,_var(--ikp-color-gray-dark-300),_var(--ikp-color-gray-dark-100))] bg-clip-text text-transparent",children:n[i]}),t.jsx("div",{className:"flex space-x-1",children:[0,1,2].map(e=>t.jsx("span",{className:"animate-bounce-dot opacity-30",style:{animationDelay:`${e*.2}s`},children:"."},e))})]})}exports.LoadingIndicator=o;
@@ -0,0 +1 @@
1
+ export declare function LoadingIndicator(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
3
+ import { useState as o, useEffect as l } from "react";
4
+ const r = ["Thinking", "Looking for content", "Analyzing"];
5
+ function g() {
6
+ const [n, i] = o(0);
7
+ return l(() => {
8
+ const e = setInterval(() => {
9
+ i((a) => a + 1 < r.length ? a + 1 : (clearInterval(e), a));
10
+ }, 3500);
11
+ return () => clearInterval(e);
12
+ }, []), /* @__PURE__ */ s(
13
+ "div",
14
+ {
15
+ className: "flex items-center space-x-2 font-medium text-sm text-gray-700 dark:text-gray-dark-300",
16
+ "aria-live": "polite",
17
+ children: [
18
+ /* @__PURE__ */ t("span", { className: "animate-shimmer bg-[linear-gradient(to_bottom_right,_var(--ikp-color-gray-700),_var(--ikp-color-gray-400))] dark:bg-[linear-gradient(to_bottom_right,_var(--ikp-color-gray-dark-300),_var(--ikp-color-gray-dark-100))] bg-clip-text text-transparent", children: r[n] }),
19
+ /* @__PURE__ */ t("div", { className: "flex space-x-1", children: [0, 1, 2].map((e) => /* @__PURE__ */ t(
20
+ "span",
21
+ {
22
+ className: "animate-bounce-dot opacity-30",
23
+ style: {
24
+ animationDelay: `${e * 0.2}s`
25
+ },
26
+ children: "."
27
+ },
28
+ e
29
+ )) })
30
+ ]
31
+ }
32
+ );
33
+ }
34
+ export {
35
+ g as LoadingIndicator
36
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),Q=require("../../primitives/providers/base-events-provider.cjs"),Y=require("../../primitives/providers/config-provider.cjs"),Z=require("../../primitives/providers/message-provider.cjs"),k=require("../../primitives/components/embedded-chat.cjs"),ee=require("../../primitives/components/embedded-chat/chat-provider.cjs"),te=require("merge-anything"),T=require("../utils.cjs"),ae=require("./ui/markdown-styles.cjs"),se=require("../../primitives/components/embedded-chat/use-stream-processor.cjs"),re=require("./data-summary-group.cjs"),r=require("react"),D=require("./embedded-chat.cjs"),l=require("lucide-react"),z=require("./ui/recipes/button.cjs"),ne={"input-streaming":"Pending","input-available":"Running","approval-requested":"Awaiting Approval","approval-responded":"Responded","output-available":"Completed","output-error":"Error","output-denied":"Denied"};function oe(a){if(!a||typeof a!="object")return!1;const s=a;return typeof s.type=="string"&&s.type.startsWith("tool-")}const ie=a=>{if(!a||typeof a!="object"||!("status"in a))return;const s=a.status;return typeof s=="string"?s:void 0},le=()=>e.jsx("div",{className:"flex space-x-1",children:[0,1,2].map(a=>e.jsx("span",{className:"animate-bounce-dot opacity-30",style:{animationDelay:`${a*.2}s`},children:"."},a))}),J=({name:a,Icon:s,props:n,componentType:c})=>e.jsxs("div",{className:"border rounded-lg bg-gray-50 dark:bg-gray-dark-800 mb-3",children:[e.jsxs("div",{className:"flex justify-between px-4 py-2 text-xs",children:[e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(s,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:a})]}),e.jsx("div",{className:"flex items-center px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-200 dark:bg-white-alpha-200 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:c})]}),e.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono px-4 py-2",children:JSON.stringify(n,null,2)})]}),ce=({name:a,props:s})=>e.jsx(J,{name:a,Icon:l.ComponentIcon,props:s,componentType:"component"}),de=({name:a,props:s})=>e.jsx(J,{name:a,Icon:l.Library,props:s,componentType:"artifact"}),pe=({tool:a,componentDef:s,renderText:n,approvalId:c,messagePartsLength:h,setApprovalDelayPending:i,addToolApprovalResponse:o,sendMessage:p,conversationId:u})=>{const f=r.useRef(p);f.current=p;const g=r.useRef(o);g.current=o;const m=r.useRef(i);m.current=i;const b=r.useCallback(async(M=!0)=>{c&&(m.current({partCount:h}),g.current({id:c,approved:M}),await f.current(void 0,{body:{conversationId:u}}))},[c,h,u]),y=r.useMemo(()=>({tool:a,approve:b,renderMarkdown:n}),[a]),N=s?D.DynamicComponent:ue;return e.jsx(N,{name:a.type,props:y,componentDef:s})},ue=({props:a,isDebug:s=!1})=>{const{tool:n,approve:c}=a,h=n.type,i=h.startsWith("tool-")?h.slice(5):h,o=n.state,p=n.approval?.id,u=!!p,f=o==="approval-requested",g=ie(n.output),[m,b]=r.useState(u||s),y=o?ne[o]??o:"tool";r.useEffect(()=>{f&&b(!0)},[f]);const N=()=>{switch(o){case"input-streaming":return e.jsx(l.Circle,{className:"w-3 h-3"});case"input-available":return e.jsx(l.Loader2,{className:"w-3 h-3 animate-spin"});case"approval-requested":return e.jsx(l.Clock,{className:"w-3 h-3"});case"approval-responded":return e.jsx(l.CheckCircle,{className:"w-3 h-3"});case"output-available":return e.jsx(l.CheckCircle,{className:"w-3 h-3"});case"output-error":return e.jsx(l.XCircle,{className:"w-3 h-3"});case"output-denied":return e.jsx(l.XCircle,{className:"w-3 h-3"});default:return null}};return e.jsxs("div",{className:"border rounded-lg mb-3 overflow-hidden",children:[(!u||s)&&e.jsxs("button",{type:"button",className:"inline-flex items-center group gap-2 text-xs text-gray-700 dark:text-white-alpha-700 hover:text-gray-800 dark:hover:text-white-alpha-800 transition-colors cursor-pointer w-full justify-between px-4 py-2",onClick:()=>b(!m),"data-expanded":m,children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(l.Hammer,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:i})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-100 dark:bg-white-alpha-100 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:[N(),y]}),e.jsx(l.ChevronDown,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform rotate-0 group-data-[expanded=true]:rotate-180"})]})]}),e.jsx("div",{"data-expanded":m,className:T.cn("relative",'before:content-[""] before:absolute before:inset-x-0 before:-top-px before:h-3 before:pointer-events-none before:z-10','after:content-[""] after:absolute after:inset-x-0 after:bottom-0 after:h-3 after:pointer-events-none after:z-10',"before:bg-[linear-gradient(white,_transparent)] after:bg-[linear-gradient(transparent,_white)]","dark:before:bg-[linear-gradient(var(--ikp-color-gray-dark-950),_transparent)] dark:after:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))]","data-[expanded=false]:before:opacity-0 data-[expanded=false]:after:opacity-0"),children:e.jsxs("div",{"data-expanded":m,className:T.cn("px-4 data-[expanded=true]:pb-3 [scrollbar-width:thin] overflow-hidden transition-all duration-300 ease-in-out data-[expanded=true]:opacity-100 data-[expanded=false]:max-h-0 data-[expanded=false]:opacity-0 max-w-full",u?"":"data-[expanded=true]:max-h-48 data-[expanded=true]:overflow-y-auto"),children:[n.input!=null&&e.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono py-2",children:JSON.stringify(n.input,null,2)}),!s&&u&&e.jsxs("div",{className:"whitespace-pre-wrap text-sm text-gray-700 dark:text-white-alpha-700 py-2",children:["Approval is needed to run ",e.jsx("strong",{children:i}),"."]}),f&&p&&e.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[e.jsx("button",{type:"button",className:T.cn(z.button({size:"xs",variant:"outline"}),"px-2 py-1 rounded-md text-xs text-gray-700 dark:text-white-alpha-700"),onClick:()=>c(!1),children:"Deny"}),e.jsxs("button",{type:"button",className:T.cn(z.button({size:"xs",variant:"primaryFilled"}),"px-2 py-1 rounded-md text-xs gap-1"),onClick:()=>c(!0),children:[e.jsx(l.Check,{className:"w-3 h-3"}),"Approve"]})]}),o==="output-available"&&n.output!=null&&!s&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize",children:[g==="approved"&&e.jsx(l.Check,{className:"w-3 h-3"}),g]}),o==="output-denied"&&!s&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize",children:[e.jsx(l.X,{className:"w-3 h-3"}),y]}),o==="output-available"&&n.output!=null&&s&&e.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono py-2",children:typeof n.output=="string"?n.output:JSON.stringify(n.output,null,2)})]})})]})},me=({className:a,componentStyles:s,children:n,isLast:c,...h})=>{const{message:i}=Z.useMessage(),{logEvent:o}=Q.useBaseEvents(),{conversationId:p,isStreaming:u,isLoading:f,setError:g,addToolApprovalResponse:m,sendMessage:b}=ee.useChat(),{aiChatSettings:{components:y,artifacts:N,headers:M}}=Y.useInkeepConfig(),X=M?.["x-emit-operations"]==="true",B=i.role==="user",F=(u||f)&&c&&i.role==="assistant",{processedParts:G,summaryTimings:K,shouldShowInitialLoading:U,shouldShowStreamDelayLoading:W}=se.useStreamProcessor(i.parts,F,g),[S,R]=r.useState(null),[H,q]=r.useState(!1),x=r.useRef(null);r.useEffect(()=>{if(!S){q(!1),x.current&&(clearTimeout(x.current),x.current=null);return}return q(!1),x.current&&clearTimeout(x.current),x.current=window.setTimeout(()=>{q(!0)},1e3),()=>{x.current&&(clearTimeout(x.current),x.current=null)}},[S]),r.useEffect(()=>{S&&(!c||i.parts.length>S.partCount)&&R(null)},[S,c,i.parts.length]);const _=r.useMemo(()=>i.parts.filter(t=>t.type==="data-artifact"&&t.data?.type?.toLowerCase()==="citation"),[i.parts]),I=r.useMemo(()=>te.merge(ae.markdownStyles,s??{}),[s]),$=r.useCallback((t,d)=>{o({eventName:"assistant_message_inline_link_opened",properties:{title:d?.toString(),url:t}})},[o]),O=r.useCallback((t,d)=>{o({eventName:"assistant_code_block_copied",properties:{conversationId:p,language:t,code:d}})},[o,p]),E=r.useCallback(t=>e.jsx(k.EmbeddedChatPrimitiveMarkdown,{text:t,componentStyles:I,onLinkClick:$,onCodeCopy:O,artifacts:_}),[I,$,O,_]),V=r.useMemo(()=>T.cn("data-[role=user]:whitespace-pre-wrap mb-3 data-[role=user]:mb-0 [&[data-role=user]>p]:mb-0 max-w-full",a),[a]);return e.jsxs(e.Fragment,{children:[G.map((t,d)=>{const j={"data-role":i.role,"data-type":t?.type==="data-component"?t.data.type:t?.type,...h,className:V};switch(t?.type){case"text":return e.jsx(k.PrimitiveMessagePart,{...j,children:B?t.text:E(t.text||"")},d);case"data-component":{const{type:v}=t.data;switch(v){case"text":return e.jsx("div",{...j,children:E(t.data.text||"")},d);default:{const C=t.data,{name:w,props:A}=C,P=y?.[w],L=P?D.DynamicComponent:ce;return e.jsx(k.PrimitiveMessagePart,{...j,children:e.jsx(L,{name:w,props:A,componentDef:P})},`${w}-${d}`)}}}case"data-artifact":{const v=t.data,{name:C,type:w,artifactSummary:A}=v,P=N?.[w],L=P?D.DynamicComponent:de;return e.jsx(k.PrimitiveMessagePart,{...j,children:e.jsx(L,{name:w,props:A,componentDef:P})},`${C}-${d}`)}case"summary-group":{const v=K.get(t.groupKey)||{isCompleted:!1};return e.jsx(k.PrimitiveMessagePart,{...j,children:e.jsx(re.DataSummaryGroup,{summaries:t.summaries||[],isCompleted:v.isCompleted})},`${t.groupKey}-${d}`)}default:{if(!oe(t))return null;const v=t,C=t.approval?.id;return X||C?e.jsx(k.PrimitiveMessagePart,{...j,children:e.jsx(pe,{tool:v,componentDef:y?.IkpTool,renderText:E,approvalId:C,messagePartsLength:i.parts.length,setApprovalDelayPending:R,addToolApprovalResponse:m,sendMessage:b,conversationId:p})},t.toolCallId??`${t.type}-${d}`):null}}}),U&&e.jsx(D.MessageLoading,{}),(W||H)&&e.jsx(le,{})]})};exports.EmbeddedChatMessagePart=me;
@@ -0,0 +1,4 @@
1
+ import { EmbeddedChatPrimitiveMessagePartProps } from '../../primitives/components/embedded-chat';
2
+ export declare const EmbeddedChatMessagePart: ({ className, componentStyles, children, isLast, ...rest }: EmbeddedChatPrimitiveMessagePartProps & {
3
+ isLast: boolean;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,333 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as i, Fragment as ne } from "react/jsx-runtime";
3
+ import { useBaseEvents as oe } from "../../primitives/providers/base-events-provider.js";
4
+ import { useInkeepConfig as se } from "../../primitives/providers/config-provider.js";
5
+ import { useMessage as ie } from "../../primitives/providers/message-provider.js";
6
+ import { EmbeddedChatPrimitiveMarkdown as le, PrimitiveMessagePart as S } from "../../primitives/components/embedded-chat.js";
7
+ import { useChat as pe } from "../../primitives/components/embedded-chat/chat-provider.js";
8
+ import { merge as ce } from "merge-anything";
9
+ import { cn as T } from "../utils.js";
10
+ import { markdownStyles as de } from "./ui/markdown-styles.js";
11
+ import { useStreamProcessor as ue } from "../../primitives/components/embedded-chat/use-stream-processor.js";
12
+ import { DataSummaryGroup as me } from "./data-summary-group.js";
13
+ import { useState as j, useRef as D, useEffect as $, useMemo as L, useCallback as P } from "react";
14
+ import { DynamicComponent as R, MessageLoading as he } from "./embedded-chat.js";
15
+ import { Library as fe, ComponentIcon as ge, Hammer as xe, ChevronDown as ye, Check as F, X as we, XCircle as K, CheckCircle as U, Clock as ve, Loader2 as be, Circle as Ce } from "lucide-react";
16
+ import { button as W } from "./ui/recipes/button.js";
17
+ const ke = {
18
+ "input-streaming": "Pending",
19
+ "input-available": "Running",
20
+ "approval-requested": "Awaiting Approval",
21
+ "approval-responded": "Responded",
22
+ "output-available": "Completed",
23
+ "output-error": "Error",
24
+ "output-denied": "Denied"
25
+ };
26
+ function Ne(a) {
27
+ if (!a || typeof a != "object") return !1;
28
+ const r = a;
29
+ return typeof r.type == "string" && r.type.startsWith("tool-");
30
+ }
31
+ const Se = (a) => {
32
+ if (!a || typeof a != "object" || !("status" in a)) return;
33
+ const r = a.status;
34
+ return typeof r == "string" ? r : void 0;
35
+ }, Te = () => /* @__PURE__ */ e("div", { className: "flex space-x-1", children: [0, 1, 2].map((a) => /* @__PURE__ */ e(
36
+ "span",
37
+ {
38
+ className: "animate-bounce-dot opacity-30",
39
+ style: {
40
+ animationDelay: `${a * 0.2}s`
41
+ },
42
+ children: "."
43
+ },
44
+ a
45
+ )) }), X = ({ name: a, Icon: r, props: n, componentType: l }) => /* @__PURE__ */ i("div", { className: "border rounded-lg bg-gray-50 dark:bg-gray-dark-800 mb-3", children: [
46
+ /* @__PURE__ */ i("div", { className: "flex justify-between px-4 py-2 text-xs", children: [
47
+ /* @__PURE__ */ i("div", { className: "font-medium flex items-center gap-2", children: [
48
+ /* @__PURE__ */ e(r, { className: "w-3 h-3 text-gray-600 dark:text-white-alpha-600" }),
49
+ /* @__PURE__ */ e("span", { children: a })
50
+ ] }),
51
+ /* @__PURE__ */ e("div", { className: "flex items-center px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-200 dark:bg-white-alpha-200 font-medium text-gray-700 dark:text-white-alpha-700 font-mono", children: l })
52
+ ] }),
53
+ /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono px-4 py-2", children: JSON.stringify(n, null, 2) })
54
+ ] }), De = ({ name: a, props: r }) => /* @__PURE__ */ e(X, { name: a, Icon: ge, props: r, componentType: "component" }), Le = ({ name: a, props: r }) => /* @__PURE__ */ e(X, { name: a, Icon: fe, props: r, componentType: "artifact" }), Pe = ({
55
+ tool: a,
56
+ componentDef: r,
57
+ renderText: n,
58
+ approvalId: l,
59
+ messagePartsLength: h,
60
+ setApprovalDelayPending: s,
61
+ addToolApprovalResponse: o,
62
+ sendMessage: c,
63
+ conversationId: d
64
+ }) => {
65
+ const f = D(c);
66
+ f.current = c;
67
+ const g = D(o);
68
+ g.current = o;
69
+ const u = D(s);
70
+ u.current = s;
71
+ const v = P(
72
+ async (A = !0) => {
73
+ l && (u.current({ partCount: h }), g.current({ id: l, approved: A }), await f.current(void 0, { body: { conversationId: d } }));
74
+ },
75
+ [l, h, d]
76
+ ), x = L(() => ({ tool: a, approve: v, renderMarkdown: n }), [a]);
77
+ return /* @__PURE__ */ e(r ? R : Ee, { name: a.type, props: x, componentDef: r });
78
+ }, Ee = ({ props: a, isDebug: r = !1 }) => {
79
+ const { tool: n, approve: l } = a, h = n.type, s = h.startsWith("tool-") ? h.slice(5) : h, o = n.state, c = n.approval?.id, d = !!c, f = o === "approval-requested", g = Se(n.output), [u, v] = j(d || r), x = o ? ke[o] ?? o : "tool";
80
+ return $(() => {
81
+ f && v(!0);
82
+ }, [f]), /* @__PURE__ */ i("div", { className: "border rounded-lg mb-3 overflow-hidden", children: [
83
+ (!d || r) && /* @__PURE__ */ i(
84
+ "button",
85
+ {
86
+ type: "button",
87
+ className: "inline-flex items-center group gap-2 text-xs text-gray-700 dark:text-white-alpha-700 hover:text-gray-800 dark:hover:text-white-alpha-800 transition-colors cursor-pointer w-full justify-between px-4 py-2",
88
+ onClick: () => v(!u),
89
+ "data-expanded": u,
90
+ children: [
91
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ i("div", { className: "font-medium flex items-center gap-2", children: [
92
+ /* @__PURE__ */ e(xe, { className: "w-3 h-3 text-gray-600 dark:text-white-alpha-600" }),
93
+ /* @__PURE__ */ e("span", { children: s })
94
+ ] }) }),
95
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
96
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-100 dark:bg-white-alpha-100 font-medium text-gray-700 dark:text-white-alpha-700 font-mono", children: [
97
+ (() => {
98
+ switch (o) {
99
+ case "input-streaming":
100
+ return /* @__PURE__ */ e(Ce, { className: "w-3 h-3" });
101
+ case "input-available":
102
+ return /* @__PURE__ */ e(be, { className: "w-3 h-3 animate-spin" });
103
+ case "approval-requested":
104
+ return /* @__PURE__ */ e(ve, { className: "w-3 h-3" });
105
+ case "approval-responded":
106
+ return /* @__PURE__ */ e(U, { className: "w-3 h-3" });
107
+ case "output-available":
108
+ return /* @__PURE__ */ e(U, { className: "w-3 h-3" });
109
+ case "output-error":
110
+ return /* @__PURE__ */ e(K, { className: "w-3 h-3" });
111
+ case "output-denied":
112
+ return /* @__PURE__ */ e(K, { className: "w-3 h-3" });
113
+ default:
114
+ return null;
115
+ }
116
+ })(),
117
+ x
118
+ ] }),
119
+ /* @__PURE__ */ e(ye, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform rotate-0 group-data-[expanded=true]:rotate-180" })
120
+ ] })
121
+ ]
122
+ }
123
+ ),
124
+ /* @__PURE__ */ e(
125
+ "div",
126
+ {
127
+ "data-expanded": u,
128
+ className: T(
129
+ "relative",
130
+ 'before:content-[""] before:absolute before:inset-x-0 before:-top-px before:h-3 before:pointer-events-none before:z-10',
131
+ 'after:content-[""] after:absolute after:inset-x-0 after:bottom-0 after:h-3 after:pointer-events-none after:z-10',
132
+ "before:bg-[linear-gradient(white,_transparent)] after:bg-[linear-gradient(transparent,_white)]",
133
+ "dark:before:bg-[linear-gradient(var(--ikp-color-gray-dark-950),_transparent)] dark:after:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))]",
134
+ "data-[expanded=false]:before:opacity-0 data-[expanded=false]:after:opacity-0"
135
+ ),
136
+ children: /* @__PURE__ */ i(
137
+ "div",
138
+ {
139
+ "data-expanded": u,
140
+ className: T(
141
+ "px-4 data-[expanded=true]:pb-3 [scrollbar-width:thin] overflow-hidden transition-all duration-300 ease-in-out data-[expanded=true]:opacity-100 data-[expanded=false]:max-h-0 data-[expanded=false]:opacity-0 max-w-full",
142
+ d ? "" : "data-[expanded=true]:max-h-48 data-[expanded=true]:overflow-y-auto"
143
+ ),
144
+ children: [
145
+ n.input != null && /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono py-2", children: JSON.stringify(n.input, null, 2) }),
146
+ !r && d && /* @__PURE__ */ i("div", { className: "whitespace-pre-wrap text-sm text-gray-700 dark:text-white-alpha-700 py-2", children: [
147
+ "Approval is needed to run ",
148
+ /* @__PURE__ */ e("strong", { children: s }),
149
+ "."
150
+ ] }),
151
+ f && c && /* @__PURE__ */ i("div", { className: "flex justify-end gap-2 pt-1", children: [
152
+ /* @__PURE__ */ e(
153
+ "button",
154
+ {
155
+ type: "button",
156
+ className: T(
157
+ W({ size: "xs", variant: "outline" }),
158
+ "px-2 py-1 rounded-md text-xs text-gray-700 dark:text-white-alpha-700"
159
+ ),
160
+ onClick: () => l(!1),
161
+ children: "Deny"
162
+ }
163
+ ),
164
+ /* @__PURE__ */ i(
165
+ "button",
166
+ {
167
+ type: "button",
168
+ className: T(
169
+ W({ size: "xs", variant: "primaryFilled" }),
170
+ "px-2 py-1 rounded-md text-xs gap-1"
171
+ ),
172
+ onClick: () => l(!0),
173
+ children: [
174
+ /* @__PURE__ */ e(F, { className: "w-3 h-3" }),
175
+ "Approve"
176
+ ]
177
+ }
178
+ )
179
+ ] }),
180
+ o === "output-available" && n.output != null && !r && /* @__PURE__ */ i("div", { className: "flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize", children: [
181
+ g === "approved" && /* @__PURE__ */ e(F, { className: "w-3 h-3" }),
182
+ g
183
+ ] }),
184
+ o === "output-denied" && !r && /* @__PURE__ */ i("div", { className: "flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize", children: [
185
+ /* @__PURE__ */ e(we, { className: "w-3 h-3" }),
186
+ x
187
+ ] }),
188
+ o === "output-available" && n.output != null && r && /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono py-2", children: typeof n.output == "string" ? n.output : JSON.stringify(n.output, null, 2) })
189
+ ]
190
+ }
191
+ )
192
+ }
193
+ )
194
+ ] });
195
+ }, We = ({
196
+ className: a,
197
+ componentStyles: r,
198
+ children: n,
199
+ isLast: l,
200
+ ...h
201
+ }) => {
202
+ const { message: s } = ie(), { logEvent: o } = oe(), { conversationId: c, isStreaming: d, isLoading: f, setError: g, addToolApprovalResponse: u, sendMessage: v } = pe(), {
203
+ aiChatSettings: { components: x, artifacts: E, headers: A }
204
+ } = se(), G = A?.["x-emit-operations"] === "true", H = s.role === "user", V = (d || f) && l && s.role === "assistant", { processedParts: Q, summaryTimings: Y, shouldShowInitialLoading: Z, shouldShowStreamDelayLoading: ee } = ue(s.parts, V, g), [k, O] = j(null), [te, _] = j(!1), m = D(null);
205
+ $(() => {
206
+ if (!k) {
207
+ _(!1), m.current && (clearTimeout(m.current), m.current = null);
208
+ return;
209
+ }
210
+ return _(!1), m.current && clearTimeout(m.current), m.current = window.setTimeout(() => {
211
+ _(!0);
212
+ }, 1e3), () => {
213
+ m.current && (clearTimeout(m.current), m.current = null);
214
+ };
215
+ }, [k]), $(() => {
216
+ k && (!l || s.parts.length > k.partCount) && O(null);
217
+ }, [k, l, s.parts.length]);
218
+ const z = L(
219
+ () => s.parts.filter(
220
+ (t) => t.type === "data-artifact" && t.data?.type?.toLowerCase() === "citation"
221
+ ),
222
+ [s.parts]
223
+ ), q = L(
224
+ () => ce(de, r ?? {}),
225
+ [r]
226
+ ), J = P(
227
+ (t, p) => {
228
+ o({
229
+ eventName: "assistant_message_inline_link_opened",
230
+ properties: {
231
+ title: p?.toString(),
232
+ url: t
233
+ }
234
+ });
235
+ },
236
+ [o]
237
+ ), B = P(
238
+ (t, p) => {
239
+ o({
240
+ eventName: "assistant_code_block_copied",
241
+ properties: {
242
+ conversationId: c,
243
+ language: t,
244
+ code: p
245
+ }
246
+ });
247
+ },
248
+ [o, c]
249
+ ), I = P(
250
+ (t) => /* @__PURE__ */ e(
251
+ le,
252
+ {
253
+ text: t,
254
+ componentStyles: q,
255
+ onLinkClick: J,
256
+ onCodeCopy: B,
257
+ artifacts: z
258
+ }
259
+ ),
260
+ [q, J, B, z]
261
+ ), ae = L(
262
+ () => T(
263
+ "data-[role=user]:whitespace-pre-wrap mb-3 data-[role=user]:mb-0 [&[data-role=user]>p]:mb-0 max-w-full",
264
+ a
265
+ ),
266
+ [a]
267
+ );
268
+ return /* @__PURE__ */ i(ne, { children: [
269
+ Q.map((t, p) => {
270
+ const b = {
271
+ "data-role": s.role,
272
+ "data-type": t?.type === "data-component" ? t.data.type : t?.type,
273
+ ...h,
274
+ className: ae
275
+ };
276
+ switch (t?.type) {
277
+ case "text":
278
+ return /* @__PURE__ */ e(S, { ...b, children: H ? t.text : I(t.text || "") }, p);
279
+ case "data-component": {
280
+ const { type: y } = t.data;
281
+ switch (y) {
282
+ case "text":
283
+ return /* @__PURE__ */ e("div", { ...b, children: I(t.data.text || "") }, p);
284
+ default: {
285
+ const C = t.data, { name: w, props: M } = C, N = x?.[w];
286
+ return /* @__PURE__ */ e(S, { ...b, children: /* @__PURE__ */ e(N ? R : De, { name: w, props: M, componentDef: N }) }, `${w}-${p}`);
287
+ }
288
+ }
289
+ }
290
+ case "data-artifact": {
291
+ const y = t.data, { name: C, type: w, artifactSummary: M } = y, N = E?.[w];
292
+ return /* @__PURE__ */ e(S, { ...b, children: /* @__PURE__ */ e(N ? R : Le, { name: w, props: M, componentDef: N }) }, `${C}-${p}`);
293
+ }
294
+ case "summary-group": {
295
+ const y = Y.get(t.groupKey) || {
296
+ isCompleted: !1
297
+ };
298
+ return /* @__PURE__ */ e(S, { ...b, children: /* @__PURE__ */ e(
299
+ me,
300
+ {
301
+ summaries: t.summaries || [],
302
+ isCompleted: y.isCompleted
303
+ }
304
+ ) }, `${t.groupKey}-${p}`);
305
+ }
306
+ default: {
307
+ if (!Ne(t))
308
+ return null;
309
+ const y = t, C = t.approval?.id;
310
+ return G || C ? /* @__PURE__ */ e(S, { ...b, children: /* @__PURE__ */ e(
311
+ Pe,
312
+ {
313
+ tool: y,
314
+ componentDef: x?.IkpTool,
315
+ renderText: I,
316
+ approvalId: C,
317
+ messagePartsLength: s.parts.length,
318
+ setApprovalDelayPending: O,
319
+ addToolApprovalResponse: u,
320
+ sendMessage: v,
321
+ conversationId: c
322
+ }
323
+ ) }, t.toolCallId ?? `${t.type}-${p}`) : null;
324
+ }
325
+ }
326
+ }),
327
+ Z && /* @__PURE__ */ e(he, {}),
328
+ (ee || te) && /* @__PURE__ */ e(Te, {})
329
+ ] });
330
+ };
331
+ export {
332
+ We as EmbeddedChatMessagePart
333
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("../../primitives/components/modal.cjs"),s=require("../utils.cjs"),l=require("./ui/recipes/button.cjs"),n=require("./ui/recipes/modal.cjs"),r=o.Modal,i=({className:t,...e})=>a.jsx(o.Overlay,{className:s.cn(n.modal({slot:"overlay"}),t),...e}),d=({className:t,...e})=>a.jsx(o.Content,{className:s.cn(n.modal({slot:"content"}),"w-[min(90vw,720px)]","has-[[data-dual-pane-search-expanded]]:w-[min(90vw,1000px)] transition-width duration-300",t),...e}),c=({className:t,...e})=>a.jsx(o.Close,{className:s.cn(n.modal({slot:"close"}),l.button({variant:"ghost",size:"xs"}),"relative inset-[unset] w-6 ml-auto text-lg text-gray-500 dark:text-white-alpha-500 px-0","md:hidden",t),...e});exports.Close=c;exports.Content=d;exports.Overlay=i;exports.Root=r;
@@ -0,0 +1,6 @@
1
+ import { ModalPrimitive } from '../../primitives';
2
+ declare const Modal: (props: ModalPrimitive.PrimitiveModalProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const ModalOverlay: ({ className, ...props }: React.ComponentPropsWithRef<typeof ModalPrimitive.Overlay>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const ModalContent: ({ className, ...props }: React.ComponentPropsWithRef<typeof ModalPrimitive.Content>) => import("react/jsx-runtime").JSX.Element;
5
+ declare const ModalClose: ({ className, ...props }: React.ComponentPropsWithRef<typeof ModalPrimitive.Close>) => import("react/jsx-runtime").JSX.Element;
6
+ export { Modal as Root, ModalOverlay as Overlay, ModalContent as Content, ModalClose as Close };
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { Modal as l, Overlay as i, Content as n, Close as r } from "../../primitives/components/modal.js";
4
+ import { cn as e } from "../utils.js";
5
+ import { button as m } from "./ui/recipes/button.js";
6
+ import { modal as s } from "./ui/recipes/modal.js";
7
+ const M = l, C = ({
8
+ className: t,
9
+ ...a
10
+ }) => /* @__PURE__ */ o(i, { className: e(s({ slot: "overlay" }), t), ...a }), h = ({
11
+ className: t,
12
+ ...a
13
+ }) => /* @__PURE__ */ o(
14
+ n,
15
+ {
16
+ className: e(
17
+ s({ slot: "content" }),
18
+ "w-[min(90vw,720px)]",
19
+ // Dual pane
20
+ "has-[[data-dual-pane-search-expanded]]:w-[min(90vw,1000px)] transition-width duration-300",
21
+ t
22
+ ),
23
+ ...a
24
+ }
25
+ ), w = ({
26
+ className: t,
27
+ ...a
28
+ }) => /* @__PURE__ */ o(
29
+ r,
30
+ {
31
+ className: e(
32
+ s({ slot: "close" }),
33
+ m({ variant: "ghost", size: "xs" }),
34
+ "relative inset-[unset] w-6 ml-auto text-lg text-gray-500 dark:text-white-alpha-500 px-0",
35
+ "md:hidden",
36
+ t
37
+ ),
38
+ ...a
39
+ }
40
+ );
41
+ export {
42
+ w as Close,
43
+ h as Content,
44
+ C as Overlay,
45
+ M as Root
46
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),t=require("../utils.cjs"),c=require("../../primitives/components/searchbar.cjs"),n=({className:e,...r})=>a.jsx(c.SearchBarContainer,{className:t.cn("md:min-w-[min(320px,100%)] w-full h-full min-h-9",e),...r}),s=({className:e,...r})=>a.jsx(c.SearchBarButton,{className:t.cn("rounded-md border px-3 min-w-0 min-h-9 flex items-center justify-between gap-2 h-full w-full hover:border-gray-300 dark:hover:border-white-alpha-300 transition-colors",e),...r}),o=({className:e,...r})=>a.jsx(c.SearchBarContentWrapper,{className:t.cn("flex items-center gap-2 min-w-0",e),...r}),h=({className:e,...r})=>a.jsx(c.SearchBarText,{className:t.cn("text-md text-gray-500 dark:text-white-alpha-600",e),...r}),i=({className:e,...r})=>a.jsx(c.SearchBarIcon,{className:t.cn("text-gray-500 dark:text-white-alpha-600 text-xl",e),...r}),l=({className:e,...r})=>a.jsx(c.SearchBarKbdWrapper,{className:t.cn("text-sm text-gray-400 dark:text-white-alpha-500 font-bold flex items-center gap-0.5",e),...r}),S=({className:e,...r})=>a.jsx(c.SearchBarKbdModifier,{className:t.cn("",e),...r}),d=({className:e,...r})=>a.jsx(c.SearchBarKbdShortcutKey,{className:t.cn("",e),...r});exports.SearchBarButton=s;exports.SearchBarContainer=n;exports.SearchBarContentWrapper=o;exports.SearchBarIcon=i;exports.SearchBarKbdModifier=S;exports.SearchBarKbdShortcutKey=d;exports.SearchBarKbdWrapper=l;exports.SearchBarText=h;
@@ -0,0 +1,11 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ import { SearchBarPrimitive } from '../../primitives';
3
+ declare const SearchBarContainer: ({ className, ...props }: ComponentPropsWithRef<typeof SearchBarPrimitive.SearchBarContainer>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const SearchBarButton: ({ className, ...props }: ComponentPropsWithRef<typeof SearchBarPrimitive.SearchBarButton>) => import("react/jsx-runtime").JSX.Element;
5
+ declare const SearchBarContentWrapper: ({ className, ...props }: ComponentPropsWithRef<typeof SearchBarPrimitive.SearchBarContentWrapper>) => import("react/jsx-runtime").JSX.Element;
6
+ declare const SearchBarText: ({ className, ...props }: ComponentPropsWithRef<typeof SearchBarPrimitive.SearchBarText>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const SearchBarIcon: ({ className, ...props }: ComponentPropsWithRef<typeof SearchBarPrimitive.SearchBarIcon>) => import("react/jsx-runtime").JSX.Element;
8
+ declare const SearchBarKbdWrapper: ({ className, ...props }: ComponentPropsWithRef<typeof SearchBarPrimitive.SearchBarKbdWrapper>) => import("react/jsx-runtime").JSX.Element;
9
+ declare const SearchBarKbdModifier: ({ className, ...props }: ComponentPropsWithRef<typeof SearchBarPrimitive.SearchBarKbdModifier>) => import("react/jsx-runtime").JSX.Element;
10
+ declare const SearchBarKbdShortcutKey: ({ className, ...props }: ComponentPropsWithRef<typeof SearchBarPrimitive.SearchBarKbdShortcutKey>) => import("react/jsx-runtime").JSX.Element;
11
+ export { SearchBarContainer, SearchBarButton, SearchBarContentWrapper, SearchBarText, SearchBarIcon, SearchBarKbdWrapper, SearchBarKbdModifier, SearchBarKbdShortcutKey, };
@@ -0,0 +1,81 @@
1
+ "use client";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { cn as t } from "../utils.js";
4
+ import { SearchBarContainer as c, SearchBarButton as i, SearchBarContentWrapper as o, SearchBarText as n, SearchBarIcon as h, SearchBarKbdWrapper as s, SearchBarKbdModifier as m, SearchBarKbdShortcutKey as l } from "../../primitives/components/searchbar.js";
5
+ const p = ({
6
+ className: r,
7
+ ...a
8
+ }) => /* @__PURE__ */ e(
9
+ c,
10
+ {
11
+ className: t("md:min-w-[min(320px,100%)] w-full h-full min-h-9", r),
12
+ ...a
13
+ }
14
+ ), x = ({
15
+ className: r,
16
+ ...a
17
+ }) => /* @__PURE__ */ e(
18
+ i,
19
+ {
20
+ className: t(
21
+ "rounded-md border px-3 min-w-0 min-h-9 flex items-center justify-between gap-2 h-full w-full hover:border-gray-300 dark:hover:border-white-alpha-300 transition-colors",
22
+ r
23
+ ),
24
+ ...a
25
+ }
26
+ ), f = ({
27
+ className: r,
28
+ ...a
29
+ }) => /* @__PURE__ */ e(
30
+ o,
31
+ {
32
+ className: t("flex items-center gap-2 min-w-0", r),
33
+ ...a
34
+ }
35
+ ), b = ({
36
+ className: r,
37
+ ...a
38
+ }) => /* @__PURE__ */ e(
39
+ n,
40
+ {
41
+ className: t("text-md text-gray-500 dark:text-white-alpha-600", r),
42
+ ...a
43
+ }
44
+ ), u = ({
45
+ className: r,
46
+ ...a
47
+ }) => /* @__PURE__ */ e(
48
+ h,
49
+ {
50
+ className: t("text-gray-500 dark:text-white-alpha-600 text-xl", r),
51
+ ...a
52
+ }
53
+ ), K = ({
54
+ className: r,
55
+ ...a
56
+ }) => /* @__PURE__ */ e(
57
+ s,
58
+ {
59
+ className: t(
60
+ "text-sm text-gray-400 dark:text-white-alpha-500 font-bold flex items-center gap-0.5",
61
+ r
62
+ ),
63
+ ...a
64
+ }
65
+ ), w = ({
66
+ className: r,
67
+ ...a
68
+ }) => /* @__PURE__ */ e(m, { className: t("", r), ...a }), v = ({
69
+ className: r,
70
+ ...a
71
+ }) => /* @__PURE__ */ e(l, { className: t("", r), ...a });
72
+ export {
73
+ x as SearchBarButton,
74
+ p as SearchBarContainer,
75
+ f as SearchBarContentWrapper,
76
+ u as SearchBarIcon,
77
+ w as SearchBarKbdModifier,
78
+ v as SearchBarKbdShortcutKey,
79
+ K as SearchBarKbdWrapper,
80
+ b as SearchBarText
81
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("../inkeep.css.cjs"),o=require("../../primitives/atoms/shadow/context.cjs"),r=e=>t.jsx(o.InkeepShadow,{styles:n.default,...e});exports.Shadow=r;
@@ -0,0 +1,3 @@
1
+ import { InkeepShadow } from '../../primitives';
2
+ export type ShadowProps = React.ComponentPropsWithRef<typeof InkeepShadow>;
3
+ export declare const Shadow: (props: ShadowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ import t from "../inkeep.css.js";
4
+ import { InkeepShadow as e } from "../../primitives/atoms/shadow/context.js";
5
+ const i = (o) => /* @__PURE__ */ r(e, { styles: t, ...o });
6
+ export {
7
+ i as Shadow
8
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../primitives/components/sidebar-chat/index.cjs"),i=require("../utils.cjs"),o=require("./ui/recipes/button.cjs"),s=require("./ui/recipes/scrollable.cjs"),n=({className:t,...e})=>a.jsx(r.SidebarChatPrimitiveRoot,{...e,className:i.cn("w-[--width] h-full relative bg-white dark:bg-gray-dark-950","data-[position=left]:pr-1 data-[position=left]:border-r data-[position=left]:mr-1","data-[position=right]:pl-1 data-[position=right]:border-l data-[position=right]:ml-1","data-[state=open]:data-[position=left]:animate-sidebar-in-left","data-[state=open]:data-[position=right]:animate-sidebar-in-right","data-[state=closed]:data-[position=left]:animate-sidebar-out-left","data-[state=closed]:data-[position=right]:animate-sidebar-out-right",t)}),l=({className:t,...e})=>a.jsx(r.SidebarChatPrimitiveResizer,{className:i.cn("px-1 bg-transparent opacity-0 hover:opacity-100","cursor-ew-resize","absolute top-0 bottom-0 z-[1]",'[[data-position="left"]>&]:-right-1','[[data-position="right"]>&]:-left-1','after:content-[""] after:absolute after:top-0 after:bottom-0 after:w-0.5 after:bg-inkeep-primary-medium dark:after:bg-inkeep-primary-light [[data-position="right"]>&]:after:right-1 [[data-position="left"]>&]:after:left-1',"data-[state=closed]:opacity-0 data-[state=closed]:pointer-events-none","data-[state=open]:pointer-events-auto","transition-opacity duration-200",t),...e}),d=({className:t,...e})=>a.jsx(r.Header,{className:i.cn(s.scrollable({section:"header"}),"w-full flex flex-row items-center px-3 py-3","bg-white dark:bg-gray-dark-950","after:absolute","after:left-0","after:top-full","after:h-3","after:w-full","after:text-white","after:dark:text-gray-dark-950","after:bg-[linear-gradient(currentColor,_transparent)]","after:z-start",t),...e}),p=({className:t,...e})=>a.jsx(r.CloseButton,{className:i.cn(o.button({variant:"ghost",size:"xs"}),"relative inset-[unset] w-6 ml-auto text-lg text-gray-500 dark:text-white-alpha-500 px-0",t),...e});exports.CloseButton=p;exports.Header=d;exports.Resizer=l;exports.Root=n;
@@ -0,0 +1,6 @@
1
+ import { SidebarChatPrimitive } from '../../primitives';
2
+ declare const SidebarChatRoot: ({ className, ...props }: React.ComponentPropsWithRef<typeof SidebarChatPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
3
+ declare const SidebarChatResizer: ({ className, ...props }: React.ComponentPropsWithRef<typeof SidebarChatPrimitive.Resizer>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const SidebarChatHeader: ({ className, ...props }: React.ComponentPropsWithRef<typeof SidebarChatPrimitive.Header>) => import("react/jsx-runtime").JSX.Element;
5
+ declare const SidebarChatCloseButton: ({ className, ...props }: React.ComponentPropsWithRef<typeof SidebarChatPrimitive.CloseButton>) => import("react/jsx-runtime").JSX.Element;
6
+ export { SidebarChatRoot as Root, SidebarChatResizer as Resizer, SidebarChatCloseButton as CloseButton, SidebarChatHeader as Header, };