@inkeep/agents-ui 0.1.0 → 0.14.8

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 (335) hide show
  1. package/LICENSE +64 -0
  2. package/README.md +1 -67
  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.js +170 -0
  11. package/dist/index.cjs +1 -0
  12. package/dist/index.d.cts +5093 -0
  13. package/dist/index.d.ts +5093 -0
  14. package/dist/index.js +213 -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.js +99 -0
  23. package/dist/primitives/atoms/avatars/user.cjs +1 -0
  24. package/dist/primitives/atoms/avatars/user.js +27 -0
  25. package/dist/primitives/atoms/cmdk/command-score.cjs +1 -0
  26. package/dist/primitives/atoms/cmdk/command-score.js +46 -0
  27. package/dist/primitives/atoms/cmdk/index.cjs +1 -0
  28. package/dist/primitives/atoms/cmdk/index.js +521 -0
  29. package/dist/primitives/atoms/codeblock/index.cjs +1 -0
  30. package/dist/primitives/atoms/codeblock/index.js +40 -0
  31. package/dist/primitives/atoms/custom-styles.cjs +1 -0
  32. package/dist/primitives/atoms/custom-styles.js +57 -0
  33. package/dist/primitives/atoms/dialog.cjs +1 -0
  34. package/dist/primitives/atoms/dialog.js +226 -0
  35. package/dist/primitives/atoms/error-boundary.cjs +1 -0
  36. package/dist/primitives/atoms/error-boundary.js +9 -0
  37. package/dist/primitives/atoms/icons/built-in-icon-renderer.cjs +1 -0
  38. package/dist/primitives/atoms/icons/built-in-icon-renderer.js +51 -0
  39. package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -0
  40. package/dist/primitives/atoms/icons/built-in-icons.js +86 -0
  41. package/dist/primitives/atoms/icons/checkbox-icon.cjs +1 -0
  42. package/dist/primitives/atoms/icons/checkbox-icon.js +24 -0
  43. package/dist/primitives/atoms/icons/collections/bi.cjs +1 -0
  44. package/dist/primitives/atoms/icons/collections/bi.js +49 -0
  45. package/dist/primitives/atoms/icons/collections/fi.cjs +1 -0
  46. package/dist/primitives/atoms/icons/collections/fi.js +29 -0
  47. package/dist/primitives/atoms/icons/collections/gr.cjs +1 -0
  48. package/dist/primitives/atoms/icons/collections/gr.js +21 -0
  49. package/dist/primitives/atoms/icons/collections/io5.cjs +1 -0
  50. package/dist/primitives/atoms/icons/collections/io5.js +806 -0
  51. package/dist/primitives/atoms/icons/collections/pi.cjs +1 -0
  52. package/dist/primitives/atoms/icons/collections/pi.js +49 -0
  53. package/dist/primitives/atoms/icons/custom-icon.cjs +1 -0
  54. package/dist/primitives/atoms/icons/custom-icon.js +19 -0
  55. package/dist/primitives/atoms/icons/generate-icon.cjs +1 -0
  56. package/dist/primitives/atoms/icons/generate-icon.js +56 -0
  57. package/dist/primitives/atoms/icons/index.cjs +1 -0
  58. package/dist/primitives/atoms/icons/index.js +6 -0
  59. package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -0
  60. package/dist/primitives/atoms/icons/inkeep-default-icons.js +24 -0
  61. package/dist/primitives/atoms/link.cjs +1 -0
  62. package/dist/primitives/atoms/link.js +35 -0
  63. package/dist/primitives/atoms/markdown/components.cjs +1 -0
  64. package/dist/primitives/atoms/markdown/components.js +73 -0
  65. package/dist/primitives/atoms/markdown/index.cjs +1 -0
  66. package/dist/primitives/atoms/markdown/index.js +115 -0
  67. package/dist/primitives/atoms/markdown/rehype-inline-code-property.cjs +1 -0
  68. package/dist/primitives/atoms/markdown/rehype-inline-code-property.js +12 -0
  69. package/dist/primitives/atoms/portal-with-theme.cjs +1 -0
  70. package/dist/primitives/atoms/portal-with-theme.js +12 -0
  71. package/dist/primitives/atoms/portal.cjs +1 -0
  72. package/dist/primitives/atoms/portal.js +19 -0
  73. package/dist/primitives/atoms/select.cjs +1 -0
  74. package/dist/primitives/atoms/select.js +785 -0
  75. package/dist/primitives/atoms/shadow/context.cjs +1 -0
  76. package/dist/primitives/atoms/shadow/context.js +54 -0
  77. package/dist/primitives/atoms/shadow/create.cjs +1 -0
  78. package/dist/primitives/atoms/shadow/create.js +56 -0
  79. package/dist/primitives/atoms/shadow/root.cjs +1 -0
  80. package/dist/primitives/atoms/shadow/root.js +22 -0
  81. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.cjs +1 -0
  82. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.js +11 -0
  83. package/dist/primitives/atoms/shadow/utils.cjs +1 -0
  84. package/dist/primitives/atoms/shadow/utils.js +16 -0
  85. package/dist/primitives/components/chat-button.cjs +1 -0
  86. package/dist/primitives/components/chat-button.js +46 -0
  87. package/dist/primitives/components/embedded-chat/chat-provider.cjs +1 -0
  88. package/dist/primitives/components/embedded-chat/chat-provider.js +20 -0
  89. package/dist/primitives/components/embedded-chat/use-chat-action.cjs +1 -0
  90. package/dist/primitives/components/embedded-chat/use-chat-action.js +38 -0
  91. package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +3 -0
  92. package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +160 -0
  93. package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -0
  94. package/dist/primitives/components/embedded-chat/use-stream-processor.js +82 -0
  95. package/dist/primitives/components/embedded-chat.cjs +11 -0
  96. package/dist/primitives/components/embedded-chat.js +1898 -0
  97. package/dist/primitives/components/embedded-search/search-provider.cjs +1 -0
  98. package/dist/primitives/components/embedded-search/search-provider.js +26 -0
  99. package/dist/primitives/components/embedded-search/transform-results.cjs +1 -0
  100. package/dist/primitives/components/embedded-search/transform-results.js +47 -0
  101. package/dist/primitives/components/embedded-search/url-query.cjs +1 -0
  102. package/dist/primitives/components/embedded-search/url-query.js +12 -0
  103. package/dist/primitives/components/embedded-search/use-inkeep-search.cjs +1 -0
  104. package/dist/primitives/components/embedded-search/use-inkeep-search.js +35 -0
  105. package/dist/primitives/components/embedded-search/use-search-filter.cjs +1 -0
  106. package/dist/primitives/components/embedded-search/use-search-filter.js +77 -0
  107. package/dist/primitives/components/embedded-search.cjs +1 -0
  108. package/dist/primitives/components/embedded-search.js +628 -0
  109. package/dist/primitives/components/factory.cjs +1 -0
  110. package/dist/primitives/components/factory.js +39 -0
  111. package/dist/primitives/components/index.cjs +1 -0
  112. package/dist/primitives/components/index.js +27 -0
  113. package/dist/primitives/components/modal/modal-provider.cjs +1 -0
  114. package/dist/primitives/components/modal/modal-provider.js +8 -0
  115. package/dist/primitives/components/modal/use-inkeep-modal.cjs +1 -0
  116. package/dist/primitives/components/modal/use-inkeep-modal.js +45 -0
  117. package/dist/primitives/components/modal/widget-auto-focus.cjs +1 -0
  118. package/dist/primitives/components/modal/widget-auto-focus.js +16 -0
  119. package/dist/primitives/components/modal.cjs +1 -0
  120. package/dist/primitives/components/modal.js +40 -0
  121. package/dist/primitives/components/presence.cjs +1 -0
  122. package/dist/primitives/components/presence.js +26 -0
  123. package/dist/primitives/components/searchbar.cjs +1 -0
  124. package/dist/primitives/components/searchbar.js +54 -0
  125. package/dist/primitives/components/sidebar-chat/index.cjs +1 -0
  126. package/dist/primitives/components/sidebar-chat/index.js +86 -0
  127. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.cjs +1 -0
  128. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.js +34 -0
  129. package/dist/primitives/components/tagline-logo-icon.cjs +1 -0
  130. package/dist/primitives/components/tagline-logo-icon.js +26 -0
  131. package/dist/primitives/components/use-component-trigger.cjs +1 -0
  132. package/dist/primitives/components/use-component-trigger.js +16 -0
  133. package/dist/primitives/constants/search.cjs +1 -0
  134. package/dist/primitives/constants/search.js +5 -0
  135. package/dist/primitives/hooks/index.cjs +1 -0
  136. package/dist/primitives/hooks/index.js +24 -0
  137. package/dist/primitives/hooks/use-boolean.cjs +1 -0
  138. package/dist/primitives/hooks/use-boolean.js +17 -0
  139. package/dist/primitives/hooks/use-component-classnames.cjs +1 -0
  140. package/dist/primitives/hooks/use-component-classnames.js +14 -0
  141. package/dist/primitives/hooks/use-container-size.cjs +1 -0
  142. package/dist/primitives/hooks/use-container-size.js +18 -0
  143. package/dist/primitives/hooks/use-copy-to-clipboard.cjs +1 -0
  144. package/dist/primitives/hooks/use-copy-to-clipboard.js +24 -0
  145. package/dist/primitives/hooks/use-debounce.cjs +1 -0
  146. package/dist/primitives/hooks/use-debounce.js +16 -0
  147. package/dist/primitives/hooks/use-instant-update.cjs +1 -0
  148. package/dist/primitives/hooks/use-instant-update.js +16 -0
  149. package/dist/primitives/hooks/use-is-mounted.cjs +1 -0
  150. package/dist/primitives/hooks/use-is-mounted.js +11 -0
  151. package/dist/primitives/hooks/use-media-query.cjs +1 -0
  152. package/dist/primitives/hooks/use-media-query.js +14 -0
  153. package/dist/primitives/hooks/use-resize-observer.cjs +1 -0
  154. package/dist/primitives/hooks/use-resize-observer.js +32 -0
  155. package/dist/primitives/hooks/use-scroll-to-bottom.cjs +1 -0
  156. package/dist/primitives/hooks/use-scroll-to-bottom.js +52 -0
  157. package/dist/primitives/hooks/use-scrolling-fades.cjs +1 -0
  158. package/dist/primitives/hooks/use-scrolling-fades.js +18 -0
  159. package/dist/primitives/hooks/use-settle-action.cjs +1 -0
  160. package/dist/primitives/hooks/use-settle-action.js +11 -0
  161. package/dist/primitives/index.cjs +1 -0
  162. package/dist/primitives/index.js +155 -0
  163. package/dist/primitives/providers/attachment-item-provider.cjs +1 -0
  164. package/dist/primitives/providers/attachment-item-provider.js +13 -0
  165. package/dist/primitives/providers/attachments-bar-provider.cjs +1 -0
  166. package/dist/primitives/providers/attachments-bar-provider.js +57 -0
  167. package/dist/primitives/providers/base-events-provider.cjs +1 -0
  168. package/dist/primitives/providers/base-events-provider.js +37 -0
  169. package/dist/primitives/providers/chat-form-provider.cjs +1 -0
  170. package/dist/primitives/providers/chat-form-provider.js +109 -0
  171. package/dist/primitives/providers/config-provider.cjs +1 -0
  172. package/dist/primitives/providers/config-provider.js +38 -0
  173. package/dist/primitives/providers/feedback-item-provider.cjs +1 -0
  174. package/dist/primitives/providers/feedback-item-provider.js +16 -0
  175. package/dist/primitives/providers/feedback-provider.cjs +1 -0
  176. package/dist/primitives/providers/feedback-provider.js +83 -0
  177. package/dist/primitives/providers/form-field-provider.cjs +1 -0
  178. package/dist/primitives/providers/form-field-provider.js +17 -0
  179. package/dist/primitives/providers/help-menu-provider.cjs +1 -0
  180. package/dist/primitives/providers/help-menu-provider.js +19 -0
  181. package/dist/primitives/providers/hover-popover-provider.cjs +1 -0
  182. package/dist/primitives/providers/hover-popover-provider.js +13 -0
  183. package/dist/primitives/providers/index.cjs +1 -0
  184. package/dist/primitives/providers/index.js +57 -0
  185. package/dist/primitives/providers/markdown-provider.cjs +1 -0
  186. package/dist/primitives/providers/markdown-provider.js +8 -0
  187. package/dist/primitives/providers/message-attachments-provider.cjs +1 -0
  188. package/dist/primitives/providers/message-attachments-provider.js +27 -0
  189. package/dist/primitives/providers/message-provider.cjs +1 -0
  190. package/dist/primitives/providers/message-provider.js +14 -0
  191. package/dist/primitives/providers/root-provider.cjs +1 -0
  192. package/dist/primitives/providers/root-provider.js +21 -0
  193. package/dist/primitives/providers/search-events-provider.cjs +1 -0
  194. package/dist/primitives/providers/search-events-provider.js +17 -0
  195. package/dist/primitives/providers/sidebar-chat-provider.cjs +1 -0
  196. package/dist/primitives/providers/sidebar-chat-provider.js +41 -0
  197. package/dist/primitives/providers/source-item-provider.cjs +1 -0
  198. package/dist/primitives/providers/source-item-provider.js +13 -0
  199. package/dist/primitives/providers/theme-provider.cjs +3 -0
  200. package/dist/primitives/providers/theme-provider.js +79 -0
  201. package/dist/primitives/providers/widget-provider.cjs +1 -0
  202. package/dist/primitives/providers/widget-provider.js +8 -0
  203. package/dist/primitives/utils/component-ids.cjs +1 -0
  204. package/dist/primitives/utils/component-ids.js +309 -0
  205. package/dist/primitives/utils/compose-event-handlers.cjs +1 -0
  206. package/dist/primitives/utils/compose-event-handlers.js +10 -0
  207. package/dist/primitives/utils/compose-refs.cjs +1 -0
  208. package/dist/primitives/utils/compose-refs.js +30 -0
  209. package/dist/primitives/utils/default-settings.cjs +1 -0
  210. package/dist/primitives/utils/default-settings.js +50 -0
  211. package/dist/primitives/utils/form.cjs +1 -0
  212. package/dist/primitives/utils/form.js +17 -0
  213. package/dist/primitives/utils/generate-uid.cjs +1 -0
  214. package/dist/primitives/utils/generate-uid.js +14 -0
  215. package/dist/primitives/utils/get-source-icon.cjs +1 -0
  216. package/dist/primitives/utils/get-source-icon.js +11 -0
  217. package/dist/primitives/utils/highlight-emphasis.cjs +1 -0
  218. package/dist/primitives/utils/highlight-emphasis.js +15 -0
  219. package/dist/primitives/utils/merge-props.cjs +1 -0
  220. package/dist/primitives/utils/merge-props.js +41 -0
  221. package/dist/primitives/utils/misc.cjs +1 -0
  222. package/dist/primitives/utils/misc.js +31 -0
  223. package/dist/primitives/utils/split-props.cjs +1 -0
  224. package/dist/primitives/utils/split-props.js +10 -0
  225. package/dist/react/chat-button.cjs +1 -0
  226. package/dist/react/chat-button.js +60 -0
  227. package/dist/react/embedded-chat.cjs +1 -0
  228. package/dist/react/embedded-chat.js +380 -0
  229. package/dist/react/embedded-search-and-chat.cjs +1 -0
  230. package/dist/react/embedded-search-and-chat.impl.cjs +1 -0
  231. package/dist/react/embedded-search-and-chat.impl.js +43 -0
  232. package/dist/react/embedded-search-and-chat.js +66 -0
  233. package/dist/react/embedded-search.cjs +1 -0
  234. package/dist/react/embedded-search.js +181 -0
  235. package/dist/react/index.cjs +1 -0
  236. package/dist/react/index.js +213 -0
  237. package/dist/react/modal.chat.cjs +1 -0
  238. package/dist/react/modal.chat.js +21 -0
  239. package/dist/react/modal.cjs +1 -0
  240. package/dist/react/modal.js +27 -0
  241. package/dist/react/modal.search-and-chat.cjs +1 -0
  242. package/dist/react/modal.search-and-chat.js +27 -0
  243. package/dist/react/modal.search.cjs +1 -0
  244. package/dist/react/modal.search.js +21 -0
  245. package/dist/react/searchbar.cjs +1 -0
  246. package/dist/react/searchbar.js +68 -0
  247. package/dist/react/sidebar-chat.cjs +1 -0
  248. package/dist/react/sidebar-chat.js +49 -0
  249. package/dist/react/utils.cjs +1 -0
  250. package/dist/react/utils.js +20 -0
  251. package/dist/react/widget-toggle.cjs +1 -0
  252. package/dist/react/widget-toggle.js +65 -0
  253. package/dist/styled/components/chat-button.cjs +1 -0
  254. package/dist/styled/components/chat-button.js +56 -0
  255. package/dist/styled/components/data-summary-group.cjs +1 -0
  256. package/dist/styled/components/data-summary-group.js +76 -0
  257. package/dist/styled/components/embedded-chat.cjs +1 -0
  258. package/dist/styled/components/embedded-chat.js +1816 -0
  259. package/dist/styled/components/embedded-search/results-loading.cjs +1 -0
  260. package/dist/styled/components/embedded-search/results-loading.js +39 -0
  261. package/dist/styled/components/embedded-search.cjs +1 -0
  262. package/dist/styled/components/embedded-search.js +680 -0
  263. package/dist/styled/components/index.cjs +1 -0
  264. package/dist/styled/components/index.js +24 -0
  265. package/dist/styled/components/loading-indicator.cjs +1 -0
  266. package/dist/styled/components/loading-indicator.js +36 -0
  267. package/dist/styled/components/message.cjs +1 -0
  268. package/dist/styled/components/message.js +140 -0
  269. package/dist/styled/components/modal.cjs +1 -0
  270. package/dist/styled/components/modal.js +46 -0
  271. package/dist/styled/components/searchbar.cjs +1 -0
  272. package/dist/styled/components/searchbar.js +81 -0
  273. package/dist/styled/components/shadow.cjs +1 -0
  274. package/dist/styled/components/shadow.js +8 -0
  275. package/dist/styled/components/sidebar-chat.cjs +1 -0
  276. package/dist/styled/components/sidebar-chat.js +90 -0
  277. package/dist/styled/components/ui/markdown-styles.cjs +1 -0
  278. package/dist/styled/components/ui/markdown-styles.js +38 -0
  279. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.cjs +1 -0
  280. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.js +32 -0
  281. package/dist/styled/components/ui/recipes/attachment.cjs +1 -0
  282. package/dist/styled/components/ui/recipes/attachment.js +28 -0
  283. package/dist/styled/components/ui/recipes/button.cjs +1 -0
  284. package/dist/styled/components/ui/recipes/button.js +81 -0
  285. package/dist/styled/components/ui/recipes/checkbox.cjs +1 -0
  286. package/dist/styled/components/ui/recipes/checkbox.js +23 -0
  287. package/dist/styled/components/ui/recipes/citation.cjs +1 -0
  288. package/dist/styled/components/ui/recipes/citation.js +75 -0
  289. package/dist/styled/components/ui/recipes/icon.cjs +1 -0
  290. package/dist/styled/components/ui/recipes/icon.js +6 -0
  291. package/dist/styled/components/ui/recipes/index.cjs +1 -0
  292. package/dist/styled/components/ui/recipes/index.js +37 -0
  293. package/dist/styled/components/ui/recipes/input.cjs +1 -0
  294. package/dist/styled/components/ui/recipes/input.js +34 -0
  295. package/dist/styled/components/ui/recipes/link.cjs +1 -0
  296. package/dist/styled/components/ui/recipes/link.js +13 -0
  297. package/dist/styled/components/ui/recipes/markdown.cjs +1 -0
  298. package/dist/styled/components/ui/recipes/markdown.js +103 -0
  299. package/dist/styled/components/ui/recipes/modal.cjs +1 -0
  300. package/dist/styled/components/ui/recipes/modal.js +59 -0
  301. package/dist/styled/components/ui/recipes/popover.cjs +1 -0
  302. package/dist/styled/components/ui/recipes/popover.js +20 -0
  303. package/dist/styled/components/ui/recipes/scrollable.cjs +1 -0
  304. package/dist/styled/components/ui/recipes/scrollable.js +15 -0
  305. package/dist/styled/components/ui/recipes/select.cjs +1 -0
  306. package/dist/styled/components/ui/recipes/select.js +38 -0
  307. package/dist/styled/components/ui/recipes/skeleton.cjs +1 -0
  308. package/dist/styled/components/ui/recipes/skeleton.js +16 -0
  309. package/dist/styled/components/ui/recipes/widget-toggle.cjs +1 -0
  310. package/dist/styled/components/ui/recipes/widget-toggle.js +35 -0
  311. package/dist/styled/index.cjs +1 -0
  312. package/dist/styled/index.js +177 -0
  313. package/dist/styled/inkeep.css.cjs +4049 -0
  314. package/dist/styled/inkeep.css.js +4053 -0
  315. package/dist/styled/utils.cjs +1 -0
  316. package/dist/styled/utils.js +11 -0
  317. package/dist/theme/color-utils.cjs +1 -0
  318. package/dist/theme/color-utils.js +21 -0
  319. package/dist/theme/colors.cjs +1 -0
  320. package/dist/theme/colors.js +143 -0
  321. package/dist/theme/index.cjs +1 -0
  322. package/dist/theme/index.js +58 -0
  323. package/dist/theme/utils/create-css-variables.cjs +1 -0
  324. package/dist/theme/utils/create-css-variables.js +24 -0
  325. package/dist/theme/utils/generate-theme-variables.cjs +1 -0
  326. package/dist/theme/utils/generate-theme-variables.js +34 -0
  327. package/dist/types/message.cjs +1 -0
  328. package/dist/types/message.js +5 -0
  329. package/dist/types/types.d.cts +1754 -0
  330. package/dist/types/types.d.ts +1754 -0
  331. package/package.json +132 -39
  332. package/LICENSE.md +0 -51
  333. package/dist/assets/index-3anqgmEs.js +0 -49
  334. package/dist/assets/index-CF_BRP1w.css +0 -1
  335. package/dist/index.html +0 -14
