@inkeep/cxkit-primitives 0.0.0-dev-20250221234142

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 (477) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/atoms/api/analytics/conversation.cjs +1 -0
  4. package/dist/atoms/api/analytics/conversation.d.cts +3 -0
  5. package/dist/atoms/api/analytics/conversation.d.ts +3 -0
  6. package/dist/atoms/api/analytics/conversation.js +37 -0
  7. package/dist/atoms/api/analytics/events.cjs +1 -0
  8. package/dist/atoms/api/analytics/events.d.cts +2 -0
  9. package/dist/atoms/api/analytics/events.d.ts +2 -0
  10. package/dist/atoms/api/analytics/events.js +30 -0
  11. package/dist/atoms/api/analytics/feedback.cjs +1 -0
  12. package/dist/atoms/api/analytics/feedback.d.cts +11 -0
  13. package/dist/atoms/api/analytics/feedback.d.ts +11 -0
  14. package/dist/atoms/api/analytics/feedback.js +26 -0
  15. package/dist/atoms/avatars/ai.cjs +1 -0
  16. package/dist/atoms/avatars/ai.d.cts +3 -0
  17. package/dist/atoms/avatars/ai.d.ts +3 -0
  18. package/dist/atoms/avatars/ai.js +88 -0
  19. package/dist/atoms/avatars/user.cjs +1 -0
  20. package/dist/atoms/avatars/user.d.cts +3 -0
  21. package/dist/atoms/avatars/user.d.ts +3 -0
  22. package/dist/atoms/avatars/user.js +27 -0
  23. package/dist/atoms/codeblock/index.cjs +1 -0
  24. package/dist/atoms/codeblock/index.d.cts +10 -0
  25. package/dist/atoms/codeblock/index.d.ts +10 -0
  26. package/dist/atoms/codeblock/index.js +40 -0
  27. package/dist/atoms/custom-styles.cjs +1 -0
  28. package/dist/atoms/custom-styles.d.cts +5 -0
  29. package/dist/atoms/custom-styles.d.ts +5 -0
  30. package/dist/atoms/custom-styles.js +57 -0
  31. package/dist/atoms/dialog.cjs +1 -0
  32. package/dist/atoms/dialog.d.cts +68 -0
  33. package/dist/atoms/dialog.d.ts +68 -0
  34. package/dist/atoms/dialog.js +185 -0
  35. package/dist/atoms/icons/built-in-icon-renderer.cjs +1 -0
  36. package/dist/atoms/icons/built-in-icon-renderer.d.cts +6 -0
  37. package/dist/atoms/icons/built-in-icon-renderer.d.ts +6 -0
  38. package/dist/atoms/icons/built-in-icon-renderer.js +49 -0
  39. package/dist/atoms/icons/built-in-icons.cjs +1 -0
  40. package/dist/atoms/icons/built-in-icons.d.cts +72 -0
  41. package/dist/atoms/icons/built-in-icons.d.ts +72 -0
  42. package/dist/atoms/icons/built-in-icons.js +79 -0
  43. package/dist/atoms/icons/checkbox-icon.cjs +1 -0
  44. package/dist/atoms/icons/checkbox-icon.d.cts +1 -0
  45. package/dist/atoms/icons/checkbox-icon.d.ts +1 -0
  46. package/dist/atoms/icons/checkbox-icon.js +24 -0
  47. package/dist/atoms/icons/custom-icon.cjs +1 -0
  48. package/dist/atoms/icons/custom-icon.d.cts +6 -0
  49. package/dist/atoms/icons/custom-icon.d.ts +6 -0
  50. package/dist/atoms/icons/custom-icon.js +19 -0
  51. package/dist/atoms/icons/index.cjs +1 -0
  52. package/dist/atoms/icons/index.d.cts +2 -0
  53. package/dist/atoms/icons/index.d.ts +2 -0
  54. package/dist/atoms/icons/index.js +6 -0
  55. package/dist/atoms/icons/inkeep-default-icons.cjs +1 -0
  56. package/dist/atoms/icons/inkeep-default-icons.d.cts +2 -0
  57. package/dist/atoms/icons/inkeep-default-icons.d.ts +2 -0
  58. package/dist/atoms/icons/inkeep-default-icons.js +23 -0
  59. package/dist/atoms/link.cjs +1 -0
  60. package/dist/atoms/link.d.cts +14 -0
  61. package/dist/atoms/link.d.ts +14 -0
  62. package/dist/atoms/link.js +35 -0
  63. package/dist/atoms/markdown/components.cjs +1 -0
  64. package/dist/atoms/markdown/components.d.cts +27 -0
  65. package/dist/atoms/markdown/components.d.ts +27 -0
  66. package/dist/atoms/markdown/components.js +64 -0
  67. package/dist/atoms/markdown/index.cjs +1 -0
  68. package/dist/atoms/markdown/index.d.cts +15 -0
  69. package/dist/atoms/markdown/index.d.ts +15 -0
  70. package/dist/atoms/markdown/index.js +79 -0
  71. package/dist/atoms/markdown/rehype-inline-code-property.cjs +1 -0
  72. package/dist/atoms/markdown/rehype-inline-code-property.d.cts +1 -0
  73. package/dist/atoms/markdown/rehype-inline-code-property.d.ts +1 -0
  74. package/dist/atoms/markdown/rehype-inline-code-property.js +12 -0
  75. package/dist/atoms/portal-with-theme.cjs +1 -0
  76. package/dist/atoms/portal-with-theme.d.cts +2 -0
  77. package/dist/atoms/portal-with-theme.d.ts +2 -0
  78. package/dist/atoms/portal-with-theme.js +12 -0
  79. package/dist/atoms/portal.cjs +1 -0
  80. package/dist/atoms/portal.d.cts +8 -0
  81. package/dist/atoms/portal.d.ts +8 -0
  82. package/dist/atoms/portal.js +19 -0
  83. package/dist/atoms/shadow/context.cjs +2 -0
  84. package/dist/atoms/shadow/context.d.cts +14 -0
  85. package/dist/atoms/shadow/context.d.ts +14 -0
  86. package/dist/atoms/shadow/context.js +55 -0
  87. package/dist/atoms/shadow/create.cjs +1 -0
  88. package/dist/atoms/shadow/create.d.cts +8 -0
  89. package/dist/atoms/shadow/create.d.ts +8 -0
  90. package/dist/atoms/shadow/create.js +56 -0
  91. package/dist/atoms/shadow/index.d.cts +1 -0
  92. package/dist/atoms/shadow/index.d.ts +1 -0
  93. package/dist/atoms/shadow/root.cjs +1 -0
  94. package/dist/atoms/shadow/root.d.cts +5 -0
  95. package/dist/atoms/shadow/root.d.ts +5 -0
  96. package/dist/atoms/shadow/root.js +22 -0
  97. package/dist/atoms/shadow/use-ensured-forwarded-ref.cjs +1 -0
  98. package/dist/atoms/shadow/use-ensured-forwarded-ref.d.cts +2 -0
  99. package/dist/atoms/shadow/use-ensured-forwarded-ref.d.ts +2 -0
  100. package/dist/atoms/shadow/use-ensured-forwarded-ref.js +11 -0
  101. package/dist/atoms/shadow/utils.cjs +1 -0
  102. package/dist/atoms/shadow/utils.d.cts +9 -0
  103. package/dist/atoms/shadow/utils.d.ts +9 -0
  104. package/dist/atoms/shadow/utils.js +16 -0
  105. package/dist/components/chat-button.cjs +1 -0
  106. package/dist/components/chat-button.d.cts +11 -0
  107. package/dist/components/chat-button.d.ts +11 -0
  108. package/dist/components/chat-button.js +42 -0
  109. package/dist/components/embedded-chat/chat-provider.cjs +1 -0
  110. package/dist/components/embedded-chat/chat-provider.d.cts +19 -0
  111. package/dist/components/embedded-chat/chat-provider.d.ts +19 -0
  112. package/dist/components/embedded-chat/chat-provider.js +22 -0
  113. package/dist/components/embedded-chat/use-captcha.cjs +1 -0
  114. package/dist/components/embedded-chat/use-captcha.d.cts +13 -0
  115. package/dist/components/embedded-chat/use-captcha.d.ts +13 -0
  116. package/dist/components/embedded-chat/use-captcha.js +56 -0
  117. package/dist/components/embedded-chat/use-chat-action.cjs +1 -0
  118. package/dist/components/embedded-chat/use-chat-action.d.cts +9 -0
  119. package/dist/components/embedded-chat/use-chat-action.d.ts +9 -0
  120. package/dist/components/embedded-chat/use-chat-action.js +26 -0
  121. package/dist/components/embedded-chat/use-inkeep-chat.cjs +4 -0
  122. package/dist/components/embedded-chat/use-inkeep-chat.d.cts +25 -0
  123. package/dist/components/embedded-chat/use-inkeep-chat.d.ts +25 -0
  124. package/dist/components/embedded-chat/use-inkeep-chat.js +227 -0
  125. package/dist/components/embedded-chat.cjs +17 -0
  126. package/dist/components/embedded-chat.d.cts +415 -0
  127. package/dist/components/embedded-chat.d.ts +415 -0
  128. package/dist/components/embedded-chat.js +1840 -0
  129. package/dist/components/embedded-search/search-provider.cjs +1 -0
  130. package/dist/components/embedded-search/search-provider.d.cts +21 -0
  131. package/dist/components/embedded-search/search-provider.d.ts +21 -0
  132. package/dist/components/embedded-search/search-provider.js +19 -0
  133. package/dist/components/embedded-search/search-query.graphql.cjs +82 -0
  134. package/dist/components/embedded-search/search-query.graphql.js +86 -0
  135. package/dist/components/embedded-search/transform-results.cjs +1 -0
  136. package/dist/components/embedded-search/transform-results.d.cts +3 -0
  137. package/dist/components/embedded-search/transform-results.d.ts +3 -0
  138. package/dist/components/embedded-search/transform-results.js +113 -0
  139. package/dist/components/embedded-search/use-inkeep-search.cjs +1 -0
  140. package/dist/components/embedded-search/use-inkeep-search.d.cts +21 -0
  141. package/dist/components/embedded-search/use-inkeep-search.d.ts +21 -0
  142. package/dist/components/embedded-search/use-inkeep-search.js +137 -0
  143. package/dist/components/embedded-search.cjs +1 -0
  144. package/dist/components/embedded-search.d.cts +229 -0
  145. package/dist/components/embedded-search.d.ts +229 -0
  146. package/dist/components/embedded-search.js +390 -0
  147. package/dist/components/factory.cjs +1 -0
  148. package/dist/components/factory.d.cts +19 -0
  149. package/dist/components/factory.d.ts +19 -0
  150. package/dist/components/factory.js +39 -0
  151. package/dist/components/index.cjs +1 -0
  152. package/dist/components/index.d.cts +11 -0
  153. package/dist/components/index.d.ts +11 -0
  154. package/dist/components/index.js +31 -0
  155. package/dist/components/intelligent-form/actions/context-model-response.cjs +9 -0
  156. package/dist/components/intelligent-form/actions/context-model-response.d.cts +10 -0
  157. package/dist/components/intelligent-form/actions/context-model-response.d.ts +10 -0
  158. package/dist/components/intelligent-form/actions/context-model-response.js +36 -0
  159. package/dist/components/intelligent-form/actions/escalation-schema.cjs +1 -0
  160. package/dist/components/intelligent-form/actions/escalation-schema.d.cts +2 -0
  161. package/dist/components/intelligent-form/actions/escalation-schema.d.ts +2 -0
  162. package/dist/components/intelligent-form/actions/escalation-schema.js +48 -0
  163. package/dist/components/intelligent-form/actions/qa-model-messages.cjs +27 -0
  164. package/dist/components/intelligent-form/actions/qa-model-messages.d.cts +2 -0
  165. package/dist/components/intelligent-form/actions/qa-model-messages.d.ts +2 -0
  166. package/dist/components/intelligent-form/actions/qa-model-messages.js +45 -0
  167. package/dist/components/intelligent-form/actions/qa-model-response.cjs +1 -0
  168. package/dist/components/intelligent-form/actions/qa-model-response.d.cts +14 -0
  169. package/dist/components/intelligent-form/actions/qa-model-response.d.ts +14 -0
  170. package/dist/components/intelligent-form/actions/qa-model-response.js +46 -0
  171. package/dist/components/intelligent-form/intelligent-form-provider.cjs +1 -0
  172. package/dist/components/intelligent-form/intelligent-form-provider.d.cts +29 -0
  173. package/dist/components/intelligent-form/intelligent-form-provider.d.ts +29 -0
  174. package/dist/components/intelligent-form/intelligent-form-provider.js +23 -0
  175. package/dist/components/intelligent-form/use-inkeep-intelligent-form.cjs +1 -0
  176. package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.cts +30 -0
  177. package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.ts +30 -0
  178. package/dist/components/intelligent-form/use-inkeep-intelligent-form.js +157 -0
  179. package/dist/components/intelligent-form.cjs +1 -0
  180. package/dist/components/intelligent-form.d.cts +135 -0
  181. package/dist/components/intelligent-form.d.ts +135 -0
  182. package/dist/components/intelligent-form.js +568 -0
  183. package/dist/components/modal/modal-provider.cjs +1 -0
  184. package/dist/components/modal/modal-provider.d.cts +13 -0
  185. package/dist/components/modal/modal-provider.d.ts +13 -0
  186. package/dist/components/modal/modal-provider.js +8 -0
  187. package/dist/components/modal/use-inkeep-modal.cjs +1 -0
  188. package/dist/components/modal/use-inkeep-modal.d.cts +8 -0
  189. package/dist/components/modal/use-inkeep-modal.d.ts +8 -0
  190. package/dist/components/modal/use-inkeep-modal.js +30 -0
  191. package/dist/components/modal.cjs +1 -0
  192. package/dist/components/modal.d.cts +18 -0
  193. package/dist/components/modal.d.ts +18 -0
  194. package/dist/components/modal.js +40 -0
  195. package/dist/components/searchbar.cjs +1 -0
  196. package/dist/components/searchbar.d.cts +23 -0
  197. package/dist/components/searchbar.d.ts +23 -0
  198. package/dist/components/searchbar.js +54 -0
  199. package/dist/components/tagline-logo-icon.cjs +1 -0
  200. package/dist/components/tagline-logo-icon.d.cts +1 -0
  201. package/dist/components/tagline-logo-icon.d.ts +1 -0
  202. package/dist/components/tagline-logo-icon.js +34 -0
  203. package/dist/hooks/index.cjs +1 -0
  204. package/dist/hooks/index.d.cts +12 -0
  205. package/dist/hooks/index.d.ts +12 -0
  206. package/dist/hooks/index.js +27 -0
  207. package/dist/hooks/use-boolean.cjs +1 -0
  208. package/dist/hooks/use-boolean.d.cts +10 -0
  209. package/dist/hooks/use-boolean.d.ts +10 -0
  210. package/dist/hooks/use-boolean.js +17 -0
  211. package/dist/hooks/use-browser-storage.cjs +1 -0
  212. package/dist/hooks/use-browser-storage.d.cts +17 -0
  213. package/dist/hooks/use-browser-storage.d.ts +17 -0
  214. package/dist/hooks/use-browser-storage.js +88 -0
  215. package/dist/hooks/use-component-classnames.cjs +1 -0
  216. package/dist/hooks/use-component-classnames.d.cts +6 -0
  217. package/dist/hooks/use-component-classnames.d.ts +6 -0
  218. package/dist/hooks/use-component-classnames.js +14 -0
  219. package/dist/hooks/use-container-size.cjs +1 -0
  220. package/dist/hooks/use-container-size.d.cts +5 -0
  221. package/dist/hooks/use-container-size.d.ts +5 -0
  222. package/dist/hooks/use-container-size.js +18 -0
  223. package/dist/hooks/use-copy-to-clipboard.cjs +1 -0
  224. package/dist/hooks/use-copy-to-clipboard.d.cts +3 -0
  225. package/dist/hooks/use-copy-to-clipboard.d.ts +3 -0
  226. package/dist/hooks/use-copy-to-clipboard.js +19 -0
  227. package/dist/hooks/use-instant-update.cjs +1 -0
  228. package/dist/hooks/use-instant-update.d.cts +17 -0
  229. package/dist/hooks/use-instant-update.d.ts +17 -0
  230. package/dist/hooks/use-instant-update.js +16 -0
  231. package/dist/hooks/use-is-mounted.cjs +1 -0
  232. package/dist/hooks/use-is-mounted.d.cts +1 -0
  233. package/dist/hooks/use-is-mounted.d.ts +1 -0
  234. package/dist/hooks/use-is-mounted.js +11 -0
  235. package/dist/hooks/use-media-query.cjs +1 -0
  236. package/dist/hooks/use-media-query.d.cts +1 -0
  237. package/dist/hooks/use-media-query.d.ts +1 -0
  238. package/dist/hooks/use-media-query.js +14 -0
  239. package/dist/hooks/use-resize-observer.cjs +1 -0
  240. package/dist/hooks/use-resize-observer.d.cts +12 -0
  241. package/dist/hooks/use-resize-observer.d.ts +12 -0
  242. package/dist/hooks/use-resize-observer.js +32 -0
  243. package/dist/hooks/use-scroll-to-bottom.cjs +1 -0
  244. package/dist/hooks/use-scroll-to-bottom.d.cts +13 -0
  245. package/dist/hooks/use-scroll-to-bottom.d.ts +13 -0
  246. package/dist/hooks/use-scroll-to-bottom.js +52 -0
  247. package/dist/hooks/use-scrolling-fades.cjs +1 -0
  248. package/dist/hooks/use-scrolling-fades.d.cts +2 -0
  249. package/dist/hooks/use-scrolling-fades.d.ts +2 -0
  250. package/dist/hooks/use-scrolling-fades.js +18 -0
  251. package/dist/hooks/use-settle-action.cjs +1 -0
  252. package/dist/hooks/use-settle-action.d.cts +3 -0
  253. package/dist/hooks/use-settle-action.d.ts +3 -0
  254. package/dist/hooks/use-settle-action.js +11 -0
  255. package/dist/index.cjs +1 -0
  256. package/dist/index.d.cts +11 -0
  257. package/dist/index.d.ts +11 -0
  258. package/dist/index.js +152 -0
  259. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fa6/index.cjs +1 -0
  260. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fa6/index.js +92 -0
  261. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fi/index.cjs +1 -0
  262. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fi/index.js +8 -0
  263. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/hi2/index.cjs +1 -0
  264. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/hi2/index.js +8 -0
  265. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.cjs +1 -0
  266. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.js +128 -0
  267. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconBase.cjs +1 -0
  268. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconBase.js +109 -0
  269. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconContext.cjs +1 -0
  270. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconContext.js +13 -0
  271. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.cjs +1 -0
  272. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.js +68 -0
  273. package/dist/providers/attachment-item-provider.cjs +1 -0
  274. package/dist/providers/attachment-item-provider.d.cts +9 -0
  275. package/dist/providers/attachment-item-provider.d.ts +9 -0
  276. package/dist/providers/attachment-item-provider.js +13 -0
  277. package/dist/providers/attachments-bar-provider.cjs +1 -0
  278. package/dist/providers/attachments-bar-provider.d.cts +30 -0
  279. package/dist/providers/attachments-bar-provider.d.ts +30 -0
  280. package/dist/providers/attachments-bar-provider.js +64 -0
  281. package/dist/providers/base-events-provider.cjs +1 -0
  282. package/dist/providers/base-events-provider.d.cts +8 -0
  283. package/dist/providers/base-events-provider.d.ts +8 -0
  284. package/dist/providers/base-events-provider.js +39 -0
  285. package/dist/providers/chat-events-provider.cjs +1 -0
  286. package/dist/providers/chat-events-provider.d.cts +12 -0
  287. package/dist/providers/chat-events-provider.d.ts +12 -0
  288. package/dist/providers/chat-events-provider.js +66 -0
  289. package/dist/providers/chat-form-provider.cjs +1 -0
  290. package/dist/providers/chat-form-provider.d.cts +23 -0
  291. package/dist/providers/chat-form-provider.d.ts +23 -0
  292. package/dist/providers/chat-form-provider.js +66 -0
  293. package/dist/providers/config-provider.cjs +1 -0
  294. package/dist/providers/config-provider.d.cts +24 -0
  295. package/dist/providers/config-provider.d.ts +24 -0
  296. package/dist/providers/config-provider.js +37 -0
  297. package/dist/providers/conversation-provider.cjs +1 -0
  298. package/dist/providers/conversation-provider.d.cts +12 -0
  299. package/dist/providers/conversation-provider.d.ts +12 -0
  300. package/dist/providers/conversation-provider.js +49 -0
  301. package/dist/providers/feedback-item-provider.cjs +1 -0
  302. package/dist/providers/feedback-item-provider.d.cts +10 -0
  303. package/dist/providers/feedback-item-provider.d.ts +10 -0
  304. package/dist/providers/feedback-item-provider.js +16 -0
  305. package/dist/providers/feedback-provider.cjs +1 -0
  306. package/dist/providers/feedback-provider.d.cts +19 -0
  307. package/dist/providers/feedback-provider.d.ts +19 -0
  308. package/dist/providers/feedback-provider.js +82 -0
  309. package/dist/providers/form-field-provider.cjs +1 -0
  310. package/dist/providers/form-field-provider.d.cts +15 -0
  311. package/dist/providers/form-field-provider.d.ts +15 -0
  312. package/dist/providers/form-field-provider.js +17 -0
  313. package/dist/providers/help-menu-provider.cjs +1 -0
  314. package/dist/providers/help-menu-provider.d.cts +11 -0
  315. package/dist/providers/help-menu-provider.d.ts +11 -0
  316. package/dist/providers/help-menu-provider.js +19 -0
  317. package/dist/providers/index.cjs +1 -0
  318. package/dist/providers/index.d.cts +19 -0
  319. package/dist/providers/index.d.ts +19 -0
  320. package/dist/providers/index.js +63 -0
  321. package/dist/providers/intelligent-form-field-provider.cjs +1 -0
  322. package/dist/providers/intelligent-form-field-provider.d.cts +15 -0
  323. package/dist/providers/intelligent-form-field-provider.d.ts +15 -0
  324. package/dist/providers/intelligent-form-field-provider.js +19 -0
  325. package/dist/providers/markdown-provider.cjs +1 -0
  326. package/dist/providers/markdown-provider.d.cts +9 -0
  327. package/dist/providers/markdown-provider.d.ts +9 -0
  328. package/dist/providers/markdown-provider.js +8 -0
  329. package/dist/providers/message-attachments-provider.cjs +1 -0
  330. package/dist/providers/message-attachments-provider.d.cts +13 -0
  331. package/dist/providers/message-attachments-provider.d.ts +13 -0
  332. package/dist/providers/message-attachments-provider.js +27 -0
  333. package/dist/providers/message-provider.cjs +1 -0
  334. package/dist/providers/message-provider.d.cts +10 -0
  335. package/dist/providers/message-provider.d.ts +10 -0
  336. package/dist/providers/message-provider.js +14 -0
  337. package/dist/providers/root-provider.cjs +1 -0
  338. package/dist/providers/root-provider.d.cts +8 -0
  339. package/dist/providers/root-provider.d.ts +8 -0
  340. package/dist/providers/root-provider.js +21 -0
  341. package/dist/providers/search-events-provider.cjs +1 -0
  342. package/dist/providers/search-events-provider.d.cts +11 -0
  343. package/dist/providers/search-events-provider.d.ts +11 -0
  344. package/dist/providers/search-events-provider.js +18 -0
  345. package/dist/providers/source-item-provider.cjs +1 -0
  346. package/dist/providers/source-item-provider.d.cts +12 -0
  347. package/dist/providers/source-item-provider.d.ts +12 -0
  348. package/dist/providers/source-item-provider.js +13 -0
  349. package/dist/providers/theme-provider.cjs +1 -0
  350. package/dist/providers/theme-provider.d.cts +3 -0
  351. package/dist/providers/theme-provider.d.ts +3 -0
  352. package/dist/providers/theme-provider.js +65 -0
  353. package/dist/providers/user-provider.cjs +1 -0
  354. package/dist/providers/user-provider.d.cts +13 -0
  355. package/dist/providers/user-provider.d.ts +13 -0
  356. package/dist/providers/user-provider.js +34 -0
  357. package/dist/providers/widget-provider.cjs +1 -0
  358. package/dist/providers/widget-provider.d.cts +9 -0
  359. package/dist/providers/widget-provider.d.ts +9 -0
  360. package/dist/providers/widget-provider.js +8 -0
  361. package/dist/utils/component-ids.cjs +1 -0
  362. package/dist/utils/component-ids.d.cts +632 -0
  363. package/dist/utils/component-ids.d.ts +632 -0
  364. package/dist/utils/component-ids.js +340 -0
  365. package/dist/utils/compose-event-handlers.cjs +1 -0
  366. package/dist/utils/compose-event-handlers.d.cts +3 -0
  367. package/dist/utils/compose-event-handlers.d.ts +3 -0
  368. package/dist/utils/compose-event-handlers.js +10 -0
  369. package/dist/utils/compose-refs.cjs +1 -0
  370. package/dist/utils/compose-refs.d.cts +5 -0
  371. package/dist/utils/compose-refs.d.ts +5 -0
  372. package/dist/utils/compose-refs.js +30 -0
  373. package/dist/utils/default-settings.cjs +1 -0
  374. package/dist/utils/default-settings.d.cts +244 -0
  375. package/dist/utils/default-settings.d.ts +244 -0
  376. package/dist/utils/default-settings.js +75 -0
  377. package/dist/utils/form.cjs +1 -0
  378. package/dist/utils/form.d.cts +3 -0
  379. package/dist/utils/form.d.ts +3 -0
  380. package/dist/utils/form.js +17 -0
  381. package/dist/utils/generate-uid.cjs +1 -0
  382. package/dist/utils/generate-uid.d.cts +2 -0
  383. package/dist/utils/generate-uid.d.ts +2 -0
  384. package/dist/utils/generate-uid.js +14 -0
  385. package/dist/utils/get-message-metadata.cjs +10 -0
  386. package/dist/utils/get-message-metadata.d.cts +8 -0
  387. package/dist/utils/get-message-metadata.d.ts +8 -0
  388. package/dist/utils/get-message-metadata.js +142 -0
  389. package/dist/utils/graphql-client.cjs +1 -0
  390. package/dist/utils/graphql-client.d.cts +8 -0
  391. package/dist/utils/graphql-client.d.ts +8 -0
  392. package/dist/utils/graphql-client.js +23 -0
  393. package/dist/utils/highlight-emphasis.cjs +1 -0
  394. package/dist/utils/highlight-emphasis.d.cts +4 -0
  395. package/dist/utils/highlight-emphasis.d.ts +4 -0
  396. package/dist/utils/highlight-emphasis.js +15 -0
  397. package/dist/utils/merge-props.cjs +1 -0
  398. package/dist/utils/merge-props.d.cts +7 -0
  399. package/dist/utils/merge-props.d.ts +7 -0
  400. package/dist/utils/merge-props.js +41 -0
  401. package/dist/utils/misc.cjs +1 -0
  402. package/dist/utils/misc.d.cts +13 -0
  403. package/dist/utils/misc.d.ts +13 -0
  404. package/dist/utils/misc.js +36 -0
  405. package/dist/utils/reset-query-params.cjs +1 -0
  406. package/dist/utils/reset-query-params.d.cts +1 -0
  407. package/dist/utils/reset-query-params.d.ts +1 -0
  408. package/dist/utils/reset-query-params.js +13 -0
  409. package/dist/utils/tools/links-schema.cjs +1 -0
  410. package/dist/utils/tools/links-schema.d.cts +64 -0
  411. package/dist/utils/tools/links-schema.d.ts +64 -0
  412. package/dist/utils/tools/links-schema.js +85 -0
  413. package/dist/utils/transform-source/breadcrumbs.cjs +1 -0
  414. package/dist/utils/transform-source/breadcrumbs.d.cts +2 -0
  415. package/dist/utils/transform-source/breadcrumbs.d.ts +2 -0
  416. package/dist/utils/transform-source/breadcrumbs.js +16 -0
  417. package/dist/utils/transform-source/common-words/long.cjs +1 -0
  418. package/dist/utils/transform-source/common-words/long.d.cts +1 -0
  419. package/dist/utils/transform-source/common-words/long.d.ts +1 -0
  420. package/dist/utils/transform-source/common-words/long.js +69 -0
  421. package/dist/utils/transform-source/common-words/lowercase.cjs +1 -0
  422. package/dist/utils/transform-source/common-words/lowercase.d.cts +1 -0
  423. package/dist/utils/transform-source/common-words/lowercase.d.ts +1 -0
  424. package/dist/utils/transform-source/common-words/lowercase.js +48 -0
  425. package/dist/utils/transform-source/common-words/short.cjs +1 -0
  426. package/dist/utils/transform-source/common-words/short.d.cts +1 -0
  427. package/dist/utils/transform-source/common-words/short.d.ts +1 -0
  428. package/dist/utils/transform-source/common-words/short.js +141 -0
  429. package/dist/utils/transform-source/description.cjs +1 -0
  430. package/dist/utils/transform-source/description.d.cts +2 -0
  431. package/dist/utils/transform-source/description.d.ts +2 -0
  432. package/dist/utils/transform-source/description.js +10 -0
  433. package/dist/utils/transform-source/icon.cjs +1 -0
  434. package/dist/utils/transform-source/icon.d.cts +2 -0
  435. package/dist/utils/transform-source/icon.d.ts +2 -0
  436. package/dist/utils/transform-source/icon.js +9 -0
  437. package/dist/utils/transform-source/index.cjs +1 -0
  438. package/dist/utils/transform-source/index.d.cts +2 -0
  439. package/dist/utils/transform-source/index.d.ts +2 -0
  440. package/dist/utils/transform-source/index.js +21 -0
  441. package/dist/utils/transform-source/tabs.cjs +1 -0
  442. package/dist/utils/transform-source/tabs.d.cts +2 -0
  443. package/dist/utils/transform-source/tabs.d.ts +2 -0
  444. package/dist/utils/transform-source/tabs.js +13 -0
  445. package/dist/utils/transform-source/title.cjs +1 -0
  446. package/dist/utils/transform-source/title.d.cts +2 -0
  447. package/dist/utils/transform-source/title.d.ts +2 -0
  448. package/dist/utils/transform-source/title.js +12 -0
  449. package/dist/utils/transform-source/utils/description-without-title.cjs +1 -0
  450. package/dist/utils/transform-source/utils/description-without-title.d.cts +11 -0
  451. package/dist/utils/transform-source/utils/description-without-title.d.ts +11 -0
  452. package/dist/utils/transform-source/utils/description-without-title.js +12 -0
  453. package/dist/utils/transform-source/utils/index.cjs +1 -0
  454. package/dist/utils/transform-source/utils/index.d.cts +6 -0
  455. package/dist/utils/transform-source/utils/index.d.ts +6 -0
  456. package/dist/utils/transform-source/utils/index.js +16 -0
  457. package/dist/utils/transform-source/utils/misc.cjs +1 -0
  458. package/dist/utils/transform-source/utils/misc.d.cts +2 -0
  459. package/dist/utils/transform-source/utils/misc.d.ts +2 -0
  460. package/dist/utils/transform-source/utils/misc.js +15 -0
  461. package/dist/utils/transform-source/utils/standardize-common-words.cjs +1 -0
  462. package/dist/utils/transform-source/utils/standardize-common-words.d.cts +1 -0
  463. package/dist/utils/transform-source/utils/standardize-common-words.d.ts +1 -0
  464. package/dist/utils/transform-source/utils/standardize-common-words.js +26 -0
  465. package/dist/utils/transform-source/utils/standardize-organization-display-name.cjs +1 -0
  466. package/dist/utils/transform-source/utils/standardize-organization-display-name.d.cts +8 -0
  467. package/dist/utils/transform-source/utils/standardize-organization-display-name.d.ts +8 -0
  468. package/dist/utils/transform-source/utils/standardize-organization-display-name.js +10 -0
  469. package/dist/utils/transform-source/utils/standardize-suffixes.cjs +1 -0
  470. package/dist/utils/transform-source/utils/standardize-suffixes.d.cts +5 -0
  471. package/dist/utils/transform-source/utils/standardize-suffixes.d.ts +5 -0
  472. package/dist/utils/transform-source/utils/standardize-suffixes.js +16 -0
  473. package/dist/utils/transform-source/utils/strip-branding-keywords.cjs +1 -0
  474. package/dist/utils/transform-source/utils/strip-branding-keywords.d.cts +17 -0
  475. package/dist/utils/transform-source/utils/strip-branding-keywords.d.ts +17 -0
  476. package/dist/utils/transform-source/utils/strip-branding-keywords.js +14 -0
  477. package/package.json +111 -0