@@ -0,0 +1,1754 @@
1
+ import { ComponentType } from 'react';
2
+ import { HTMLProps } from 'react';
3
+ import { ReactNode } from 'react';
4
+ import { UIMessage } from '@ai-sdk/react';
5
+
6
+ export declare interface AIChatDisclaimerSettings {
7
+ /**
8
+ * Controls whether the disclaimer message is shown.
9
+ * Enable this when you need to display important notices or legal disclaimers.
10
+ * @default false
11
+ */
12
+ isEnabled?: boolean;
13
+ /**
14
+ * The main text content of the disclaimer message.
15
+ * Should clearly communicate important information about AI usage or limitations.
16
+ * @example "AI responses are generated automatically and may require verification."
17
+ */
18
+ label?: string;
19
+ /**
20
+ * Additional information shown when hovering over the disclaimer.
21
+ * Use this to provide more detailed explanations or context.
22
+ */
23
+ tooltip?: string;
24
+ }
25
+
26
+ export declare interface AIChatFormButtons {
27
+ submit: {
28
+ label?: string;
29
+ onSubmit: SubmitCallback;
30
+ };
31
+ close?: {
32
+ action: CloseFormAction;
33
+ };
34
+ }
35
+
36
+ declare interface AIChatFormDoneButton {
37
+ label: string;
38
+ icon?: InkeepCustomIcon;
39
+ action: CloseFormAction;
40
+ }
41
+
42
+ export declare interface AIChatFormSettings {
43
+ heading?: string;
44
+ description?: string;
45
+ buttons: AIChatFormButtons;
46
+ fields: FormField[];
47
+ successView?: AIChatFormSuccessView;
48
+ }
49
+
50
+ declare interface AIChatFormSuccessView {
51
+ heading: string;
52
+ message: string;
53
+ doneButton: AIChatFormDoneButton;
54
+ }
55
+
56
+ export declare interface AIChatFunctions {
57
+ /**
58
+ * Programmatically sends a message in the chat.
59
+ * @param message Optional message text. If omitted, sends the current input value.
60
+ */
61
+ submitMessage: (message?: string) => void;
62
+ /**
63
+ * Programmatically updates the text in the chat input field.
64
+ * @param message The new message text to set
65
+ */
66
+ updateInputMessage: (message: string) => void;
67
+ /**
68
+ * Resets the chat to its initial state.
69
+ * Removes all messages and resets any active workflows.
70
+ */
71
+ clearChat: () => void;
72
+ /**
73
+ * Displays a form overlay in the chat interface.
74
+ * @param formSettings Configuration object defining the form's fields and behavior
75
+ * @param getHelpOption Optional getHelpOption that triggered the form (for analytics)
76
+ */
77
+ openForm: (formSettings: AIChatFormSettings, getHelpOption?: GetHelpOption) => void;
78
+ /**
79
+ * Programmatically sets focus to the chat input field.
80
+ * Useful after programmatic updates or when showing the chat interface.
81
+ */
82
+ focusInput: () => void;
83
+ }
84
+
85
+ export declare interface AIChatToolbarButtonLabels {
86
+ /**
87
+ * Text shown on the button that clears the chat history.
88
+ * @example "Clear Chat" or "Start Over"
89
+ */
90
+ clear?: string;
91
+ /**
92
+ * Text shown on the button that generates a shareable chat link.
93
+ * @example "Share Chat" or "Get Link"
94
+ */
95
+ share?: string;
96
+ /**
97
+ * Text shown on the button that opens the help options menu.
98
+ * @example "Get Help" or "Support Options"
99
+ */
100
+ getHelp?: string;
101
+ /**
102
+ * Text shown on the button that stops the AI from generating a response.
103
+ * @example "Stop" or "Cancel Response"
104
+ */
105
+ stop?: string;
106
+ /**
107
+ * Text shown on the button that copies the chat transcript.
108
+ * @example "Copy Chat" or "Copy Transcript"
109
+ */
110
+ copyChat?: string;
111
+ }
112
+
113
+ export declare interface AnnotationAction {
114
+ label?: string;
115
+ icon?: InkeepCustomIcon;
116
+ action: ChatAction;
117
+ }
118
+
119
+ export declare type AnswerConfidence = 'very_confident' | 'somewhat_confident' | 'not_confident' | 'no_sources' | 'other';
120
+
121
+ export declare type ArtifactPart = Extract<Message['parts'][number], {
122
+ type: 'data-artifact';
123
+ }>;
124
+
125
+ export declare type ArtifactType = typeof CITATION_ARTIFACT_TYPE | string;
126
+
127
+ export declare interface AssistantAnswerDisplayedEvent {
128
+ eventName: 'assistant_answer_displayed';
129
+ properties: {
130
+ conversationId?: string;
131
+ };
132
+ }
133
+
134
+ export declare interface AssistantCodeBlockCopiedEvent {
135
+ eventName: 'assistant_code_block_copied';
136
+ properties: {
137
+ conversationId: string;
138
+ language: string;
139
+ code: string;
140
+ };
141
+ }
142
+
143
+ export declare interface AssistantMessageCopiedEvent {
144
+ eventName: 'assistant_message_copied';
145
+ properties: {
146
+ conversationId: string;
147
+ };
148
+ }
149
+
150
+ export declare interface AssistantMessageLinkOpenedEvent {
151
+ eventName: 'assistant_message_inline_link_opened';
152
+ properties: {
153
+ title?: string;
154
+ url?: string;
155
+ };
156
+ }
157
+
158
+ export declare interface AssistantMessageReceivedEvent {
159
+ eventName: 'assistant_message_received';
160
+ properties: {
161
+ conversationId?: string;
162
+ };
163
+ }
164
+
165
+ export declare interface AssistantNegativeFeedbackSubmittedEvent {
166
+ eventName: 'assistant_negative_feedback_submitted';
167
+ properties: FeedbackProperties;
168
+ }
169
+
170
+ export declare interface AssistantPositiveFeedbackSubmittedEvent {
171
+ eventName: 'assistant_positive_feedback_submitted';
172
+ properties: FeedbackProperties;
173
+ }
174
+
175
+ export declare interface AssistantSourceItemClickedEvent {
176
+ eventName: 'assistant_source_item_clicked';
177
+ properties: {
178
+ conversationId: string;
179
+ link: TransformedSource;
180
+ };
181
+ }
182
+
183
+ export declare type AvailableBuiltInIcons = 'FaBook' | 'FaGithub' | 'FaDatabase' | 'FaStackOverflow' | 'FaChrome' | 'FaPhone' | 'FaEnvelope' | 'FaPencil' | 'FaBlog' | 'FaSort' | 'FaPenSquare' | 'FaChevronRight' | 'FaChevronUp' | 'FaFilePdf' | 'FaDiscourse' | 'FaDiscord' | 'FaSlack' | 'IoDocumentTextSharp' | 'IoDocumentSharp' | 'IoSend' | 'IoInformationCircleOutline' | 'IoLinkOutline' | 'IoThumbsUpSharp' | 'IoThumbsDownSharp' | 'IoSearch' | 'IoCopyOutline' | 'IoCopy' | 'IoReturnDownBackOutline' | 'IoChevronForwardOutline' | 'IoReturnDownForward' | 'IoCloseOutline' | 'IoCheckmarkOutline' | 'IoBookOutline' | 'IoReaderOutline' | 'IoHelpBuoyOutline' | 'IoPeopleOutline' | 'IoDocumentTextOutline' | 'IoChatbubblesOutline' | 'FaRegFilePdf' | 'IoLogoDiscord' | 'IoLogoGithub' | 'IoTerminal' | 'FaBriefcase' | 'IoPlayCircleOutline' | 'IoPencilOutline' | 'IoCheckmarkDoneOutline' | 'IoHomeOutline' | 'IoMail' | 'IoOpenOutline' | 'FaTelegram' | 'FaTable' | 'FaMagnifyingGlass' | 'LuArrowLeft' | 'LuCircleCheck' | 'LuCommand' | 'LuCopy' | 'LuCheck' | 'LuCornerDownLeft' | 'LuGlobe' | 'LuLink' | 'LuRepeat' | 'LuThumbsDown' | 'LuThumbsUp' | 'LuUsers' | 'LuUser' | 'LuArrowUpRight' | 'LuBookOpen' | 'LuChevronDown' | 'LuLoaderCircle' | 'FiEdit' | 'LuSparkles' | 'LuCornerDownRight' | 'LuCalendar' | 'LuHeadset';
184
+
185
+ export declare interface BaseFormField {
186
+ name: string;
187
+ label: string;
188
+ isRequired?: boolean;
189
+ isHidden?: boolean;
190
+ description?: string;
191
+ }
192
+
193
+ declare type ChatAction = InvokeCallbackAction | OpenFormAction | OpenUrlAction;
194
+
195
+ export declare type ChatActionType = ChatAction['type'];
196
+
197
+ export declare interface ChatClearButtonClickedEvent {
198
+ eventName: 'chat_clear_button_clicked';
199
+ properties: {
200
+ conversationId: string;
201
+ };
202
+ }
203
+
204
+ export declare type ChatEvent = AssistantMessageReceivedEvent | AssistantAnswerDisplayedEvent | UserMessageSubmittedEvent | UserEscalationIndicatedEvent | SharedChatLoadedEvent | AssistantPositiveFeedbackSubmittedEvent | AssistantNegativeFeedbackSubmittedEvent | ChatClearButtonClickedEvent | AssistantMessageCopiedEvent | GetHelpOptionClickedEvent | ChatShareButtonClickedEvent | AssistantSourceItemClickedEvent | AssistantMessageLinkOpenedEvent | AssistantCodeBlockCopiedEvent;
205
+
206
+ export declare interface ChatShareButtonClickedEvent {
207
+ eventName: 'chat_share_button_clicked';
208
+ properties: {
209
+ sharedChatUrl: string;
210
+ sharedConversationId: string;
211
+ originalConversationId: string;
212
+ conversationId: string;
213
+ };
214
+ }
215
+
216
+ declare interface CheckboxField extends BaseFormField {
217
+ inputType: 'checkbox';
218
+ defaultValue?: boolean;
219
+ }
220
+
221
+ export declare const CITATION_ARTIFACT_TYPE = "citation";
222
+
223
+ export declare type CloseFormAction = 'return_to_chat' | 'close_modal';
224
+
225
+ export declare interface ColorModeConfig extends Omit<ColorModeProviderProps, 'children' | 'rootId' | 'shadowHostId'> {
226
+ /**
227
+ * Configuration for syncing the widget's color mode with an external element.
228
+ *
229
+ * This allows the widget to automatically match its color mode (light/dark) with your application's theme.
230
+ * The widget will observe changes to specified attributes on a target element and update its appearance accordingly.
231
+ *
232
+ * @example
233
+ * ```ts
234
+ * colorMode: {
235
+ * sync: {
236
+ * // Watch the document root for theme changes
237
+ * target: document.documentElement,
238
+ * // Monitor the data-theme attribute
239
+ * attributes: ['data-theme'],
240
+ * // Determine dark mode based on attribute value
241
+ * isDarkMode: (attrs) => attrs['data-theme'] === 'dark',
242
+ * // Optional callback when color mode changes
243
+ * onChange: (mode) => console.log('Color mode changed to:', mode)
244
+ * }
245
+ * }
246
+ * ```
247
+ */
248
+ sync?: SyncColorMode;
249
+ }
250
+
251
+ export declare interface ColorModeProviderProps {
252
+ /** List of all available colorMode names */
253
+ colorModes?: string[];
254
+ /** Forced colorMode name for the current page */
255
+ forcedColorMode?: string;
256
+ /** Whether to switch between dark and light colorModes based on prefers-color-scheme */
257
+ enableSystem?: boolean;
258
+ /** Disable all CSS transitions when switching colorModes */
259
+ disableTransitionOnChange?: boolean;
260
+ /** Whether to indicate to browsers which color scheme is used (dark or light) for built-in UI like inputs and buttons */
261
+ enableColorScheme?: boolean;
262
+ /** Key used to store colorMode setting in localStorage */
263
+ storageKey?: string;
264
+ /** Default colorMode name (for v0.0.12 and lower the default was light). If `enableSystem` is false, the default colorMode is light */
265
+ defaultColorMode?: string;
266
+ /** HTML attribute modified based on the active colorMode. Accepts `class` and `data-*` (meaning any data attribute, `data-mode`, `data-color`, etc.) */
267
+ attribute?: 'class' | (string & {});
268
+ /** Mapping of colorMode name to HTML attribute value. Object where key is the colorMode name and value is the attribute value */
269
+ value?: ValueObject;
270
+ /** Nonce string to pass to the inline script for CSP headers */
271
+ nonce?: string;
272
+ shadowHostId?: string;
273
+ rootId?: string;
274
+ children?: React.ReactNode;
275
+ }
276
+
277
+ declare interface CommonProperties {
278
+ conversationId: string;
279
+ componentType: any;
280
+ tags: string[];
281
+ }
282
+
283
+ export declare type ComponentsConfig<A extends Record<string, unknown>> = {
284
+ [K in keyof A]: (props: A[K], target: HTMLElement, context: null) => void | React.ReactNode;
285
+ } & {
286
+ IkpMessage?(props: {
287
+ message: Message;
288
+ renderComponent: (name: string, props: Record<string, unknown>) => React.ReactNode;
289
+ renderMarkdown: (text: string) => React.ReactNode;
290
+ }, target: HTMLElement, context: null): void | React.ReactNode;
291
+ };
292
+
293
+ export declare type CustomIconMap = {
294
+ [K in keyof CustomIcons]?: InkeepCustomIcon;
295
+ };
296
+
297
+ export declare interface CustomIcons {
298
+ search: string;
299
+ thumbsUp: string;
300
+ thumbsDown: string;
301
+ messageCopy: string;
302
+ messageCopied: string;
303
+ messageRevise: string;
304
+ codeCopy: string;
305
+ codeCopied: string;
306
+ openLinkInNewTab: string;
307
+ openLinkInSameTab: string;
308
+ newLine: string;
309
+ breadcrumbSeparator: string;
310
+ switchToSearch: string;
311
+ switchToChat: string;
312
+ chatSubmit: string;
313
+ close: string;
314
+ info: string;
315
+ command: string;
316
+ }
317
+
318
+ export declare type DataParts = {
319
+ operation: {
320
+ type: 'error' | 'agent_thinking' | 'agent_ready' | 'agent_initializing' | 'completion';
321
+ ctx: Record<string, unknown>;
322
+ };
323
+ summary: {
324
+ type: string;
325
+ label?: string;
326
+ details?: Record<string, unknown>;
327
+ };
328
+ component: {
329
+ type: 'text';
330
+ text?: string;
331
+ } | {
332
+ type: 'component';
333
+ name: string;
334
+ props: Record<string, unknown>;
335
+ };
336
+ artifact: {
337
+ artifactId: string;
338
+ taskId: string;
339
+ name: string;
340
+ description: string;
341
+ artifactType: string;
342
+ type: ArtifactType;
343
+ artifactSummary: {
344
+ record_type: 'custom_question_answer' | 'site';
345
+ title: string;
346
+ url?: string;
347
+ };
348
+ };
349
+ };
350
+
351
+ export declare type DeepPartial<T> = {
352
+ [P in keyof T]?: T[P] extends Record<string, unknown> ? DeepPartial<T[P]> : T[P];
353
+ };
354
+
355
+ export declare type EntityType = 'conversation' | 'message' | 'search';
356
+
357
+ declare type ExtendPropertiesWithCommon<T> = T extends {
358
+ properties: infer P;
359
+ } ? T & {
360
+ properties: P & CommonProperties;
361
+ } : T;
362
+
363
+ export declare type FeebackReason = {
364
+ label: string;
365
+ details: string;
366
+ };
367
+
368
+ export declare interface FeedbackBody {
369
+ type: FeedbackType;
370
+ messageId: string;
371
+ createdAt: string;
372
+ reasons?: {
373
+ label: string;
374
+ details: string;
375
+ }[] | null;
376
+ userProperties: UserProperties;
377
+ properties?: Record<string, unknown>;
378
+ }
379
+
380
+ export declare type FeedbackItemType = keyof MessageFeedback;
381
+
382
+ declare interface FeedbackProperties {
383
+ conversationId?: string;
384
+ reasons: FeebackReason[];
385
+ }
386
+
387
+ export declare type FeedbackType = 'positive' | 'negative';
388
+
389
+ export declare type FieldValues = Record<string, any>;
390
+
391
+ declare interface FileField extends BaseFormField {
392
+ inputType: 'file';
393
+ }
394
+
395
+ export declare type FilterQuery = Record<string, QueryCondition | QueryValue | QueryValue[]> | {
396
+ $and: FilterQuery[];
397
+ } | {
398
+ $or: FilterQuery[];
399
+ };
400
+
401
+ export declare type FormField = CheckboxField | FileField | SelectField | TextField | IncludeChatSessionField;
402
+
403
+ export declare type FormInputType = NonNullable<FormField['inputType']>;
404
+
405
+ export declare interface GetHelpOption {
406
+ icon?: InkeepCustomIcon;
407
+ name: string;
408
+ isPinnedToToolbar?: boolean;
409
+ action: ChatAction;
410
+ }
411
+
412
+ export declare interface GetHelpOptionClickedEvent {
413
+ eventName: 'get_help_option_clicked';
414
+ properties: {
415
+ getHelpOption: GetHelpOption;
416
+ conversationId?: string;
417
+ };
418
+ }
419
+
420
+ export declare interface Heading {
421
+ anchor?: string | null;
422
+ url?: string | null;
423
+ content: string;
424
+ isMatch?: boolean;
425
+ }
426
+
427
+ export declare type IkpChatAction = GetHelpOption | AnnotationAction;
428
+
429
+ export declare type IkpTheme = DeepPartial<StrictIkpTheme>;
430
+
431
+ export declare type IkpThemeCategory = keyof StrictIkpTheme;
432
+
433
+ export declare type IkpThemeEntry = [keyof IkpTheme, Record<string, unknown>][];
434
+
435
+ export declare interface IncludeChatSessionField extends BaseFormField {
436
+ _type: 'include_chat_session';
437
+ inputType?: 'checkbox';
438
+ defaultValue?: boolean;
439
+ }
440
+
441
+ export declare interface InkeepAIChatSettings {
442
+ /**
443
+ * Headers for requests
444
+ */
445
+ headers: Record<string, string>;
446
+ /**
447
+ * API key for requests
448
+ */
449
+ apiKey?: string;
450
+ /**
451
+ * Graph URL for chatstream API.
452
+ */
453
+ graphUrl?: string;
454
+ /**
455
+ * Context to be passed to the chatstream API.
456
+ */
457
+ context?: Record<string, unknown>;
458
+ /**
459
+ * The placeholder text to display in the chat input field when empty.
460
+ * Use this to provide guidance on what kind of questions users can ask.
461
+ * @example "Ask me anything about our API documentation..."
462
+ */
463
+ placeholder?: string;
464
+ /**
465
+ * A welcome message shown at the start of a new chat session.
466
+ * Supports markdown formatting for rich text styling.
467
+ * Use this to introduce the AI assistant's capabilities and set expectations.
468
+ * @example "👋 Hi! I'm here to help you with technical questions about our API..."
469
+ */
470
+ introMessage?: string;
471
+ /**
472
+ * The name of the product/service/topic that the chat assistant specializes in.
473
+ * This helps contextualize the chat experience for users.
474
+ * If not provided, defaults to the organization name from base settings.
475
+ * @example "MongoDB Atlas" or "React Router"
476
+ */
477
+ chatSubjectName?: string;
478
+ /**
479
+ * The display name for the AI assistant in the chat interface.
480
+ * Choose a name that reflects the assistant's role and your brand.
481
+ * @example "Atlas Assistant" or "DevBot"
482
+ */
483
+ aiAssistantName?: string;
484
+ /**
485
+ * URL to the AI assistant's avatar image.
486
+ * Should be a square image, recommended size 40x40px.
487
+ * Supports common image formats (PNG, JPG, SVG).
488
+ *
489
+ * You can pass a string or an object to configure for different color modes.
490
+ *
491
+ * @example
492
+ * {
493
+ * light: 'https://example.com/avatar-light.png',
494
+ * dark: 'https://example.com/avatar-dark.png',
495
+ * }
496
+ */
497
+ aiAssistantAvatar?: string | {
498
+ light: string;
499
+ dark: string;
500
+ };
501
+ /**
502
+ * URL to the user's avatar image in the chat interface.
503
+ * Should be a square image, recommended size 40x40px.
504
+ * Falls back to a default user icon if not provided.
505
+ */
506
+ userAvatar?: string;
507
+ /**
508
+ * Controls whether links in chat messages open in new browser tabs.
509
+ * Enable this to help users maintain their chat context when following links.
510
+ * @default true
511
+ */
512
+ shouldOpenLinksInNewTab?: boolean;
513
+ /**
514
+ * Custom heading text for the example questions section.
515
+ * Use this to better describe your suggested queries.
516
+ * @example "Common Questions" or "Try asking about..."
517
+ */
518
+ exampleQuestionsLabel?: string;
519
+ /**
520
+ * A list of pre-written questions users can click to quickly start a conversation.
521
+ * These should reflect common use cases and help users understand the AI assistant's capabilities.
522
+ * @example ["How do I reset my password?", "What are the API rate limits?"]
523
+ */
524
+ exampleQuestions?: string[];
525
+ /**
526
+ * Whether to visually emphasize the first example question.
527
+ * Use this to draw attention to the most important or common query.
528
+ */
529
+ isFirstExampleQuestionHighlighted?: boolean;
530
+ /**
531
+ * Enables the ability to share chat conversations via URL.
532
+ * Useful for allowing users to share helpful conversations with teammates.
533
+ */
534
+ isShareButtonVisible?: boolean;
535
+ /**
536
+ * The base URL path used when generating shareable chat links.
537
+ * Should match your application's routing structure.
538
+ * @example "/shared-chats/" or "/support/conversations/"
539
+ */
540
+ shareChatUrlBasePath?: string;
541
+ /**
542
+ * Controls the visibility of the copy chat button.
543
+ * Allows users to copy the entire chat transcript to their clipboard.
544
+ */
545
+ isCopyChatButtonVisible?: boolean;
546
+ /**
547
+ * Unique identifier for loading a specific conversation.
548
+ * Use this to restore a previous conversation state.
549
+ */
550
+ conversationId?: string;
551
+ /**
552
+ * When enabled, prevents users from sending new messages.
553
+ * Useful for displaying archived or shared chat sessions.
554
+ * @default false
555
+ */
556
+ isViewOnly?: boolean;
557
+ /**
558
+ * Whether to make conversations public by default.
559
+ * @default undefined (private)
560
+ */
561
+ conversationVisibility?: 'public' | 'private';
562
+ /**
563
+ * Configuration for the chat's disclaimer message.
564
+ * Use this to display important notices about AI limitations or data usage.
565
+ */
566
+ disclaimerSettings?: AIChatDisclaimerSettings;
567
+ /**
568
+ * Callback function triggered whenever the user modifies their input message.
569
+ * @param message The current content of the input field
570
+ */
571
+ onInputMessageChange?: (message: string) => void;
572
+ /**
573
+ * React ref for accessing the chat component's methods.
574
+ * Enables programmatic control of chat functions from parent components.
575
+ */
576
+ chatFunctionsRef?: React.Ref<AIChatFunctions>;
577
+ /**
578
+ * Array of actions available in the "Get Help" menu.
579
+ * Use this to provide alternative support options like contact forms or documentation links.
580
+ */
581
+ getHelpOptions?: GetHelpOption[];
582
+ /**
583
+ * Custom heading text for the workflows section.
584
+ * Use this to describe available automated processes or guided flows.
585
+ */
586
+ workflowsHeader?: string;
587
+ /**
588
+ * Collection of interactive workflows that can be triggered during chat.
589
+ * These can guide users through complex processes or data collection.
590
+ */
591
+ /**
592
+ * Custom labels for the chat interface's action buttons.
593
+ * Use this for internationalization or to better match your application's terminology.
594
+ */
595
+ toolbarButtonLabels?: AIChatToolbarButtonLabels;
596
+ /**
597
+ * Filters to apply to the chat results.
598
+ */
599
+ filters?: SearchAndChatFilters;
600
+ /**
601
+ * Components to be rendered in the chat interface.
602
+ */
603
+ components?: ComponentsConfig<any>;
604
+ artifacts?: ComponentsConfig<any>;
605
+ }
606
+
607
+ export declare interface InkeepBaseSettings {
608
+ /**
609
+ * The display name of your organization that will be shown in various UI elements.
610
+ * For example, this may appear in chat messages or headers.
611
+ */
612
+ organizationDisplayName?: string;
613
+ /**
614
+ * The primary brand color used throughout the widget UI.
615
+ * This color will be used to generate a cohesive color scheme.
616
+ * Should be provided as a valid CSS color value (hex, rgb, etc).
617
+ */
618
+ primaryBrandColor: string;
619
+ /**
620
+ * Settings to control the color mode (light/dark) behavior.
621
+ * Can be used to sync with your application's theme or set a forced color mode.
622
+ * @see ColorModeConfig type for detailed configuration options
623
+ */
624
+ colorMode?: ColorModeConfig;
625
+ /**
626
+ * Theme customization settings for the widget.
627
+ * Allows customizing colors, typography, component styles, and more.
628
+ */
629
+ theme?: UserTheme;
630
+ /**
631
+ * Custom icon overrides for the default icon set.
632
+ * Allows replacing any of the built-in icons with your own components.
633
+ */
634
+ customIcons?: CustomIconMap;
635
+ /**
636
+ * Properties to identify and provide context about the current user.
637
+ * Used for personalization and analytics tracking.
638
+ * @see UserProperties interface for available fields
639
+ */
640
+ userProperties?: UserProperties;
641
+ /**
642
+ * Authentication token for the current user.
643
+ * Used for authenticated API requests if required.
644
+ */
645
+ userAuthToken?: string;
646
+ /**
647
+ * Additional properties to be sent with analytics events.
648
+ * These properties will be merged with the event properties.
649
+ */
650
+ analyticsProperties?: Record<string, unknown>;
651
+ /**
652
+ * Handler for analytics events from the widget.
653
+ * @param event The analytics event object
654
+ */
655
+ onEvent?: (event: InkeepCallbackEvent) => Promise<void>;
656
+ /**
657
+ * Handler for feedback events from the widget.
658
+ * @param feedback The feedback object
659
+ */
660
+ onFeedback?: (feedback: InkeepFeedback & {
661
+ properties?: Record<string, unknown>;
662
+ }) => Promise<InkeepFeedback>;
663
+ /**
664
+ * Whether to bypass the captcha challenge. Only enable this flag if using a server side API type api key, otherwise the api requests will fail without the challenge solution.
665
+ * @default false
666
+ */
667
+ shouldBypassCaptcha?: boolean;
668
+ /**
669
+ * Function to transform source data before display.
670
+ * Allows customizing how source information is presented in the widget.
671
+ * @param source The original source data
672
+ * @returns The transformed source data
673
+ */
674
+ transformSource?: TransformSource;
675
+ /**
676
+ * Reference to the shadow DOM host element if using custom Shadow DOM.
677
+ * Required when embedding the widget within a Shadow DOM.
678
+ */
679
+ shadowHost?: HTMLElement | null;
680
+ /**
681
+ * Reference to the root element where the widget is mounted.
682
+ * Used for positioning and event handling.
683
+ */
684
+ rootElement?: HTMLElement | null;
685
+ /**
686
+ * Custom tags for widget identification.
687
+ * Used in analytics to segment and filter widget instances.
688
+ * Array of string identifiers.
689
+ */
690
+ tags?: string[];
691
+ /**
692
+ * Instance of the Prism syntax highlighting library.
693
+ * Required for code block syntax highlighting functionality.
694
+ */
695
+ prism?: any;
696
+ /**
697
+ * Query parameters to automatically append to URLs in the widget.
698
+ * Useful for tracking or maintaining context in navigation.
699
+ * Object mapping parameter names to values.
700
+ */
701
+ urlQueryParamsToAppend?: UrlQueryParam;
702
+ /**
703
+ * Base-level filters to apply to all search and chat operations.
704
+ * These are typically organization or user-level filters.
705
+ */
706
+ filters?: SearchAndChatFilters;
707
+ }
708
+
709
+ export declare type InkeepCallbackEvent = InkeepEventWithCommon;
710
+
711
+ export declare type InkeepComponentInitializer = {
712
+ (props: InkeepComponentProps): InkeepComponentInstance | undefined;
713
+ (targetSelector: string, props: InkeepComponentProps): InkeepComponentInstance | undefined;
714
+ };
715
+
716
+ /**
717
+ * Represents an instance of any Inkeep component that is returned after initialization.
718
+ * These instances have methods that can be used to update the component's state.
719
+ */
720
+ export declare interface InkeepComponentInstance {
721
+ /**
722
+ * Updates the component with new props
723
+ * @param newProps The new props to apply to the component
724
+ */
725
+ update: <T extends object>(newProps: T) => void;
726
+ /**
727
+ * Unmounts the component from the DOM but preserves its state
728
+ */
729
+ unmount: () => void;
730
+ /**
731
+ * Remounts a previously unmounted component
732
+ */
733
+ remount: () => void;
734
+ /**
735
+ * Access to chat-specific functionality (only available for components with chat capabilities)
736
+ */
737
+ chat?: {
738
+ [key: string]: (...args: any[]) => any;
739
+ };
740
+ /**
741
+ * Access to search-specific functionality (only available for components with search capabilities)
742
+ */
743
+ search?: {
744
+ [key: string]: (...args: any[]) => any;
745
+ };
746
+ }
747
+
748
+ export declare type InkeepComponentProps = InkeepSettings & {
749
+ [key: string]: any;
750
+ };
751
+
752
+ export declare interface InkeepConfig {
753
+ /**
754
+ * The prefix to use for the widget.
755
+ * @default 'ikp'
756
+ */
757
+ prefix?: string;
758
+ /* Excluded from this release type: componentType */
759
+ /**
760
+ * Configuration for the chat.
761
+ */
762
+ aiChatSettings: InkeepAIChatSettings & {
763
+ shouldAutoFocusInput?: boolean;
764
+ };
765
+ /**
766
+ * Configuration for the base settings.
767
+ */
768
+ baseSettings: InkeepBaseSettings;
769
+ /**
770
+ * Configuration for the search settings.
771
+ */
772
+ searchSettings: InkeepSearchSettings & {
773
+ shouldAutoFocusInput?: boolean;
774
+ };
775
+ }
776
+
777
+ export declare type InkeepCustomIcon = {
778
+ builtIn: AvailableBuiltInIcons;
779
+ } | {
780
+ custom: string;
781
+ };
782
+
783
+ export declare type InkeepEvent = SearchEvent | ChatEvent | WidgetEvent;
784
+
785
+ export declare type InkeepEventWithCommon = ExtendPropertiesWithCommon<InkeepEvent>;
786
+
787
+ export declare interface InkeepFeedback {
788
+ type: FeedbackType;
789
+ messageId: string;
790
+ reasons?: FeebackReason[];
791
+ }
792
+
793
+ export declare type InkeepJS = Partial<Record<InkeepJSComponent, InkeepComponentInitializer>>;
794
+
795
+ /**
796
+ * Represents the available Inkeep component types that can be rendered
797
+ * via the global Inkeep object.
798
+ */
799
+ export declare type InkeepJSComponent = 'EmbeddedChat' | 'EmbeddedSearch' | 'EmbeddedSearchAndChat' | 'ModalChat' | 'ModalSearch' | 'ModalSearchAndChat' | 'ChatButton' | 'SearchBar' | 'SidebarChat';
800
+
801
+ export declare interface InkeepModalSettings {
802
+ /**
803
+ * Controls whether the modal is open.
804
+ */
805
+ isOpen?: boolean;
806
+ /**
807
+ * Handler called when the modal opens or closes.
808
+ */
809
+ onOpenChange?: (isOpen: boolean) => void;
810
+ /**
811
+ * Whether the modal is open by default.
812
+ * @default false
813
+ */
814
+ defaultOpen?: boolean;
815
+ /**
816
+ * The shortcut key.
817
+ *
818
+ * The key to trigger the modal when pressed with Cmd (Mac) / Ctrl (Windows).
819
+ *
820
+ * Set to `null` to disable the shortcut.
821
+ *
822
+ * @default 'k'
823
+ */
824
+ shortcutKey?: string | null;
825
+ /**
826
+ * The trigger selector.
827
+ *
828
+ * The selector to trigger the modal when clicked.
829
+ *
830
+ * @default '[data-inkeep-modal-trigger]'
831
+ */
832
+ triggerSelector?: string;
833
+ }
834
+
835
+ export declare interface InkeepSearchSettings {
836
+ /**
837
+ * The placeholder text to use.
838
+ * @default
839
+ * 'Search anything...' (desktop)
840
+ * 'Search' (mobile)
841
+ */
842
+ placeholder?: string;
843
+ /**
844
+ * The default query to use.
845
+ * @default ''
846
+ */
847
+ defaultQuery?: string;
848
+ /**
849
+ * Callback for when the search query changes.
850
+ */
851
+ onQueryChange?: (query: string) => void;
852
+ /**
853
+ * Search callback function that handles all search functionality.
854
+ * This callback handles the complete search implementation.
855
+ * If not provided, the widget will warn and show no results.
856
+ *
857
+ * @param query - The search query string
858
+ * @param abortSignal - Signal to abort the search request
859
+ * @returns Promise that resolves with search results
860
+ */
861
+ onSearch?: (query: string, abortSignal: AbortSignal) => Promise<SourceItem[]>;
862
+ /**
863
+ * The time in milliseconds to wait triggering the search.
864
+ * @default 0
865
+ */
866
+ debounceTimeMs?: number;
867
+ /**
868
+ * Ref to the AIChat component's callable functions
869
+ */
870
+ searchFunctionsRef?: React.Ref<SearchFunctions>;
871
+ /**
872
+ * Controls whether links should open in a new tab.
873
+ * @default false
874
+ */
875
+ shouldOpenLinksInNewTab?: boolean;
876
+ /**
877
+ * Tabs to display in the search results, and in the **desired order**. Each tab can be either a string or a tuple of [string, options].
878
+ *
879
+ * Default tabs if none provided: All, Publications, PDFs, GitHub, Forums, Discord, Slack, StackOverflow
880
+ *
881
+ * Behavior:
882
+ * - Omit 'All' from tabs array to hide the All tab
883
+ * - Empty tabs array will show all results without tab UI
884
+ * - Tabs only appear when they have results, unless isAlwaysVisible is set
885
+ *
886
+ * @example
887
+ * ```ts
888
+ * // Basic tabs
889
+ * tabs: ['Publications', 'GitHub']
890
+ *
891
+ * // With isAlwaysVisible option
892
+ * tabs: [
893
+ * 'Publications',
894
+ * ['GitHub', { isAlwaysVisible: true }] // Shows even with no results
895
+ * ]
896
+ * ```
897
+ */
898
+ tabs?: (string | SearchTab)[];
899
+ /**
900
+ * The key to use for the search query parameter.
901
+ *
902
+ * When a user selects a search result, the query is added to the URL as a query parameter.
903
+ * This is the key of that query parameter.
904
+ *
905
+ */
906
+ searchQueryParamKey?: string;
907
+ /**
908
+ * The view to use for the search.
909
+ * @default 'single-pane'
910
+ */
911
+ view?: 'single-pane' | 'dual-pane';
912
+ }
913
+
914
+ export declare interface InkeepSettings {
915
+ baseSettings?: InkeepBaseSettings;
916
+ aiChatSettings?: InkeepAIChatSettings;
917
+ searchSettings?: InkeepSearchSettings;
918
+ modalSettings?: InkeepModalSettings;
919
+ }
920
+
921
+ export declare interface IntelligentFormButtons {
922
+ /** Callback function called when form is submitted */
923
+ submit: {
924
+ label?: string;
925
+ onSubmit: SubmitCallback;
926
+ };
927
+ }
928
+
929
+ export declare type IntelligentFormField = Exclude<FormField, IncludeChatSessionField> & {
930
+ /**
931
+ * Controls whether to prefill the field with the AI's response
932
+ */
933
+ shouldPrefillWithAI?: boolean;
934
+ };
935
+
936
+ export declare interface IntelligentFormSettings {
937
+ /**
938
+ * Primary form section that is always shown
939
+ */
940
+ primary: {
941
+ /** Array of form fields to display */
942
+ fields: IntelligentFormField[];
943
+ /** Optional description text shown above the fields */
944
+ description?: string;
945
+ };
946
+ /**
947
+ * Secondary form section that can be conditionally shown
948
+ */
949
+ secondary: {
950
+ /** Array of form fields to display */
951
+ fields: IntelligentFormField[];
952
+ /**
953
+ * Optional description text shown above the fields.
954
+ * Can be either a simple string or an object with different messages
955
+ * based on AI confidence level
956
+ */
957
+ description?: string | {
958
+ /** Default message shown when AI confidence is low/medium */
959
+ default: string;
960
+ /** Message shown when AI has high confidence */
961
+ confident: string;
962
+ };
963
+ };
964
+ /** Configuration for the success view shown after form submission */
965
+ successView: IntelligentFormSuccessView;
966
+ /** Configuration for the buttons shown in the form */
967
+ buttons: IntelligentFormButtons;
968
+ /** Optional name of the assistant shown in the form */
969
+ aiAssistantName?: string;
970
+ }
971
+
972
+ export declare interface IntelligentFormSuccessView {
973
+ heading: string;
974
+ message: string;
975
+ icon?: InkeepCustomIcon;
976
+ }
977
+
978
+ export declare interface InvokeCallbackAction {
979
+ type: 'invoke_callback';
980
+ callback: (args: InvokeCallbackArgs) => void;
981
+ shouldCloseModal?: boolean;
982
+ }
983
+
984
+ declare interface InvokeCallbackArgs {
985
+ conversation: {
986
+ id: string;
987
+ messages: Message[];
988
+ };
989
+ }
990
+
991
+ export declare interface JSONSchema {
992
+ $id?: string | undefined;
993
+ $comment?: string | undefined;
994
+ /**
995
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
996
+ */
997
+ type?: JSONSchemaTypeName | JSONSchemaTypeName[] | undefined;
998
+ enum?: JSONSchemaType[] | undefined;
999
+ const?: JSONSchemaType | undefined;
1000
+ /**
1001
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
1002
+ */
1003
+ multipleOf?: number | undefined;
1004
+ maximum?: number | undefined;
1005
+ exclusiveMaximum?: number | undefined;
1006
+ minimum?: number | undefined;
1007
+ exclusiveMinimum?: number | undefined;
1008
+ /**
1009
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
1010
+ */
1011
+ maxLength?: number | undefined;
1012
+ minLength?: number | undefined;
1013
+ pattern?: string | undefined;
1014
+ /**
1015
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
1016
+ */
1017
+ items?: JSONSchemaDefinition | JSONSchemaDefinition[] | undefined;
1018
+ additionalItems?: JSONSchemaDefinition | undefined;
1019
+ maxItems?: number | undefined;
1020
+ minItems?: number | undefined;
1021
+ uniqueItems?: boolean | undefined;
1022
+ contains?: JSONSchemaDefinition | undefined;
1023
+ /**
1024
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
1025
+ */
1026
+ maxProperties?: number | undefined;
1027
+ minProperties?: number | undefined;
1028
+ required?: string[] | undefined;
1029
+ properties?: {
1030
+ [key: string]: JSONSchemaDefinition;
1031
+ } | undefined;
1032
+ patternProperties?: {
1033
+ [key: string]: JSONSchemaDefinition;
1034
+ } | undefined;
1035
+ additionalProperties?: JSONSchemaDefinition | undefined;
1036
+ propertyNames?: JSONSchemaDefinition | undefined;
1037
+ /**
1038
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
1039
+ */
1040
+ if?: JSONSchemaDefinition | undefined;
1041
+ then?: JSONSchemaDefinition | undefined;
1042
+ else?: JSONSchemaDefinition | undefined;
1043
+ /**
1044
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
1045
+ */
1046
+ allOf?: JSONSchemaDefinition[] | undefined;
1047
+ anyOf?: JSONSchemaDefinition[] | undefined;
1048
+ oneOf?: JSONSchemaDefinition[] | undefined;
1049
+ not?: JSONSchemaDefinition | undefined;
1050
+ /**
1051
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
1052
+ */
1053
+ format?: string | undefined;
1054
+ /**
1055
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
1056
+ */
1057
+ title?: string | undefined;
1058
+ description?: string | undefined;
1059
+ default?: JSONSchemaType | undefined;
1060
+ readOnly?: boolean | undefined;
1061
+ writeOnly?: boolean | undefined;
1062
+ examples?: JSONSchemaType | undefined;
1063
+ }
1064
+
1065
+ export declare interface JSONSchemaArray extends Array<JSONSchemaType> {
1066
+ }
1067
+
1068
+ /**
1069
+ * JSON Schema v7
1070
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
1071
+ */
1072
+ export declare type JSONSchemaDefinition = JSONSchema | boolean;
1073
+
1074
+ export declare interface JSONSchemaObject {
1075
+ [key: string]: JSONSchemaType;
1076
+ }
1077
+
1078
+ /**
1079
+ * Primitive type
1080
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
1081
+ */
1082
+ export declare type JSONSchemaType = string | number | boolean | JSONSchemaObject | JSONSchemaArray | null;
1083
+
1084
+ /**
1085
+ * Primitive type
1086
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
1087
+ */
1088
+ export declare type JSONSchemaTypeName = ({} & string) | 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';
1089
+
1090
+ /**
1091
+ * Meta schema
1092
+ *
1093
+ * Recommended values:
1094
+ * - 'http://json-schema.org/schema#'
1095
+ * - 'http://json-schema.org/hyper-schema#'
1096
+ * - 'http://json-schema.org/draft-07/schema#'
1097
+ * - 'http://json-schema.org/draft-07/hyper-schema#'
1098
+ *
1099
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
1100
+ */
1101
+ export declare type JSONSchemaVersion = string;
1102
+
1103
+ export declare type Message = UIMessage<unknown, DataParts>;
1104
+
1105
+ export declare type MessageAction = 'copy' | 'upvote' | 'downvote';
1106
+
1107
+ export declare interface MessageAttachment {
1108
+ contentType: MessageAttachmentContentType;
1109
+ title: string;
1110
+ content: string;
1111
+ id: string;
1112
+ context?: string[];
1113
+ }
1114
+
1115
+ /**
1116
+ * MessageAttachmentContentType represents possible type of information that can be attached to a Workflow.
1117
+ */
1118
+ export declare type MessageAttachmentContentType = WorkflowCodeContentType | WorkflowTextContentType;
1119
+
1120
+ export declare interface MessageAttributes {
1121
+ attachments?: MessageAttachment[];
1122
+ workflow?: Workflow;
1123
+ }
1124
+
1125
+ export declare interface MessageFeedback {
1126
+ unrelated_response: boolean;
1127
+ inaccurate_statement: boolean;
1128
+ inaccurate_code_snippet: boolean;
1129
+ irrelevant_citations: boolean;
1130
+ }
1131
+
1132
+ export declare interface MessageMetadata {
1133
+ attributes?: MessageAttributes;
1134
+ context?: string;
1135
+ }
1136
+
1137
+ export declare interface ModalClosedEvent {
1138
+ eventName: 'modal_closed';
1139
+ properties: {};
1140
+ }
1141
+
1142
+ export declare interface ModalOpenedEvent {
1143
+ eventName: 'modal_opened';
1144
+ properties: {};
1145
+ }
1146
+
1147
+ export declare type ModalViewTypes = 'chat' | 'search';
1148
+
1149
+ export declare type OnToggleView = (opts: {
1150
+ view: ModalViewTypes;
1151
+ query?: string;
1152
+ autoSubmit?: boolean;
1153
+ }) => void;
1154
+
1155
+ export declare interface OpenFormAction {
1156
+ type: 'open_form';
1157
+ formSettings: AIChatFormSettings;
1158
+ }
1159
+
1160
+ export declare interface OpenUrlAction {
1161
+ type: 'open_link';
1162
+ url: string;
1163
+ }
1164
+
1165
+ declare type QueryCondition = {
1166
+ $eq: QueryValue;
1167
+ } | {
1168
+ $in: (number | string)[];
1169
+ };
1170
+
1171
+ declare type QueryValue = boolean | number | string;
1172
+
1173
+ export declare type RenderFn = ({ children, ssr, root, }: {
1174
+ children: ReactNode;
1175
+ ssr: boolean;
1176
+ root: ShadowRoot | null;
1177
+ }) => ReactNode;
1178
+
1179
+ export declare type Root = Record<string, ComponentType<HTMLProps<HTMLElement> & ShadowRootProps>>;
1180
+
1181
+ export declare interface SearchAndChatFilters {
1182
+ attributes?: {
1183
+ [key: string]: any;
1184
+ };
1185
+ }
1186
+
1187
+ export declare type SearchEvent = SearchQueryResponseReceivedEvent | SearchQuerySubmittedEvent | SearchResultClickedEvent;
1188
+
1189
+ export declare interface SearchFunctions {
1190
+ /**
1191
+ * Update the query.
1192
+ */
1193
+ updateQuery: (query: string) => void;
1194
+ /**
1195
+ * Focus the input.
1196
+ */
1197
+ focusInput: () => void;
1198
+ }
1199
+
1200
+ export declare interface SearchQueryResponseReceivedEvent {
1201
+ eventName: 'search_query_response_received';
1202
+ properties: {
1203
+ searchQuery: string;
1204
+ totalResults: number;
1205
+ };
1206
+ }
1207
+
1208
+ export declare interface SearchQuerySubmittedEvent {
1209
+ eventName: 'search_query_submitted';
1210
+ properties: {
1211
+ searchQuery: string;
1212
+ };
1213
+ }
1214
+
1215
+ export declare interface SearchResultClickedEvent {
1216
+ eventName: 'search_result_clicked';
1217
+ properties: {
1218
+ searchQuery: string;
1219
+ title?: string;
1220
+ url?: string;
1221
+ };
1222
+ }
1223
+
1224
+ export declare interface SearchTab {
1225
+ [0]: string;
1226
+ [1]: {
1227
+ isAlwaysVisible?: boolean;
1228
+ };
1229
+ }
1230
+
1231
+ declare interface SelectField extends BaseFormField {
1232
+ inputType: 'select';
1233
+ items: SelectItem[];
1234
+ defaultValue?: string;
1235
+ placeholder?: string;
1236
+ }
1237
+
1238
+ export declare interface SelectItem {
1239
+ label: string;
1240
+ value: string;
1241
+ }
1242
+
1243
+ export declare interface ShadowRootProps {
1244
+ mode?: 'closed' | 'open';
1245
+ delegatesFocus?: boolean;
1246
+ styleSheets?: CSSStyleSheet[];
1247
+ ssr?: boolean;
1248
+ children?: ReactNode;
1249
+ }
1250
+
1251
+ export declare interface SharedChatLoadedEvent {
1252
+ eventName: 'shared_chat_loaded';
1253
+ properties: {
1254
+ conversationId?: string;
1255
+ };
1256
+ }
1257
+
1258
+ export declare interface SourceItem {
1259
+ id?: string;
1260
+ title: string | undefined;
1261
+ url: string;
1262
+ description: string | undefined;
1263
+ breadcrumbs: string[];
1264
+ type: string;
1265
+ contentType?: string;
1266
+ tag?: string;
1267
+ tabs?: (SourceTab | string)[];
1268
+ headings?: Heading[];
1269
+ preview?: string;
1270
+ }
1271
+
1272
+ export declare interface SourceTab {
1273
+ [0]: string;
1274
+ [1]: {
1275
+ breadcrumbs: string[];
1276
+ };
1277
+ }
1278
+
1279
+ export declare interface StrictIkpTheme {
1280
+ colors: Record<string, any>;
1281
+ fontFamily: Record<string, string>;
1282
+ fontSize: Record<string, string>;
1283
+ zIndex: Record<string, string | number>;
1284
+ }
1285
+
1286
+ export declare interface Style {
1287
+ /**
1288
+ * A unique identifier for the style.
1289
+ * This is used to prevent duplicate styles and allow for style updates.
1290
+ *
1291
+ * @example
1292
+ * key: 'custom-button-styles'
1293
+ */
1294
+ key?: string;
1295
+ /**
1296
+ * The type of style to apply.
1297
+ * - 'link': Adds a <link> tag to load external resources like fonts or stylesheets
1298
+ * - 'style': Injects CSS directly into a <style> tag
1299
+ *
1300
+ * @example
1301
+ * type: 'link' // For loading external resources
1302
+ * type: 'style' // For inline CSS
1303
+ */
1304
+ type: 'link' | 'style';
1305
+ /**
1306
+ * The content of the style.
1307
+ * For type='link', this should be a valid URL to an external resource.
1308
+ * For type='style', this should be valid CSS code.
1309
+ *
1310
+ * @example
1311
+ * // For type='link':
1312
+ * value: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap'
1313
+ *
1314
+ * // For type='style':
1315
+ * value: `.custom-button {
1316
+ * background: blue;
1317
+ * color: white;
1318
+ * }`
1319
+ */
1320
+ value: string;
1321
+ }
1322
+
1323
+ export declare type SubmitCallback = (values: SubmitCallbackArgs) => Promise<void> | void;
1324
+
1325
+ export declare interface SubmitCallbackArgs {
1326
+ values: FieldValues;
1327
+ conversation?: {
1328
+ id: string;
1329
+ messages: Message[];
1330
+ };
1331
+ }
1332
+
1333
+ export declare interface SyncColorMode {
1334
+ /**
1335
+ * The HTML element to watch for color mode changes.
1336
+ * This element's attributes will be monitored for changes to determine the color mode.
1337
+ *
1338
+ * Common use cases include watching the document root or a specific app container.
1339
+ *
1340
+ * @example
1341
+ * ```ts
1342
+ * // Watch the document root element
1343
+ * target: document.documentElement
1344
+ *
1345
+ * // Watch a specific container element
1346
+ * target: document.querySelector('#app')
1347
+ *
1348
+ * // Watch a specific element by ID
1349
+ * target: '#app'
1350
+ * ```
1351
+ */
1352
+ target: HTMLElement | null | string;
1353
+ /**
1354
+ * The specific attributes to monitor for color mode changes.
1355
+ * The observer will only trigger when these attributes change on the target element.
1356
+ *
1357
+ * Common attributes used for theming include:
1358
+ * - data-theme: Custom theme attribute
1359
+ * - color-scheme: Standard CSS color scheme
1360
+ * - class: Class-based theming
1361
+ *
1362
+ * @example
1363
+ * ```ts
1364
+ * // Watch data-theme attribute
1365
+ * attributes: ['data-theme']
1366
+ *
1367
+ * // Watch color-scheme attribute
1368
+ * attributes: ['color-scheme']
1369
+ *
1370
+ * // Watch class changes
1371
+ * attributes: ['class']
1372
+ * ```
1373
+ */
1374
+ attributes: string[];
1375
+ /**
1376
+ * A function that determines if dark mode is active based on the target element's attributes.
1377
+ *
1378
+ * The function receives an object containing the current values of all monitored attributes,
1379
+ * where the keys are attribute names and values are the attribute values.
1380
+ *
1381
+ * @param attributes - Object containing the current values of monitored attributes
1382
+ * @returns boolean - True if dark mode is detected, false otherwise
1383
+ *
1384
+ * @example
1385
+ * ```ts
1386
+ * // Check data-theme attribute
1387
+ * isDarkMode: (attributes) => attributes['data-theme'] === 'dark'
1388
+ *
1389
+ * // Check class for dark mode
1390
+ * isDarkMode: (attributes) => /\bdark\b/.test(attributes['class'])
1391
+ *
1392
+ * // Check color-scheme
1393
+ * isDarkMode: (attributes) => attributes['color-scheme'] === 'dark'
1394
+ * ```
1395
+ */
1396
+ isDarkMode?: (attributes: Record<string, string | null>) => boolean;
1397
+ /**
1398
+ * Optional callback function that is invoked whenever the color mode changes.
1399
+ *
1400
+ * This can be used to perform side effects or sync the color mode with other parts of your application.
1401
+ *
1402
+ * @param colorMode - The new color mode value ('light' | 'dark')
1403
+ *
1404
+ * @example
1405
+ * ```ts
1406
+ * onChange: (colorMode) => {
1407
+ * console.log(`Color mode changed to: ${colorMode}`);
1408
+ * // Update other UI elements
1409
+ * }
1410
+ * ```
1411
+ */
1412
+ onChange?: (colorMode: string) => void;
1413
+ }
1414
+
1415
+ export declare interface SyntaxHighlighterTheme {
1416
+ lightTheme?: any;
1417
+ darkTheme?: any;
1418
+ }
1419
+
1420
+ declare interface TextField extends BaseFormField {
1421
+ inputType: 'email' | 'text' | 'textarea';
1422
+ defaultValue?: string;
1423
+ placeholder?: string;
1424
+ }
1425
+
1426
+ export declare interface TransformedSource {
1427
+ /**
1428
+ * ID of the source.
1429
+ */
1430
+ id?: string;
1431
+ /**
1432
+ * Title of the source.
1433
+ */
1434
+ title: string;
1435
+ /**
1436
+ * URL of the source.
1437
+ */
1438
+ url: string;
1439
+ /**
1440
+ * Description of the source.
1441
+ */
1442
+ description?: string;
1443
+ /**
1444
+ * Breadcrumbs for the source.
1445
+ *
1446
+ * @example
1447
+ * ```ts
1448
+ * breadcrumbs: ['Subpath', 'Page']
1449
+ * ```
1450
+ */
1451
+ breadcrumbs?: string[];
1452
+ /**
1453
+ * Tabs where this source shows up. (Only for searchResultsItem)
1454
+ *
1455
+ * @example
1456
+ * ```ts
1457
+ * tabs: ['Docs']
1458
+ * tabs: ['Docs', 'API']
1459
+ * ```
1460
+ * You can also specify different breadcrumbs for specific tab.
1461
+ * @example
1462
+ * ```ts
1463
+ * tabs: ['Docs', ['API', { breadcrumbs: ['Guides', 'API'] }]]
1464
+ * ```
1465
+ */
1466
+ tabs?: (SourceTab | string)[];
1467
+ /**
1468
+ * Icon of the source.
1469
+ *
1470
+ * @example
1471
+ * ```ts
1472
+ * icon: { builtIn: 'LuBookOpen' }
1473
+ * icon: { custom: 'https://example.com/icon.svg' }
1474
+ * ```
1475
+ */
1476
+ icon: InkeepCustomIcon;
1477
+ /**
1478
+ * Whether to open the source in a new tab.
1479
+ */
1480
+ shouldOpenInNewTab?: boolean;
1481
+ /**
1482
+ * Search query params to append to the URL.
1483
+ *
1484
+ * @example
1485
+ * If you want to know if the source is from chat or search, you can append the source type to the URL.
1486
+ * ```ts
1487
+ * appendToUrl: { from: 'chatSourceItem' }
1488
+ * ```
1489
+ */
1490
+ appendToUrl?: UrlQueryParam;
1491
+ /**
1492
+ * Type of the source.
1493
+ */
1494
+ type: string;
1495
+ /**
1496
+ * Tag to append to the source.
1497
+ */
1498
+ tag?: string;
1499
+ }
1500
+
1501
+ export declare type TransformSource = (source: SourceItem, type: TransformSourceType, opts?: TransformSourceOptions) => Partial<TransformedSource>;
1502
+
1503
+ export declare interface TransformSourceOptions {
1504
+ organizationDisplayName?: string;
1505
+ tabs?: InkeepSearchSettings['tabs'];
1506
+ }
1507
+
1508
+ export declare type TransformSourceType = 'chatSourceItem' | 'searchResultItem';
1509
+
1510
+ export declare type UrlQueryParam = Record<string, string>;
1511
+
1512
+ export declare interface UseColorModeProps {
1513
+ /** List of all available colorMode names */
1514
+ colorModes: string[];
1515
+ /** Forced colorMode name for the current page */
1516
+ forcedColorMode?: string;
1517
+ /** Update the colorMode */
1518
+ setColorMode: (colorMode: string) => void;
1519
+ /** Active colorMode name */
1520
+ colorMode?: string;
1521
+ /** If `enableSystem` is true and the active colorMode is "system", this returns whether the system preference resolved to "dark" or "light". Otherwise, identical to `colorMode` */
1522
+ resolvedColorMode?: string;
1523
+ /** If enableSystem is true, returns the System colorMode preference ("dark" or "light"), regardless what the active colorMode is */
1524
+ systemColorMode?: 'dark' | 'light';
1525
+ }
1526
+
1527
+ export declare interface UserEscalationIndicatedEvent {
1528
+ eventName: 'user_escalation_indicated';
1529
+ properties: {
1530
+ escalationType: 'downvote' | 'get_help_option' | 'contact_us' | 'support_form';
1531
+ getHelpOption?: GetHelpOption;
1532
+ getHelpOptionName?: string;
1533
+ conversationId?: string;
1534
+ };
1535
+ }
1536
+
1537
+ export declare interface UserMessageSubmittedEvent {
1538
+ eventName: 'user_message_submitted';
1539
+ properties: {
1540
+ conversationId?: string;
1541
+ };
1542
+ }
1543
+
1544
+ export declare type UserProperties = {
1545
+ /**
1546
+ * The user ID.
1547
+ */
1548
+ id?: string;
1549
+ /**
1550
+ * The user email.
1551
+ */
1552
+ email?: string;
1553
+ /**
1554
+ * The user name.
1555
+ */
1556
+ name?: string;
1557
+ /**
1558
+ * The user cohorts.
1559
+ */
1560
+ cohorts?: string[];
1561
+ } & Record<string, unknown>;
1562
+
1563
+ export declare interface UserProvidedColorScheme {
1564
+ textBold?: string;
1565
+ textSubtle?: string;
1566
+ lighter?: string;
1567
+ light?: string;
1568
+ lightSubtle?: string;
1569
+ medium?: string;
1570
+ mediumSubtle?: string;
1571
+ strongerLight?: string;
1572
+ strong?: string;
1573
+ stronger?: string;
1574
+ textColorOnPrimary?: string;
1575
+ }
1576
+
1577
+ export declare interface UserTheme extends Partial<IkpTheme> {
1578
+ /**
1579
+ * Whether to disable loading the default font.
1580
+ * @default false
1581
+ */
1582
+ disableLoadingDefaultFont?: boolean;
1583
+ /**
1584
+ * The syntax highlighter theme configuration for code blocks.
1585
+ * Allows setting different themes for light and dark modes.
1586
+ *
1587
+ * @example
1588
+ * ```ts
1589
+ * syntaxHighlighter: {
1590
+ * lightTheme: themes.github,
1591
+ * darkTheme: themes.dracula
1592
+ * }
1593
+ * ```
1594
+ */
1595
+ syntaxHighlighter?: SyntaxHighlighterTheme;
1596
+ /**
1597
+ * The primary colors used to generate the color scheme.
1598
+ * These colors will be used to create variations for different UI states.
1599
+ *
1600
+ * @example
1601
+ * ```ts
1602
+ * primaryColors: {
1603
+ * primary: '#26D6FF',
1604
+ * secondary: '#6366F1'
1605
+ * }
1606
+ * ```
1607
+ */
1608
+ primaryColors?: UserProvidedColorScheme;
1609
+ /**
1610
+ * The class name for the container that holds CSS variables.
1611
+ * This class will be added to a wrapper div that provides theming context.
1612
+ *
1613
+ * @default 'ikp-variables'
1614
+ */
1615
+ varsClassName?: string;
1616
+ /**
1617
+ * Custom styles to be injected into the widget.
1618
+ * Supports both inline styles and external stylesheets/resources.
1619
+ * Styles are uniquely identified by their key to prevent duplicates.
1620
+ *
1621
+ * @example
1622
+ * ```ts
1623
+ * styles: [
1624
+ * // External stylesheet or font
1625
+ * {
1626
+ * key: 'google-fonts',
1627
+ * type: 'link',
1628
+ * value: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap'
1629
+ * },
1630
+ * // Custom CSS rules
1631
+ * {
1632
+ * key: 'custom-theme',
1633
+ * type: 'style',
1634
+ * value: `
1635
+ * .ikp-ai-chat-message {
1636
+ * border-radius: 8px;
1637
+ * padding: 12px;
1638
+ * }
1639
+ * [data-theme='dark'] .ikp-ai-chat-message {
1640
+ * background: #2D3748;
1641
+ * }
1642
+ * `
1643
+ * }
1644
+ * ]
1645
+ * ```
1646
+ */
1647
+ styles?: Style[];
1648
+ }
1649
+
1650
+ /** Adapted from https://github.com/pacocoursey/next-theme/blob/a385b8d865bbb317ff73a5b6c1319ae566f7d6f1/src/types.ts */
1651
+ declare interface ValueObject {
1652
+ [colorModeName: string]: string;
1653
+ }
1654
+
1655
+ export declare type WidgetEvent = ModalOpenedEvent | ModalClosedEvent;
1656
+
1657
+ export declare interface WidgetView {
1658
+ /**
1659
+ * Callback fired when the user toggles between chat and search views.
1660
+ *
1661
+ * The parent component can use this
1662
+ * to coordinate showing/hiding the appropriate view.
1663
+ */
1664
+ onToggleView?: OnToggleView;
1665
+ /**
1666
+ * The label for the Ask AI button.
1667
+ */
1668
+ askAILabel?: string;
1669
+ /**
1670
+ * The label for the Search button.
1671
+ */
1672
+ searchLabel?: string;
1673
+ /**
1674
+ * The label for the Ask AI card.
1675
+ */
1676
+ askAICardLabel?: string;
1677
+ }
1678
+
1679
+ /**
1680
+ * Workflow defines the interaction steps for the AI bot.
1681
+ */
1682
+ export declare interface Workflow {
1683
+ id: string;
1684
+ displayName: string;
1685
+ goals: string[];
1686
+ informationToCollect: WorkflowInformationToCollect[];
1687
+ botPersona?: string;
1688
+ context?: string[];
1689
+ guidance?: string[];
1690
+ initialReplyMessage: string;
1691
+ supportedInputs?: WorkflowInputTypes[];
1692
+ }
1693
+
1694
+ /**
1695
+ * BaseType is a base interface for data types.
1696
+ */
1697
+ declare interface WorkflowBaseContentType {
1698
+ type: string;
1699
+ contentInputLabel: string;
1700
+ attachmentIcon?: InkeepCustomIcon;
1701
+ }
1702
+
1703
+ /**
1704
+ * WorkflowInputType defines the type of attachments in a Workflow.
1705
+ */
1706
+ export declare interface WorkflowBaseInputTypes {
1707
+ id: string;
1708
+ type: string;
1709
+ displayName: string;
1710
+ }
1711
+
1712
+ export declare interface WorkflowCodeContentType extends WorkflowBaseContentType {
1713
+ type: 'CODE';
1714
+ language: string;
1715
+ }
1716
+
1717
+ /**
1718
+ * WorkflowFunctionalMultiInput represents a function to be called when the attachment is invoked.
1719
+ */
1720
+ export declare interface WorkflowFunctionalMultiInput extends WorkflowBaseInputTypes {
1721
+ type: 'FUNCTIONAL_MULTI_ATTACHMENT';
1722
+ onInvoke: (workflow: Workflow, selectedInputType: WorkflowInputTypes, callback: (messageAttachments: MessageAttachment[]) => void, currentMessageAttachments: MessageAttachment[]) => void;
1723
+ }
1724
+
1725
+ export declare interface WorkflowInformationToCollect {
1726
+ description: string;
1727
+ required: boolean;
1728
+ }
1729
+
1730
+ /**
1731
+ * WorkflowInputTypes represents possible ways of collecting attachments in a Workflow.
1732
+ */
1733
+ export declare type WorkflowInputTypes = WorkflowFunctionalMultiInput | WorkflowModalSingleInput;
1734
+
1735
+ export declare interface WorkflowModalProps {
1736
+ titleInputLabel?: string;
1737
+ modalHelpText?: string;
1738
+ modalHelpElement?: React.ReactElement;
1739
+ }
1740
+
1741
+ /**
1742
+ * WorkflowModalSingleInput represents a modal input type.
1743
+ */
1744
+ export declare interface WorkflowModalSingleInput extends WorkflowBaseInputTypes {
1745
+ type: 'MODAL';
1746
+ contentType: MessageAttachmentContentType;
1747
+ workflowModalProps?: WorkflowModalProps;
1748
+ }
1749
+
1750
+ export declare interface WorkflowTextContentType extends WorkflowBaseContentType {
1751
+ type: 'text';
1752
+ }
1753
+
1754
+ export { }