@@ -0,0 +1,390 @@
1
+ "use client";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import { Command as h } from "cmdk";
4
+ import { ikp as i } from "./factory.js";
5
+ import { dataAttr as u, maybeRender as g } from "../utils/misc.js";
6
+ import { forwardRef as v, useEffect as P, useState as B, useRef as x, useMemo as D } from "react";
7
+ import { useSearch as c } from "./embedded-search/search-provider.js";
8
+ import { SearchProvider as It } from "./embedded-search/search-provider.js";
9
+ import N from "./tagline-logo-icon.js";
10
+ import { CustomIcon as I } from "../atoms/icons/custom-icon.js";
11
+ import U from "react-textarea-autosize";
12
+ import * as p from "@radix-ui/react-scroll-area";
13
+ import * as _ from "@radix-ui/react-tabs";
14
+ import { useInkeepConfig as T } from "../providers/config-provider.js";
15
+ import { useSearchEvents as F } from "../providers/search-events-provider.js";
16
+ import { LinkWithQueryParams as V } from "../atoms/link.js";
17
+ import { SourceItemProvider as M, useSourceItem as m } from "../providers/source-item-provider.js";
18
+ import { BuiltInIconRenderer as L } from "../atoms/icons/built-in-icon-renderer.js";
19
+ import { highlightEmphasis as W } from "../utils/highlight-emphasis.js";
20
+ import { useScrollingFades as q } from "../hooks/use-scrolling-fades.js";
21
+ import { useColorModeValue as H } from "@inkeep/cxkit-color-mode";
22
+ import K from "../atoms/avatars/ai.js";
23
+ import { useModal as y } from "./modal/modal-provider.js";
24
+ import { useComposedRefs as f } from "../utils/compose-refs.js";
25
+ import { composeEventHandlers as b } from "../utils/compose-event-handlers.js";
26
+ const O = i("div", {
27
+ _id: "aiSearchWrapper"
28
+ }), De = (t) => {
29
+ const { isHidden: e, hasContent: r, isMobile: s } = c(), n = y();
30
+ return /* @__PURE__ */ a(
31
+ O,
32
+ {
33
+ "data-hidden": u(e),
34
+ "data-has-content": u(r),
35
+ "data-in-modal": u(!!n),
36
+ "data-mobile": u(s),
37
+ ...t
38
+ }
39
+ );
40
+ }, G = i(h, {
41
+ _id: "aiSearchRoot"
42
+ }), Ne = (t) => {
43
+ const { isHidden: e, selectedItem: r, onSelectedItemChange: s } = c();
44
+ return /* @__PURE__ */ a(
45
+ G,
46
+ {
47
+ "data-hidden": u(e),
48
+ shouldFilter: !1,
49
+ loop: !1,
50
+ value: r,
51
+ onValueChange: s,
52
+ ...t
53
+ }
54
+ );
55
+ }, Ue = i(h.List, {
56
+ _id: "aiSearchContent"
57
+ }), Fe = i("div", {
58
+ _id: "aiSearchInputGroup"
59
+ }), Ve = i(I, {
60
+ _id: "aiSearchInputIcon",
61
+ iconKey: "search"
62
+ }), j = i(h.Input, {
63
+ _id: "aiSearchInput"
64
+ }), Me = v(({ onInput: t, ...e }, r) => {
65
+ const { query: s, onInput: n, placeholder: o, inputRef: l, shouldAutoFocusInput: d } = c(), S = f(r, l), R = y();
66
+ return P(() => {
67
+ requestAnimationFrame(() => {
68
+ d && l?.current && (l.current.focus(), l.current.selectionStart = l.current.value.length);
69
+ });
70
+ }, [d, l, R?.open]), /* @__PURE__ */ a(
71
+ j,
72
+ {
73
+ asChild: !0,
74
+ ref: S,
75
+ placeholder: o,
76
+ value: s,
77
+ onInput: b(t, n),
78
+ ...e,
79
+ children: /* @__PURE__ */ a(U, { minRows: 1, maxLength: 1e3 })
80
+ }
81
+ );
82
+ }), Q = i(L, {
83
+ _id: "aiSearchLoading",
84
+ iconSettings: {
85
+ builtIn: "LuLoaderCircle"
86
+ }
87
+ }), We = (t) => {
88
+ const { loading: e, resultsList: r } = c();
89
+ return !e || r.length === 0 ? null : /* @__PURE__ */ a(Q, { ...t });
90
+ }, $ = i(h.Item, {
91
+ _id: "aiAskAITrigger",
92
+ value: "__ask_ai__"
93
+ }), qe = (t) => {
94
+ const { setSelectedItem: e, results: r, tab: s } = c(), n = r[s]?.[0]?.id ?? "NONE";
95
+ return /* @__PURE__ */ a($, { ...t, onPointerLeave: () => e(n) });
96
+ }, z = i("img", {
97
+ _id: "aiAskAITrigger__Icon"
98
+ }), He = (t) => {
99
+ const { aiChatSettings: e } = T(), { botAvatarSrcUrl: r, botAvatarDarkSrcUrl: s } = e ?? {}, o = H(r, s ?? r), [l, d] = B(o);
100
+ return P(() => {
101
+ d(o);
102
+ }, [o]), /* @__PURE__ */ a(z, { asChild: !0, ...t, children: l ? (
103
+ // biome-ignore lint/a11y/useAltText: <explanation>
104
+ /* @__PURE__ */ a(
105
+ "img",
106
+ {
107
+ src: l,
108
+ alt: "AI Avatar",
109
+ "data-type": "image",
110
+ onError: b(() => {
111
+ d(null);
112
+ }),
113
+ ...t
114
+ }
115
+ )
116
+ ) : /* @__PURE__ */ a(K, { "data-type": "icon", ...t }) });
117
+ }, Ke = i("span", {
118
+ _id: "aiAskAITrigger__Label"
119
+ }), Oe = i(I, {
120
+ _id: "aiAskAITrigger__Indicator",
121
+ iconKey: "openLinkInSameTab"
122
+ }), J = i(_.Root, {
123
+ _id: "aiSearchResults"
124
+ }), Ge = (t) => {
125
+ const { tab: e, onTabChange: r, hasContent: s } = c();
126
+ return /* @__PURE__ */ a(
127
+ J,
128
+ {
129
+ value: e,
130
+ onValueChange: r,
131
+ "data-has-content": u(s),
132
+ ...t
133
+ }
134
+ );
135
+ }, X = i("div", {
136
+ _id: "aiSearchResults__Loading"
137
+ }), je = (t) => {
138
+ const { loading: e, resultsList: r } = c();
139
+ return !e || r.length > 0 ? null : /* @__PURE__ */ a(X, { ...t });
140
+ }, Y = i(h.Empty, {
141
+ _id: "aiSearchResults__Empty"
142
+ }), Qe = (t) => {
143
+ const { query: e, loading: r, results: s, tab: n } = c(), o = s[n]?.length;
144
+ return r || !e || o ? null : /* @__PURE__ */ a(Y, { children: "No results found.", ...t });
145
+ }, Z = i(_.List, {
146
+ _id: "aiSearchResults__TabList"
147
+ }), $e = (t) => {
148
+ const { children: e, ...r } = t, {
149
+ searchSettings: { tabs: s }
150
+ } = T(), { results: n, loading: o, resultsList: l } = c();
151
+ if (o && l.length === 0) return null;
152
+ const d = Object.keys(n);
153
+ return !s.length || !d.length ? null : /* @__PURE__ */ a(Z, { children: g(e, d), ...r });
154
+ }, ee = i(_.Trigger, {
155
+ _id: "aiSearchResults__Tab"
156
+ }), ze = (t) => {
157
+ const { tab: e, ...r } = t, { results: s } = c(), n = s[e].length;
158
+ return /* @__PURE__ */ a(ee, { value: e, children: `${e} (${n})`, ...r });
159
+ }, te = i(p.Root, {
160
+ _id: "aiSearchResults__ScrollArea"
161
+ }), Je = (t) => {
162
+ const { loading: e, resultsList: r } = c();
163
+ return e && r.length === 0 ? null : /* @__PURE__ */ a(te, { ...t });
164
+ }, re = i(p.Viewport, {
165
+ _id: "aiSearchResults__ScrollAreaViewport"
166
+ }), Xe = v(({ children: t, ...e }, r) => {
167
+ const s = q(), n = f(r, s), { tab: o } = c();
168
+ return P(() => {
169
+ o && s.current?.scrollTo({ top: 0, behavior: "auto" });
170
+ }, [o]), /* @__PURE__ */ a(
171
+ re,
172
+ {
173
+ ref: n,
174
+ children: (
175
+ /* added this to fix an overflow issue see https://github.com/radix-ui/primitives/issues/926 */
176
+ /* @__PURE__ */ a("div", { style: { display: "grid" }, children: t })
177
+ ),
178
+ ...e
179
+ }
180
+ );
181
+ }), Ye = i(
182
+ p.ScrollAreaScrollbar,
183
+ {
184
+ _id: "aiSearchResults__ScrollAreaScrollbar"
185
+ }
186
+ ), Ze = i(p.ScrollAreaThumb, {
187
+ _id: "aiSearchResults__ScrollAreaThumb"
188
+ }), et = i(p.Corner, {
189
+ _id: "aiSearchResults__ScrollAreaCorner"
190
+ }), ie = i(_.Content, {
191
+ _id: "aiSearchResults__List"
192
+ }), tt = (t) => {
193
+ const { children: e, ...r } = t, { results: s, tab: n } = c(), o = s[n] ?? [];
194
+ return /* @__PURE__ */ a(
195
+ ie,
196
+ {
197
+ value: n,
198
+ "data-has-results": u(o.length > 0),
199
+ "aria-label": "Search results",
200
+ children: g(e, o),
201
+ ...r
202
+ }
203
+ );
204
+ }, se = i(h.Item, {
205
+ _id: "aiSearchResults__Item",
206
+ asChild: !0
207
+ }), rt = v(({ item: t, onClick: e, onSelect: r, children: s, ...n }, o) => {
208
+ const {
209
+ searchSettings: { shouldOpenLinksInNewTab: l }
210
+ } = T(), { logEvent: d } = F(), { query: S, transitionsDisabled: R } = c(), A = x(null), k = f(o, A), C = () => {
211
+ A.current?.click();
212
+ }, w = () => {
213
+ d({
214
+ eventName: "search_result_clicked",
215
+ properties: {
216
+ searchQuery: S,
217
+ title: t.title,
218
+ url: t.url
219
+ }
220
+ });
221
+ }, E = l || !!t.shouldOpenInNewTab;
222
+ return /* @__PURE__ */ a(M, { source: { ...t, isExternal: E }, children: /* @__PURE__ */ a(
223
+ se,
224
+ {
225
+ ref: k,
226
+ value: t.id,
227
+ "data-type": t.type,
228
+ "data-breadcrumbs": !!t.breadcrumbs?.length,
229
+ "data-disable-transitions": u(R),
230
+ onSelect: b(r, C),
231
+ onClick: b(e, w),
232
+ ...n,
233
+ children: /* @__PURE__ */ a(
234
+ V,
235
+ {
236
+ href: t.url,
237
+ isExternal: E,
238
+ appendToUrl: t.appendToUrl,
239
+ children: s
240
+ }
241
+ )
242
+ }
243
+ ) });
244
+ }), ae = i("div", {
245
+ _id: "aiSearchResults__ItemBreadcrumbs"
246
+ }), it = (t) => {
247
+ const { source: e } = m(), { tab: r } = c();
248
+ if (!e.breadcrumbs?.length) return null;
249
+ const { children: s, ...n } = t, l = e.tabs?.find((d) => typeof d != "string" && d[0] === r)?.[1]?.breadcrumbs ?? e.breadcrumbs ?? [];
250
+ return /* @__PURE__ */ a(ae, { children: g(s, l), ...n });
251
+ }, st = i(I, {
252
+ _id: "aiSearchResults__ItemBreadcrumbIcon",
253
+ iconKey: "breadcrumbSeparator"
254
+ }), ne = i(L, {
255
+ _id: "aiSearchResults__ItemIcon"
256
+ }), at = (t) => {
257
+ const { source: e } = m();
258
+ return /* @__PURE__ */ a(ne, { iconSettings: e.icon, "data-type": e.type, ...t });
259
+ }, oe = i("span", {
260
+ _id: "aiSearchResults__ItemTitle"
261
+ }), nt = (t) => {
262
+ const { source: e } = m();
263
+ return /* @__PURE__ */ a(oe, { "data-type": e.type, children: e.title, ...t });
264
+ }, ce = i("span", {
265
+ _id: "aiSearchResults__ItemTag"
266
+ }), ot = (t) => {
267
+ const { source: e } = m();
268
+ return /* @__PURE__ */ a(ce, { "data-type": e.type, children: e.tag, ...t });
269
+ }, le = i("span", {
270
+ _id: "aiSearchResults__ItemDescription"
271
+ }), ct = (t) => {
272
+ const { source: e } = m(), { children: r, ...s } = t, n = D(() => e.description ? W(e.description) : [], [e.description]);
273
+ return n.length ? /* @__PURE__ */ a(
274
+ le,
275
+ {
276
+ "data-type": e.type,
277
+ children: g(r, n),
278
+ ...s
279
+ }
280
+ ) : null;
281
+ }, de = i("span", {
282
+ _id: "aiSearchResults__ItemDescriptionPart"
283
+ }), lt = (t) => {
284
+ const { part: e, ...r } = t, { source: s } = m();
285
+ return typeof e == "string" ? e : /* @__PURE__ */ a(
286
+ de,
287
+ {
288
+ "data-type": s.type,
289
+ children: e.content,
290
+ "data-highlighted": u(e.highlighted),
291
+ ...r
292
+ }
293
+ );
294
+ }, ue = i(I, {
295
+ _id: "aiSearchResults__ItemIndicator"
296
+ }), dt = (t) => {
297
+ const { source: e } = m();
298
+ return /* @__PURE__ */ a(
299
+ ue,
300
+ {
301
+ iconKey: e.isExternal ? "openLinkInNewTab" : "openLinkInSameTab",
302
+ ...t
303
+ }
304
+ );
305
+ }, me = i("div", {
306
+ _id: "aiSearchFooter"
307
+ }), ut = (t) => {
308
+ const { resultsList: e } = c();
309
+ return /* @__PURE__ */ a(me, { "data-has-results": u(e.length > 0), ...t });
310
+ }, mt = i("div", {
311
+ _id: "aiSearchTagline__Container"
312
+ }), ht = i("span", {
313
+ _id: "aiSearchTagline__Text",
314
+ children: "Powered by"
315
+ }), pt = i(N, {
316
+ _id: "aiSearchTagline__Logo"
317
+ }), St = i("a", {
318
+ _id: "aiSearchTagline__BrandName",
319
+ children: "inkeep",
320
+ href: "https://www.inkeep.com/",
321
+ target: "_blank",
322
+ rel: "noopener noreferrer"
323
+ });
324
+ export {
325
+ qe as AskAITrigger,
326
+ He as AskAITriggerIcon,
327
+ Oe as AskAITriggerIndicator,
328
+ Ke as AskAITriggerLabel,
329
+ Ue as Content,
330
+ Ve as EmbeddedSearchInputIcon,
331
+ qe as EmbeddedSearchPrimitiveAskAITrigger,
332
+ He as EmbeddedSearchPrimitiveAskAITriggerIcon,
333
+ Oe as EmbeddedSearchPrimitiveAskAITriggerIndicator,
334
+ Ke as EmbeddedSearchPrimitiveAskAITriggerLabel,
335
+ Ue as EmbeddedSearchPrimitiveContent,
336
+ ut as EmbeddedSearchPrimitiveFooter,
337
+ Me as EmbeddedSearchPrimitiveInput,
338
+ Fe as EmbeddedSearchPrimitiveInputGroup,
339
+ We as EmbeddedSearchPrimitiveLoading,
340
+ Ge as EmbeddedSearchPrimitiveResults,
341
+ Qe as EmbeddedSearchPrimitiveResultsEmpty,
342
+ rt as EmbeddedSearchPrimitiveResultsItem,
343
+ it as EmbeddedSearchPrimitiveResultsItemBreadcrumbs,
344
+ ct as EmbeddedSearchPrimitiveResultsItemDescription,
345
+ lt as EmbeddedSearchPrimitiveResultsItemDescriptionPart,
346
+ at as EmbeddedSearchPrimitiveResultsItemIcon,
347
+ dt as EmbeddedSearchPrimitiveResultsItemIndicator,
348
+ ot as EmbeddedSearchPrimitiveResultsItemTag,
349
+ nt as EmbeddedSearchPrimitiveResultsItemTitle,
350
+ tt as EmbeddedSearchPrimitiveResultsList,
351
+ je as EmbeddedSearchPrimitiveResultsLoading,
352
+ Je as EmbeddedSearchPrimitiveResultsScrollArea,
353
+ Xe as EmbeddedSearchPrimitiveResultsScrollAreaViewport,
354
+ ze as EmbeddedSearchPrimitiveResultsTab,
355
+ $e as EmbeddedSearchPrimitiveResultsTabList,
356
+ Ne as EmbeddedSearchPrimitiveRoot,
357
+ De as EmbeddedSearchPrimitiveWrapper,
358
+ ut as Footer,
359
+ Me as Input,
360
+ Fe as InputGroup,
361
+ Ve as InputIcon,
362
+ We as Loading,
363
+ It as Provider,
364
+ Ge as Results,
365
+ Qe as ResultsEmpty,
366
+ rt as ResultsItem,
367
+ st as ResultsItemBreadcrumbIcon,
368
+ it as ResultsItemBreadcrumbs,
369
+ ct as ResultsItemDescription,
370
+ lt as ResultsItemDescriptionPart,
371
+ at as ResultsItemIcon,
372
+ dt as ResultsItemIndicator,
373
+ ot as ResultsItemTag,
374
+ nt as ResultsItemTitle,
375
+ tt as ResultsList,
376
+ je as ResultsLoading,
377
+ Je as ResultsScrollArea,
378
+ et as ResultsScrollAreaCorner,
379
+ Ye as ResultsScrollAreaScrollbar,
380
+ Ze as ResultsScrollAreaThumb,
381
+ Xe as ResultsScrollAreaViewport,
382
+ ze as ResultsTab,
383
+ $e as ResultsTabList,
384
+ Ne as Root,
385
+ St as TaglineBrandName,
386
+ mt as TaglineContainer,
387
+ pt as TaglineLogo,
388
+ ht as TaglineText,
389
+ De as Wrapper
390
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),b=require("../hooks/use-component-classnames.cjs"),w=require("../utils/compose-refs.cjs"),u=require("../utils/merge-props.cjs"),j=require("../utils/misc.cjs");function q(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}const d=(e,r)=>{const s=t.memo(t.forwardRef((c,n)=>{const{_id:i,className:m,children:g,...h}=r,{asChild:y,children:P,...C}=c,a=P||g,R={className:b.useComponentClassNames(i,m),"data-part":j.toKebabCase(i)},p=u.mergeProps(h,C,R);if(!y)return t.createElement(e,{...p,ref:n},a);const o=t.Children.only(a);if(!t.isValidElement(o))return null;const l=q(o);return t.cloneElement(o,{...u.mergeProps(p,o.props),ref:n?w.composeRefs(n,l):l})}));return s.displayName=e.displayName||e.name,s},f=()=>new Proxy(d,{apply(e,r,s){const c=s[0],n=s[1];return d(c,n)}}),N=f();exports.ikp=N;exports.jsxFactory=f;
@@ -0,0 +1,19 @@
1
+ import { default as React, ComponentPropsWithoutRef, JSX } from 'react';
2
+ import { ComponentID } from '../utils/component-ids';
3
+ export interface PolymorphicProps {
4
+ /**
5
+ * Use the provided child element as the default rendered element, combining their props and behavior.
6
+ */
7
+ asChild?: boolean;
8
+ }
9
+ type IkpForwardRefComponent<E extends React.ElementType, A> = React.ForwardRefExoticComponent<IkpPropsWithRef<E, A>>;
10
+ type IkpPropsWithRef<E extends React.ElementType, A> = PolymorphicProps & Omit<React.ComponentPropsWithRef<E>, keyof A> & Partial<Pick<React.ComponentPropsWithRef<E>, keyof A>>;
11
+ type AnyString = string & {};
12
+ export type HTMLProps<T extends keyof JSX.IntrinsicElements> = ComponentPropsWithoutRef<T>;
13
+ export type HTMLIkpProps<T extends keyof JSX.IntrinsicElements> = HTMLProps<T> & PolymorphicProps;
14
+ type IkpFactory = <T extends React.ElementType = 'div', A = React.ComponentPropsWithoutRef<T> & Record<AnyString, unknown>>(component: T, opts: {
15
+ _id: ComponentID;
16
+ } & Partial<A>) => IkpForwardRefComponent<T, A>;
17
+ export declare const jsxFactory: () => IkpFactory;
18
+ export declare const ikp: IkpFactory;
19
+ export {};
@@ -0,0 +1,19 @@
1
+ import { default as React, ComponentPropsWithoutRef, JSX } from 'react';
2
+ import { ComponentID } from '../utils/component-ids';
3
+ export interface PolymorphicProps {
4
+ /**
5
+ * Use the provided child element as the default rendered element, combining their props and behavior.
6
+ */
7
+ asChild?: boolean;
8
+ }
9
+ type IkpForwardRefComponent<E extends React.ElementType, A> = React.ForwardRefExoticComponent<IkpPropsWithRef<E, A>>;
10
+ type IkpPropsWithRef<E extends React.ElementType, A> = PolymorphicProps & Omit<React.ComponentPropsWithRef<E>, keyof A> & Partial<Pick<React.ComponentPropsWithRef<E>, keyof A>>;
11
+ type AnyString = string & {};
12
+ export type HTMLProps<T extends keyof JSX.IntrinsicElements> = ComponentPropsWithoutRef<T>;
13
+ export type HTMLIkpProps<T extends keyof JSX.IntrinsicElements> = HTMLProps<T> & PolymorphicProps;
14
+ type IkpFactory = <T extends React.ElementType = 'div', A = React.ComponentPropsWithoutRef<T> & Record<AnyString, unknown>>(component: T, opts: {
15
+ _id: ComponentID;
16
+ } & Partial<A>) => IkpForwardRefComponent<T, A>;
17
+ export declare const jsxFactory: () => IkpFactory;
18
+ export declare const ikp: IkpFactory;
19
+ export {};
@@ -0,0 +1,39 @@
1
+ import { memo as P, forwardRef as R, createElement as w, Children as N, isValidElement as W, cloneElement as b } from "react";
2
+ import { useComponentClassNames as E } from "../hooks/use-component-classnames.js";
3
+ import { composeRefs as O } from "../utils/compose-refs.js";
4
+ import { mergeProps as l } from "../utils/merge-props.js";
5
+ import { toKebabCase as j } from "../utils/misc.js";
6
+ function x(r) {
7
+ let e = Object.getOwnPropertyDescriptor(r.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
8
+ return t ? r.ref : (e = Object.getOwnPropertyDescriptor(r, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? r.props.ref : r.props.ref || r.ref);
9
+ }
10
+ const f = (r, e) => {
11
+ const t = P(
12
+ R((n, s) => {
13
+ const { _id: i, className: m, children: d, ...u } = e, { asChild: g, children: h, ...y } = n, c = h || d, C = {
14
+ className: E(i, m),
15
+ "data-part": j(i)
16
+ }, a = l(u, y, C);
17
+ if (!g)
18
+ return w(r, { ...a, ref: s }, c);
19
+ const o = N.only(c);
20
+ if (!W(o))
21
+ return null;
22
+ const p = x(o);
23
+ return b(o, {
24
+ ...l(a, o.props),
25
+ ref: s ? O(s, p) : p
26
+ });
27
+ })
28
+ );
29
+ return t.displayName = r.displayName || r.name, t;
30
+ }, _ = () => new Proxy(f, {
31
+ apply(r, e, t) {
32
+ const n = t[0], s = t[1];
33
+ return f(n, s);
34
+ }
35
+ }), q = _();
36
+ export {
37
+ q as ikp,
38
+ _ as jsxFactory
39
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./factory.cjs"),d=require("./embedded-chat.cjs"),t=require("./embedded-chat/chat-provider.cjs"),a=require("./embedded-search.cjs"),e=require("./embedded-search/search-provider.cjs"),n=require("./modal.cjs"),o=require("./modal/modal-provider.cjs"),l=require("./intelligent-form.cjs"),r=require("./intelligent-form/intelligent-form-provider.cjs"),c=require("./chat-button.cjs"),m=require("./searchbar.cjs");exports.ikp=i.ikp;exports.jsxFactory=i.jsxFactory;exports.EmbeddedChatPrimitive=d;exports.ChatProvider=t.ChatProvider;exports.useChat=t.useChat;exports.EmbeddedSearchPrimitive=a;exports.SearchProvider=e.SearchProvider;exports.SearchProviderImpl=e.SearchProviderImpl;exports.useSearch=e.useSearch;exports.ModalPrimitive=n;exports.ModalProvider=o.ModalProvider;exports.useModal=o.useModal;exports.IntelligentFormPrimitive=l;exports.IntelligentFormProvider=r.IntelligentFormProvider;exports.IntelligentFormProviderImpl=r.IntelligentFormProviderImpl;exports.useIntelligentForm=r.useIntelligentForm;exports.ChatButtonPrimitive=c;exports.SearchBarPrimitive=m;
@@ -0,0 +1,11 @@
1
+ export * from './factory';
2
+ export * as EmbeddedChatPrimitive from './embedded-chat';
3
+ export * from './embedded-chat/chat-provider';
4
+ export * as EmbeddedSearchPrimitive from './embedded-search';
5
+ export * from './embedded-search/search-provider';
6
+ export * as ModalPrimitive from './modal';
7
+ export * from './modal/modal-provider';
8
+ export * as IntelligentFormPrimitive from './intelligent-form';
9
+ export * from './intelligent-form/intelligent-form-provider';
10
+ export * as ChatButtonPrimitive from './chat-button';
11
+ export * as SearchBarPrimitive from './searchbar';
@@ -0,0 +1,11 @@
1
+ export * from './factory';
2
+ export * as EmbeddedChatPrimitive from './embedded-chat';
3
+ export * from './embedded-chat/chat-provider';
4
+ export * as EmbeddedSearchPrimitive from './embedded-search';
5
+ export * from './embedded-search/search-provider';
6
+ export * as ModalPrimitive from './modal';
7
+ export * from './modal/modal-provider';
8
+ export * as IntelligentFormPrimitive from './intelligent-form';
9
+ export * from './intelligent-form/intelligent-form-provider';
10
+ export * as ChatButtonPrimitive from './chat-button';
11
+ export * as SearchBarPrimitive from './searchbar';
@@ -0,0 +1,31 @@
1
+ import { ikp as p, jsxFactory as s } from "./factory.js";
2
+ import * as r from "./embedded-chat.js";
3
+ import { ChatProvider as h, useChat as n } from "./embedded-chat/chat-provider.js";
4
+ import * as e from "./embedded-search.js";
5
+ import { SearchProvider as x, SearchProviderImpl as P, useSearch as f } from "./embedded-search/search-provider.js";
6
+ import * as o from "./modal.js";
7
+ import { ModalProvider as u, useModal as F } from "./modal/modal-provider.js";
8
+ import * as t from "./intelligent-form.js";
9
+ import { IntelligentFormProvider as S, IntelligentFormProviderImpl as b, useIntelligentForm as g } from "./intelligent-form/intelligent-form-provider.js";
10
+ import * as i from "./chat-button.js";
11
+ import * as m from "./searchbar.js";
12
+ export {
13
+ i as ChatButtonPrimitive,
14
+ h as ChatProvider,
15
+ r as EmbeddedChatPrimitive,
16
+ e as EmbeddedSearchPrimitive,
17
+ t as IntelligentFormPrimitive,
18
+ S as IntelligentFormProvider,
19
+ b as IntelligentFormProviderImpl,
20
+ o as ModalPrimitive,
21
+ u as ModalProvider,
22
+ m as SearchBarPrimitive,
23
+ x as SearchProvider,
24
+ P as SearchProviderImpl,
25
+ p as ikp,
26
+ s as jsxFactory,
27
+ n as useChat,
28
+ g as useIntelligentForm,
29
+ F as useModal,
30
+ f as useSearch
31
+ };
@@ -0,0 +1,9 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=async(e,n,t)=>{const o=JSON.stringify(e.primaryFieldValues,null,2),i=JSON.stringify(e.fieldsToGenerate,null,2),s=(await n.chat.completions.create({model:"inkeep-context-expert",messages:[{role:"system",content:`You are a helpful assistant that suggests form field values based on context. You will receive form field information including field names, descriptions, input types, and available options for select fields.
2
+
3
+ For each field, consider its description, input type, and available options (for select fields).
4
+
5
+ You must respond with a JSON object where keys are the field names and values match the expected input type and length for that field.`},{role:"user",content:`Based on these primary field values:
6
+ ${o}
7
+
8
+ Suggest values for these additional fields:
9
+ ${i}`}],response_format:{type:"json_object"}},t?{headers:t}:void 0)).choices[0]?.message?.content;return{suggestedValues:s?JSON.parse(s):{}}};exports.generateContextModelResponse=a;
@@ -0,0 +1,10 @@
1
+ import { FormField } from '@inkeep/cxkit-types';
2
+ import { default as OpenAI } from 'openai';
3
+ export interface ContextModelInput {
4
+ primaryFieldValues: Record<string, unknown>;
5
+ fieldsToGenerate: FormField[];
6
+ }
7
+ export interface ContextModelResponse {
8
+ suggestedValues: Record<string, unknown>;
9
+ }
10
+ export declare const generateContextModelResponse: (input: ContextModelInput, openai: OpenAI, headers?: Record<string, string>) => Promise<ContextModelResponse>;
@@ -0,0 +1,10 @@
1
+ import { FormField } from '@inkeep/cxkit-types';
2
+ import { default as OpenAI } from 'openai';
3
+ export interface ContextModelInput {
4
+ primaryFieldValues: Record<string, unknown>;
5
+ fieldsToGenerate: FormField[];
6
+ }
7
+ export interface ContextModelResponse {
8
+ suggestedValues: Record<string, unknown>;
9
+ }
10
+ export declare const generateContextModelResponse: (input: ContextModelInput, openai: OpenAI, headers?: Record<string, string>) => Promise<ContextModelResponse>;
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ const l = async (e, n, s) => {
3
+ const o = JSON.stringify(e.primaryFieldValues, null, 2), i = JSON.stringify(e.fieldsToGenerate, null, 2), t = (await n.chat.completions.create(
4
+ {
5
+ model: "inkeep-context-expert",
6
+ messages: [
7
+ {
8
+ role: "system",
9
+ content: `You are a helpful assistant that suggests form field values based on context. You will receive form field information including field names, descriptions, input types, and available options for select fields.
10
+
11
+ For each field, consider its description, input type, and available options (for select fields).
12
+
13
+ You must respond with a JSON object where keys are the field names and values match the expected input type and length for that field.`
14
+ },
15
+ {
16
+ role: "user",
17
+ content: `Based on these primary field values:
18
+ ${o}
19
+
20
+ Suggest values for these additional fields:
21
+ ${i}`
22
+ }
23
+ ],
24
+ response_format: {
25
+ type: "json_object"
26
+ }
27
+ },
28
+ s ? { headers: s } : void 0
29
+ )).choices[0]?.message?.content;
30
+ return {
31
+ suggestedValues: t ? JSON.parse(t) : {}
32
+ };
33
+ };
34
+ export {
35
+ l as generateContextModelResponse
36
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={type:"object",properties:{aiAnnotations:{type:"object",properties:{answerConfidence:{anyOf:[{type:"string",const:"very_confident",description:"Very confident"},{type:"string",const:"somewhat_confident",description:"Somewhat confident"},{type:"string",const:"not_confident",description:"Not confident"},{type:"string",const:"no_sources",description:"No Sources"},{type:"string",const:"other",description:"Other"}]}},required:["answerConfidence"],additionalProperties:!0}},required:["aiAnnotations"],additionalProperties:!1,$schema:"http://json-schema.org/draft-07/schema#"};exports.escalationSchema=e;
@@ -0,0 +1,2 @@
1
+ import { ToolsJSONSchema } from '@inkeep/cxkit-types';
2
+ export declare const escalationSchema: ToolsJSONSchema;
@@ -0,0 +1,2 @@
1
+ import { ToolsJSONSchema } from '@inkeep/cxkit-types';
2
+ export declare const escalationSchema: ToolsJSONSchema;
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ const e = {
3
+ type: "object",
4
+ properties: {
5
+ aiAnnotations: {
6
+ type: "object",
7
+ properties: {
8
+ answerConfidence: {
9
+ anyOf: [
10
+ {
11
+ type: "string",
12
+ const: "very_confident",
13
+ description: "Very confident"
14
+ },
15
+ {
16
+ type: "string",
17
+ const: "somewhat_confident",
18
+ description: "Somewhat confident"
19
+ },
20
+ {
21
+ type: "string",
22
+ const: "not_confident",
23
+ description: "Not confident"
24
+ },
25
+ {
26
+ type: "string",
27
+ const: "no_sources",
28
+ description: "No Sources"
29
+ },
30
+ {
31
+ type: "string",
32
+ const: "other",
33
+ description: "Other"
34
+ }
35
+ ]
36
+ }
37
+ },
38
+ required: ["answerConfidence"],
39
+ additionalProperties: !0
40
+ }
41
+ },
42
+ required: ["aiAnnotations"],
43
+ additionalProperties: !1,
44
+ $schema: "http://json-schema.org/draft-07/schema#"
45
+ };
46
+ export {
47
+ e as escalationSchema
48
+ };