@inkeep/agents-ui 0.0.0-dev-20260313222128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (557) hide show
  1. package/LICENSE +64 -0
  2. package/README.md +1 -0
  3. package/dist/_virtual/index.cjs +1 -0
  4. package/dist/_virtual/index.js +4 -0
  5. package/dist/_virtual/use-sync-external-store-shim.development.cjs +1 -0
  6. package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
  7. package/dist/_virtual/use-sync-external-store-shim.production.cjs +1 -0
  8. package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
  9. package/dist/color-mode/index.cjs +1 -0
  10. package/dist/color-mode/index.d.ts +20 -0
  11. package/dist/color-mode/index.js +170 -0
  12. package/dist/index.cjs +1 -0
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.js +238 -0
  15. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
  16. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
  17. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +9 -0
  18. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
  19. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.cjs +1 -0
  20. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.js +8 -0
  21. package/dist/primitives/atoms/avatars/ai.cjs +1 -0
  22. package/dist/primitives/atoms/avatars/ai.d.ts +3 -0
  23. package/dist/primitives/atoms/avatars/ai.js +99 -0
  24. package/dist/primitives/atoms/avatars/user.cjs +1 -0
  25. package/dist/primitives/atoms/avatars/user.d.ts +3 -0
  26. package/dist/primitives/atoms/avatars/user.js +27 -0
  27. package/dist/primitives/atoms/cmdk/command-score.cjs +1 -0
  28. package/dist/primitives/atoms/cmdk/command-score.d.ts +1 -0
  29. package/dist/primitives/atoms/cmdk/command-score.js +46 -0
  30. package/dist/primitives/atoms/cmdk/index.cjs +1 -0
  31. package/dist/primitives/atoms/cmdk/index.d.ts +460 -0
  32. package/dist/primitives/atoms/cmdk/index.js +521 -0
  33. package/dist/primitives/atoms/codeblock/index.cjs +1 -0
  34. package/dist/primitives/atoms/codeblock/index.d.ts +10 -0
  35. package/dist/primitives/atoms/codeblock/index.js +40 -0
  36. package/dist/primitives/atoms/combobox.cjs +1 -0
  37. package/dist/primitives/atoms/combobox.js +275 -0
  38. package/dist/primitives/atoms/custom-styles.cjs +1 -0
  39. package/dist/primitives/atoms/custom-styles.d.ts +5 -0
  40. package/dist/primitives/atoms/custom-styles.js +57 -0
  41. package/dist/primitives/atoms/dialog.cjs +1 -0
  42. package/dist/primitives/atoms/dialog.d.ts +94 -0
  43. package/dist/primitives/atoms/dialog.js +227 -0
  44. package/dist/primitives/atoms/error-boundary.cjs +1 -0
  45. package/dist/primitives/atoms/error-boundary.d.ts +6 -0
  46. package/dist/primitives/atoms/error-boundary.js +9 -0
  47. package/dist/primitives/atoms/icons/built-in-icon-renderer.cjs +1 -0
  48. package/dist/primitives/atoms/icons/built-in-icon-renderer.d.ts +6 -0
  49. package/dist/primitives/atoms/icons/built-in-icon-renderer.js +51 -0
  50. package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -0
  51. package/dist/primitives/atoms/icons/built-in-icons.d.ts +86 -0
  52. package/dist/primitives/atoms/icons/built-in-icons.js +89 -0
  53. package/dist/primitives/atoms/icons/checkbox-icon.cjs +1 -0
  54. package/dist/primitives/atoms/icons/checkbox-icon.d.ts +1 -0
  55. package/dist/primitives/atoms/icons/checkbox-icon.js +24 -0
  56. package/dist/primitives/atoms/icons/collections/bi.cjs +1 -0
  57. package/dist/primitives/atoms/icons/collections/bi.d.ts +4 -0
  58. package/dist/primitives/atoms/icons/collections/bi.js +49 -0
  59. package/dist/primitives/atoms/icons/collections/fi.cjs +1 -0
  60. package/dist/primitives/atoms/icons/collections/fi.d.ts +2 -0
  61. package/dist/primitives/atoms/icons/collections/fi.js +29 -0
  62. package/dist/primitives/atoms/icons/collections/gr.cjs +1 -0
  63. package/dist/primitives/atoms/icons/collections/gr.d.ts +2 -0
  64. package/dist/primitives/atoms/icons/collections/gr.js +21 -0
  65. package/dist/primitives/atoms/icons/collections/io5.cjs +1 -0
  66. package/dist/primitives/atoms/icons/collections/io5.d.ts +34 -0
  67. package/dist/primitives/atoms/icons/collections/io5.js +806 -0
  68. package/dist/primitives/atoms/icons/collections/pi.cjs +1 -0
  69. package/dist/primitives/atoms/icons/collections/pi.d.ts +4 -0
  70. package/dist/primitives/atoms/icons/collections/pi.js +49 -0
  71. package/dist/primitives/atoms/icons/custom-icon.cjs +1 -0
  72. package/dist/primitives/atoms/icons/custom-icon.d.ts +6 -0
  73. package/dist/primitives/atoms/icons/custom-icon.js +19 -0
  74. package/dist/primitives/atoms/icons/generate-icon.cjs +1 -0
  75. package/dist/primitives/atoms/icons/generate-icon.d.ts +28 -0
  76. package/dist/primitives/atoms/icons/generate-icon.js +56 -0
  77. package/dist/primitives/atoms/icons/index.cjs +1 -0
  78. package/dist/primitives/atoms/icons/index.d.ts +2 -0
  79. package/dist/primitives/atoms/icons/index.js +6 -0
  80. package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -0
  81. package/dist/primitives/atoms/icons/inkeep-default-icons.d.ts +2 -0
  82. package/dist/primitives/atoms/icons/inkeep-default-icons.js +28 -0
  83. package/dist/primitives/atoms/link.cjs +1 -0
  84. package/dist/primitives/atoms/link.d.ts +14 -0
  85. package/dist/primitives/atoms/link.js +35 -0
  86. package/dist/primitives/atoms/markdown/components.cjs +1 -0
  87. package/dist/primitives/atoms/markdown/components.d.ts +31 -0
  88. package/dist/primitives/atoms/markdown/components.js +76 -0
  89. package/dist/primitives/atoms/markdown/index.cjs +1 -0
  90. package/dist/primitives/atoms/markdown/index.d.ts +17 -0
  91. package/dist/primitives/atoms/markdown/index.js +121 -0
  92. package/dist/primitives/atoms/markdown/rehype-inline-code-property.cjs +1 -0
  93. package/dist/primitives/atoms/markdown/rehype-inline-code-property.d.ts +1 -0
  94. package/dist/primitives/atoms/markdown/rehype-inline-code-property.js +12 -0
  95. package/dist/primitives/atoms/portal-with-theme.cjs +1 -0
  96. package/dist/primitives/atoms/portal-with-theme.d.ts +2 -0
  97. package/dist/primitives/atoms/portal-with-theme.js +12 -0
  98. package/dist/primitives/atoms/portal.cjs +1 -0
  99. package/dist/primitives/atoms/portal.d.ts +8 -0
  100. package/dist/primitives/atoms/portal.js +19 -0
  101. package/dist/primitives/atoms/select.cjs +1 -0
  102. package/dist/primitives/atoms/select.d.ts +136 -0
  103. package/dist/primitives/atoms/select.js +785 -0
  104. package/dist/primitives/atoms/shadow/context.cjs +1 -0
  105. package/dist/primitives/atoms/shadow/context.d.ts +14 -0
  106. package/dist/primitives/atoms/shadow/context.js +54 -0
  107. package/dist/primitives/atoms/shadow/create.cjs +1 -0
  108. package/dist/primitives/atoms/shadow/create.d.ts +8 -0
  109. package/dist/primitives/atoms/shadow/create.js +56 -0
  110. package/dist/primitives/atoms/shadow/index.d.ts +1 -0
  111. package/dist/primitives/atoms/shadow/root.cjs +1 -0
  112. package/dist/primitives/atoms/shadow/root.d.ts +5 -0
  113. package/dist/primitives/atoms/shadow/root.js +22 -0
  114. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.cjs +1 -0
  115. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.d.ts +2 -0
  116. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.js +11 -0
  117. package/dist/primitives/atoms/shadow/utils.cjs +1 -0
  118. package/dist/primitives/atoms/shadow/utils.d.ts +9 -0
  119. package/dist/primitives/atoms/shadow/utils.js +16 -0
  120. package/dist/primitives/components/chat-bubble/index.cjs +1 -0
  121. package/dist/primitives/components/chat-bubble/index.d.ts +10 -0
  122. package/dist/primitives/components/chat-bubble/index.js +38 -0
  123. package/dist/primitives/components/chat-button.cjs +1 -0
  124. package/dist/primitives/components/chat-button.d.ts +20 -0
  125. package/dist/primitives/components/chat-button.js +51 -0
  126. package/dist/primitives/components/chat-history/index.cjs +1 -0
  127. package/dist/primitives/components/chat-history/index.d.ts +27 -0
  128. package/dist/primitives/components/chat-history/index.js +105 -0
  129. package/dist/primitives/components/data-summaries.cjs +1 -0
  130. package/dist/primitives/components/data-summaries.d.ts +14 -0
  131. package/dist/primitives/components/data-summaries.js +38 -0
  132. package/dist/primitives/components/embedded-chat/chat-provider.cjs +1 -0
  133. package/dist/primitives/components/embedded-chat/chat-provider.d.ts +19 -0
  134. package/dist/primitives/components/embedded-chat/chat-provider.js +20 -0
  135. package/dist/primitives/components/embedded-chat/use-captcha.cjs +1 -0
  136. package/dist/primitives/components/embedded-chat/use-captcha.d.ts +30 -0
  137. package/dist/primitives/components/embedded-chat/use-captcha.js +67 -0
  138. package/dist/primitives/components/embedded-chat/use-chat-action.cjs +1 -0
  139. package/dist/primitives/components/embedded-chat/use-chat-action.d.ts +9 -0
  140. package/dist/primitives/components/embedded-chat/use-chat-action.js +41 -0
  141. package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +3 -0
  142. package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +57 -0
  143. package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +312 -0
  144. package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -0
  145. package/dist/primitives/components/embedded-chat/use-stream-processor.d.ts +30 -0
  146. package/dist/primitives/components/embedded-chat/use-stream-processor.js +159 -0
  147. package/dist/primitives/components/embedded-chat.cjs +11 -0
  148. package/dist/primitives/components/embedded-chat.d.ts +461 -0
  149. package/dist/primitives/components/embedded-chat.js +2051 -0
  150. package/dist/primitives/components/embedded-search/search-provider.cjs +1 -0
  151. package/dist/primitives/components/embedded-search/search-provider.d.ts +21 -0
  152. package/dist/primitives/components/embedded-search/search-provider.js +26 -0
  153. package/dist/primitives/components/embedded-search/transform-results.cjs +1 -0
  154. package/dist/primitives/components/embedded-search/transform-results.d.ts +3 -0
  155. package/dist/primitives/components/embedded-search/transform-results.js +47 -0
  156. package/dist/primitives/components/embedded-search/url-query.cjs +1 -0
  157. package/dist/primitives/components/embedded-search/url-query.d.ts +4 -0
  158. package/dist/primitives/components/embedded-search/url-query.js +12 -0
  159. package/dist/primitives/components/embedded-search/use-inkeep-search.cjs +1 -0
  160. package/dist/primitives/components/embedded-search/use-inkeep-search.d.ts +19 -0
  161. package/dist/primitives/components/embedded-search/use-inkeep-search.js +35 -0
  162. package/dist/primitives/components/embedded-search/use-search-filter.cjs +1 -0
  163. package/dist/primitives/components/embedded-search/use-search-filter.d.ts +1 -0
  164. package/dist/primitives/components/embedded-search/use-search-filter.js +77 -0
  165. package/dist/primitives/components/embedded-search.cjs +1 -0
  166. package/dist/primitives/components/embedded-search.d.ts +249 -0
  167. package/dist/primitives/components/embedded-search.js +628 -0
  168. package/dist/primitives/components/factory.cjs +1 -0
  169. package/dist/primitives/components/factory.d.ts +19 -0
  170. package/dist/primitives/components/factory.js +39 -0
  171. package/dist/primitives/components/index.cjs +1 -0
  172. package/dist/primitives/components/index.d.ts +13 -0
  173. package/dist/primitives/components/index.js +33 -0
  174. package/dist/primitives/components/modal/modal-provider.cjs +1 -0
  175. package/dist/primitives/components/modal/modal-provider.d.ts +12 -0
  176. package/dist/primitives/components/modal/modal-provider.js +8 -0
  177. package/dist/primitives/components/modal/use-inkeep-modal.cjs +1 -0
  178. package/dist/primitives/components/modal/use-inkeep-modal.d.ts +7 -0
  179. package/dist/primitives/components/modal/use-inkeep-modal.js +9 -0
  180. package/dist/primitives/components/modal/widget-auto-focus.cjs +1 -0
  181. package/dist/primitives/components/modal/widget-auto-focus.d.ts +2 -0
  182. package/dist/primitives/components/modal/widget-auto-focus.js +25 -0
  183. package/dist/primitives/components/modal.cjs +1 -0
  184. package/dist/primitives/components/modal.d.ts +18 -0
  185. package/dist/primitives/components/modal.js +40 -0
  186. package/dist/primitives/components/presence.cjs +1 -0
  187. package/dist/primitives/components/presence.d.ts +8 -0
  188. package/dist/primitives/components/presence.js +26 -0
  189. package/dist/primitives/components/searchbar.cjs +1 -0
  190. package/dist/primitives/components/searchbar.d.ts +23 -0
  191. package/dist/primitives/components/searchbar.js +54 -0
  192. package/dist/primitives/components/sidebar-chat/index.cjs +1 -0
  193. package/dist/primitives/components/sidebar-chat/index.d.ts +9 -0
  194. package/dist/primitives/components/sidebar-chat/index.js +67 -0
  195. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.cjs +1 -0
  196. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.d.ts +5 -0
  197. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.js +34 -0
  198. package/dist/primitives/components/tagline-logo-icon.cjs +1 -0
  199. package/dist/primitives/components/tagline-logo-icon.d.ts +1 -0
  200. package/dist/primitives/components/tagline-logo-icon.js +26 -0
  201. package/dist/primitives/components/use-component-trigger.cjs +1 -0
  202. package/dist/primitives/components/use-component-trigger.d.ts +5 -0
  203. package/dist/primitives/components/use-component-trigger.js +17 -0
  204. package/dist/primitives/constants/search.cjs +1 -0
  205. package/dist/primitives/constants/search.d.ts +1 -0
  206. package/dist/primitives/constants/search.js +5 -0
  207. package/dist/primitives/hooks/index.cjs +1 -0
  208. package/dist/primitives/hooks/index.d.ts +12 -0
  209. package/dist/primitives/hooks/index.js +26 -0
  210. package/dist/primitives/hooks/use-anonymous-session.cjs +1 -0
  211. package/dist/primitives/hooks/use-anonymous-session.d.ts +12 -0
  212. package/dist/primitives/hooks/use-anonymous-session.js +82 -0
  213. package/dist/primitives/hooks/use-boolean.cjs +1 -0
  214. package/dist/primitives/hooks/use-boolean.d.ts +10 -0
  215. package/dist/primitives/hooks/use-boolean.js +17 -0
  216. package/dist/primitives/hooks/use-component-classnames.cjs +1 -0
  217. package/dist/primitives/hooks/use-component-classnames.d.ts +6 -0
  218. package/dist/primitives/hooks/use-component-classnames.js +14 -0
  219. package/dist/primitives/hooks/use-container-size.cjs +1 -0
  220. package/dist/primitives/hooks/use-container-size.d.ts +5 -0
  221. package/dist/primitives/hooks/use-container-size.js +18 -0
  222. package/dist/primitives/hooks/use-conversation-loader.cjs +1 -0
  223. package/dist/primitives/hooks/use-conversation-loader.d.ts +13 -0
  224. package/dist/primitives/hooks/use-conversation-loader.js +36 -0
  225. package/dist/primitives/hooks/use-copy-to-clipboard.cjs +1 -0
  226. package/dist/primitives/hooks/use-copy-to-clipboard.d.ts +3 -0
  227. package/dist/primitives/hooks/use-copy-to-clipboard.js +24 -0
  228. package/dist/primitives/hooks/use-debounce.cjs +1 -0
  229. package/dist/primitives/hooks/use-debounce.d.ts +1 -0
  230. package/dist/primitives/hooks/use-debounce.js +16 -0
  231. package/dist/primitives/hooks/use-inkeep-api-client.cjs +1 -0
  232. package/dist/primitives/hooks/use-inkeep-api-client.d.ts +33 -0
  233. package/dist/primitives/hooks/use-inkeep-api-client.js +87 -0
  234. package/dist/primitives/hooks/use-inkeep-open-state.cjs +1 -0
  235. package/dist/primitives/hooks/use-inkeep-open-state.d.ts +18 -0
  236. package/dist/primitives/hooks/use-inkeep-open-state.js +47 -0
  237. package/dist/primitives/hooks/use-instant-update.cjs +1 -0
  238. package/dist/primitives/hooks/use-instant-update.d.ts +16 -0
  239. package/dist/primitives/hooks/use-instant-update.js +16 -0
  240. package/dist/primitives/hooks/use-is-mounted.cjs +1 -0
  241. package/dist/primitives/hooks/use-is-mounted.d.ts +1 -0
  242. package/dist/primitives/hooks/use-is-mounted.js +11 -0
  243. package/dist/primitives/hooks/use-local-storage.cjs +1 -0
  244. package/dist/primitives/hooks/use-local-storage.d.ts +8 -0
  245. package/dist/primitives/hooks/use-local-storage.js +26 -0
  246. package/dist/primitives/hooks/use-media-query.cjs +1 -0
  247. package/dist/primitives/hooks/use-media-query.d.ts +1 -0
  248. package/dist/primitives/hooks/use-media-query.js +14 -0
  249. package/dist/primitives/hooks/use-resize-observer.cjs +1 -0
  250. package/dist/primitives/hooks/use-resize-observer.d.ts +12 -0
  251. package/dist/primitives/hooks/use-resize-observer.js +32 -0
  252. package/dist/primitives/hooks/use-scrolling-fades.cjs +1 -0
  253. package/dist/primitives/hooks/use-scrolling-fades.d.ts +2 -0
  254. package/dist/primitives/hooks/use-scrolling-fades.js +18 -0
  255. package/dist/primitives/hooks/use-settle-action.cjs +1 -0
  256. package/dist/primitives/hooks/use-settle-action.d.ts +3 -0
  257. package/dist/primitives/hooks/use-settle-action.js +11 -0
  258. package/dist/primitives/hooks/use-simple-scroll.cjs +1 -0
  259. package/dist/primitives/hooks/use-simple-scroll.d.ts +16 -0
  260. package/dist/primitives/hooks/use-simple-scroll.js +51 -0
  261. package/dist/primitives/hooks/use-streaming-events.cjs +1 -0
  262. package/dist/primitives/hooks/use-streaming-events.d.ts +8 -0
  263. package/dist/primitives/hooks/use-streaming-events.js +33 -0
  264. package/dist/primitives/index.cjs +1 -0
  265. package/dist/primitives/index.d.ts +13 -0
  266. package/dist/primitives/index.js +174 -0
  267. package/dist/primitives/providers/attachment-item-provider.cjs +1 -0
  268. package/dist/primitives/providers/attachment-item-provider.d.ts +9 -0
  269. package/dist/primitives/providers/attachment-item-provider.js +13 -0
  270. package/dist/primitives/providers/attachments-bar-provider.cjs +1 -0
  271. package/dist/primitives/providers/attachments-bar-provider.d.ts +30 -0
  272. package/dist/primitives/providers/attachments-bar-provider.js +57 -0
  273. package/dist/primitives/providers/base-events-provider.cjs +1 -0
  274. package/dist/primitives/providers/base-events-provider.d.ts +8 -0
  275. package/dist/primitives/providers/base-events-provider.js +37 -0
  276. package/dist/primitives/providers/chat-bubble-provider.cjs +1 -0
  277. package/dist/primitives/providers/chat-bubble-provider.d.ts +22 -0
  278. package/dist/primitives/providers/chat-bubble-provider.js +19 -0
  279. package/dist/primitives/providers/chat-form-provider.cjs +1 -0
  280. package/dist/primitives/providers/chat-form-provider.d.ts +26 -0
  281. package/dist/primitives/providers/chat-form-provider.js +109 -0
  282. package/dist/primitives/providers/chat-history-provider.cjs +1 -0
  283. package/dist/primitives/providers/chat-history-provider.d.ts +32 -0
  284. package/dist/primitives/providers/chat-history-provider.js +105 -0
  285. package/dist/primitives/providers/config-provider.cjs +1 -0
  286. package/dist/primitives/providers/config-provider.d.ts +24 -0
  287. package/dist/primitives/providers/config-provider.js +40 -0
  288. package/dist/primitives/providers/feedback-item-provider.cjs +1 -0
  289. package/dist/primitives/providers/feedback-item-provider.d.ts +10 -0
  290. package/dist/primitives/providers/feedback-item-provider.js +16 -0
  291. package/dist/primitives/providers/feedback-provider.cjs +1 -0
  292. package/dist/primitives/providers/feedback-provider.d.ts +16 -0
  293. package/dist/primitives/providers/feedback-provider.js +83 -0
  294. package/dist/primitives/providers/form-field-provider.cjs +1 -0
  295. package/dist/primitives/providers/form-field-provider.d.ts +15 -0
  296. package/dist/primitives/providers/form-field-provider.js +17 -0
  297. package/dist/primitives/providers/help-menu-provider.cjs +1 -0
  298. package/dist/primitives/providers/help-menu-provider.d.ts +11 -0
  299. package/dist/primitives/providers/help-menu-provider.js +19 -0
  300. package/dist/primitives/providers/hover-popover-provider.cjs +1 -0
  301. package/dist/primitives/providers/hover-popover-provider.d.ts +10 -0
  302. package/dist/primitives/providers/hover-popover-provider.js +13 -0
  303. package/dist/primitives/providers/index.cjs +1 -0
  304. package/dist/primitives/providers/index.d.ts +19 -0
  305. package/dist/primitives/providers/index.js +65 -0
  306. package/dist/primitives/providers/markdown-provider.cjs +1 -0
  307. package/dist/primitives/providers/markdown-provider.d.ts +9 -0
  308. package/dist/primitives/providers/markdown-provider.js +8 -0
  309. package/dist/primitives/providers/message-attachments-provider.cjs +1 -0
  310. package/dist/primitives/providers/message-attachments-provider.d.ts +13 -0
  311. package/dist/primitives/providers/message-attachments-provider.js +27 -0
  312. package/dist/primitives/providers/message-provider.cjs +1 -0
  313. package/dist/primitives/providers/message-provider.d.ts +10 -0
  314. package/dist/primitives/providers/message-provider.js +14 -0
  315. package/dist/primitives/providers/root-provider.cjs +1 -0
  316. package/dist/primitives/providers/root-provider.d.ts +8 -0
  317. package/dist/primitives/providers/root-provider.js +21 -0
  318. package/dist/primitives/providers/search-events-provider.cjs +1 -0
  319. package/dist/primitives/providers/search-events-provider.d.ts +8 -0
  320. package/dist/primitives/providers/search-events-provider.js +17 -0
  321. package/dist/primitives/providers/sidebar-chat-provider.cjs +1 -0
  322. package/dist/primitives/providers/sidebar-chat-provider.d.ts +61 -0
  323. package/dist/primitives/providers/sidebar-chat-provider.js +37 -0
  324. package/dist/primitives/providers/source-item-provider.cjs +1 -0
  325. package/dist/primitives/providers/source-item-provider.d.ts +12 -0
  326. package/dist/primitives/providers/source-item-provider.js +13 -0
  327. package/dist/primitives/providers/theme-provider.cjs +3 -0
  328. package/dist/primitives/providers/theme-provider.d.ts +3 -0
  329. package/dist/primitives/providers/theme-provider.js +79 -0
  330. package/dist/primitives/providers/widget-provider.cjs +1 -0
  331. package/dist/primitives/providers/widget-provider.d.ts +10 -0
  332. package/dist/primitives/providers/widget-provider.js +8 -0
  333. package/dist/primitives/utils/component-ids.cjs +1 -0
  334. package/dist/primitives/utils/component-ids.d.ts +662 -0
  335. package/dist/primitives/utils/component-ids.js +361 -0
  336. package/dist/primitives/utils/compose-event-handlers.cjs +1 -0
  337. package/dist/primitives/utils/compose-event-handlers.d.ts +3 -0
  338. package/dist/primitives/utils/compose-event-handlers.js +10 -0
  339. package/dist/primitives/utils/compose-refs.cjs +1 -0
  340. package/dist/primitives/utils/compose-refs.d.ts +5 -0
  341. package/dist/primitives/utils/compose-refs.js +30 -0
  342. package/dist/primitives/utils/default-settings.cjs +1 -0
  343. package/dist/primitives/utils/default-settings.d.ts +169 -0
  344. package/dist/primitives/utils/default-settings.js +52 -0
  345. package/dist/primitives/utils/form.cjs +1 -0
  346. package/dist/primitives/utils/form.d.ts +3 -0
  347. package/dist/primitives/utils/form.js +19 -0
  348. package/dist/primitives/utils/generate-uid.cjs +1 -0
  349. package/dist/primitives/utils/generate-uid.d.ts +2 -0
  350. package/dist/primitives/utils/generate-uid.js +14 -0
  351. package/dist/primitives/utils/get-message-metadata.d.ts +8 -0
  352. package/dist/primitives/utils/get-source-icon.cjs +1 -0
  353. package/dist/primitives/utils/get-source-icon.d.ts +2 -0
  354. package/dist/primitives/utils/get-source-icon.js +11 -0
  355. package/dist/primitives/utils/highlight-emphasis.cjs +1 -0
  356. package/dist/primitives/utils/highlight-emphasis.d.ts +4 -0
  357. package/dist/primitives/utils/highlight-emphasis.js +15 -0
  358. package/dist/primitives/utils/merge-props.cjs +1 -0
  359. package/dist/primitives/utils/merge-props.d.ts +7 -0
  360. package/dist/primitives/utils/merge-props.js +41 -0
  361. package/dist/primitives/utils/misc.cjs +1 -0
  362. package/dist/primitives/utils/misc.d.ts +12 -0
  363. package/dist/primitives/utils/misc.js +31 -0
  364. package/dist/primitives/utils/split-props.cjs +1 -0
  365. package/dist/primitives/utils/split-props.d.ts +14 -0
  366. package/dist/primitives/utils/split-props.js +10 -0
  367. package/dist/react/chat-button-modal.cjs +1 -0
  368. package/dist/react/chat-button-modal.d.ts +22 -0
  369. package/dist/react/chat-button-modal.js +41 -0
  370. package/dist/react/chat-button.cjs +1 -0
  371. package/dist/react/chat-button.d.ts +28 -0
  372. package/dist/react/chat-button.js +73 -0
  373. package/dist/react/embedded-chat.cjs +1 -0
  374. package/dist/react/embedded-chat.d.ts +15 -0
  375. package/dist/react/embedded-chat.js +431 -0
  376. package/dist/react/embedded-search-and-chat.cjs +1 -0
  377. package/dist/react/embedded-search-and-chat.d.ts +40 -0
  378. package/dist/react/embedded-search-and-chat.impl.cjs +1 -0
  379. package/dist/react/embedded-search-and-chat.impl.d.ts +9 -0
  380. package/dist/react/embedded-search-and-chat.impl.js +43 -0
  381. package/dist/react/embedded-search-and-chat.js +66 -0
  382. package/dist/react/embedded-search.cjs +1 -0
  383. package/dist/react/embedded-search.d.ts +17 -0
  384. package/dist/react/embedded-search.js +181 -0
  385. package/dist/react/index.cjs +1 -0
  386. package/dist/react/index.d.ts +13 -0
  387. package/dist/react/index.js +238 -0
  388. package/dist/react/modal.chat.cjs +1 -0
  389. package/dist/react/modal.chat.d.ts +9 -0
  390. package/dist/react/modal.chat.js +21 -0
  391. package/dist/react/modal.cjs +1 -0
  392. package/dist/react/modal.d.ts +23 -0
  393. package/dist/react/modal.js +27 -0
  394. package/dist/react/modal.search-and-chat.cjs +1 -0
  395. package/dist/react/modal.search-and-chat.d.ts +6 -0
  396. package/dist/react/modal.search-and-chat.js +27 -0
  397. package/dist/react/modal.search.cjs +1 -0
  398. package/dist/react/modal.search.d.ts +6 -0
  399. package/dist/react/modal.search.js +21 -0
  400. package/dist/react/searchbar.cjs +1 -0
  401. package/dist/react/searchbar.d.ts +13 -0
  402. package/dist/react/searchbar.js +68 -0
  403. package/dist/react/sidebar-chat.cjs +1 -0
  404. package/dist/react/sidebar-chat.d.ts +4 -0
  405. package/dist/react/sidebar-chat.js +53 -0
  406. package/dist/react/utils.cjs +1 -0
  407. package/dist/react/utils.d.ts +6 -0
  408. package/dist/react/utils.js +20 -0
  409. package/dist/react/widget-toggle.cjs +1 -0
  410. package/dist/react/widget-toggle.d.ts +14 -0
  411. package/dist/react/widget-toggle.js +65 -0
  412. package/dist/styled/components/chat-bubble.cjs +1 -0
  413. package/dist/styled/components/chat-bubble.d.ts +5 -0
  414. package/dist/styled/components/chat-bubble.js +70 -0
  415. package/dist/styled/components/chat-button.cjs +1 -0
  416. package/dist/styled/components/chat-button.d.ts +9 -0
  417. package/dist/styled/components/chat-button.js +60 -0
  418. package/dist/styled/components/chat-history.cjs +1 -0
  419. package/dist/styled/components/chat-history.d.ts +15 -0
  420. package/dist/styled/components/chat-history.js +197 -0
  421. package/dist/styled/components/data-summary-group.cjs +1 -0
  422. package/dist/styled/components/data-summary-group.d.ts +11 -0
  423. package/dist/styled/components/data-summary-group.js +96 -0
  424. package/dist/styled/components/embedded-chat/session-loading.cjs +1 -0
  425. package/dist/styled/components/embedded-chat/session-loading.d.ts +1 -0
  426. package/dist/styled/components/embedded-chat/session-loading.js +23 -0
  427. package/dist/styled/components/embedded-chat.cjs +1 -0
  428. package/dist/styled/components/embedded-chat.d.ts +211 -0
  429. package/dist/styled/components/embedded-chat.js +1997 -0
  430. package/dist/styled/components/embedded-search/results-loading.cjs +1 -0
  431. package/dist/styled/components/embedded-search/results-loading.d.ts +1 -0
  432. package/dist/styled/components/embedded-search/results-loading.js +39 -0
  433. package/dist/styled/components/embedded-search.cjs +1 -0
  434. package/dist/styled/components/embedded-search.d.ts +73 -0
  435. package/dist/styled/components/embedded-search.js +680 -0
  436. package/dist/styled/components/index.cjs +1 -0
  437. package/dist/styled/components/index.d.ts +13 -0
  438. package/dist/styled/components/index.js +28 -0
  439. package/dist/styled/components/loading-indicator.cjs +1 -0
  440. package/dist/styled/components/loading-indicator.d.ts +1 -0
  441. package/dist/styled/components/loading-indicator.js +36 -0
  442. package/dist/styled/components/message.cjs +1 -0
  443. package/dist/styled/components/message.d.ts +4 -0
  444. package/dist/styled/components/message.js +333 -0
  445. package/dist/styled/components/modal.cjs +1 -0
  446. package/dist/styled/components/modal.d.ts +6 -0
  447. package/dist/styled/components/modal.js +46 -0
  448. package/dist/styled/components/searchbar.cjs +1 -0
  449. package/dist/styled/components/searchbar.d.ts +11 -0
  450. package/dist/styled/components/searchbar.js +81 -0
  451. package/dist/styled/components/shadow.cjs +1 -0
  452. package/dist/styled/components/shadow.d.ts +3 -0
  453. package/dist/styled/components/shadow.js +8 -0
  454. package/dist/styled/components/sidebar-chat.cjs +1 -0
  455. package/dist/styled/components/sidebar-chat.d.ts +6 -0
  456. package/dist/styled/components/sidebar-chat.js +90 -0
  457. package/dist/styled/components/ui/markdown-styles.cjs +1 -0
  458. package/dist/styled/components/ui/markdown-styles.d.ts +23 -0
  459. package/dist/styled/components/ui/markdown-styles.js +39 -0
  460. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.cjs +1 -0
  461. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.d.ts +7 -0
  462. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.js +33 -0
  463. package/dist/styled/components/ui/recipes/attachment.cjs +1 -0
  464. package/dist/styled/components/ui/recipes/attachment.d.ts +4 -0
  465. package/dist/styled/components/ui/recipes/attachment.js +28 -0
  466. package/dist/styled/components/ui/recipes/button.cjs +1 -0
  467. package/dist/styled/components/ui/recipes/button.d.ts +6 -0
  468. package/dist/styled/components/ui/recipes/button.js +87 -0
  469. package/dist/styled/components/ui/recipes/checkbox.cjs +1 -0
  470. package/dist/styled/components/ui/recipes/checkbox.d.ts +4 -0
  471. package/dist/styled/components/ui/recipes/checkbox.js +23 -0
  472. package/dist/styled/components/ui/recipes/citation.cjs +1 -0
  473. package/dist/styled/components/ui/recipes/citation.d.ts +4 -0
  474. package/dist/styled/components/ui/recipes/citation.js +75 -0
  475. package/dist/styled/components/ui/recipes/combobox.cjs +1 -0
  476. package/dist/styled/components/ui/recipes/combobox.d.ts +4 -0
  477. package/dist/styled/components/ui/recipes/combobox.js +57 -0
  478. package/dist/styled/components/ui/recipes/icon.cjs +1 -0
  479. package/dist/styled/components/ui/recipes/icon.d.ts +2 -0
  480. package/dist/styled/components/ui/recipes/icon.js +6 -0
  481. package/dist/styled/components/ui/recipes/index.cjs +1 -0
  482. package/dist/styled/components/ui/recipes/index.d.ts +16 -0
  483. package/dist/styled/components/ui/recipes/index.js +39 -0
  484. package/dist/styled/components/ui/recipes/input.cjs +1 -0
  485. package/dist/styled/components/ui/recipes/input.d.ts +5 -0
  486. package/dist/styled/components/ui/recipes/input.js +34 -0
  487. package/dist/styled/components/ui/recipes/link.cjs +1 -0
  488. package/dist/styled/components/ui/recipes/link.d.ts +2 -0
  489. package/dist/styled/components/ui/recipes/link.js +13 -0
  490. package/dist/styled/components/ui/recipes/markdown.cjs +1 -0
  491. package/dist/styled/components/ui/recipes/markdown.d.ts +16 -0
  492. package/dist/styled/components/ui/recipes/markdown.js +103 -0
  493. package/dist/styled/components/ui/recipes/modal.cjs +1 -0
  494. package/dist/styled/components/ui/recipes/modal.d.ts +4 -0
  495. package/dist/styled/components/ui/recipes/modal.js +59 -0
  496. package/dist/styled/components/ui/recipes/popover.cjs +1 -0
  497. package/dist/styled/components/ui/recipes/popover.d.ts +4 -0
  498. package/dist/styled/components/ui/recipes/popover.js +20 -0
  499. package/dist/styled/components/ui/recipes/scrollable.cjs +1 -0
  500. package/dist/styled/components/ui/recipes/scrollable.d.ts +4 -0
  501. package/dist/styled/components/ui/recipes/scrollable.js +15 -0
  502. package/dist/styled/components/ui/recipes/select.cjs +1 -0
  503. package/dist/styled/components/ui/recipes/select.d.ts +4 -0
  504. package/dist/styled/components/ui/recipes/select.js +38 -0
  505. package/dist/styled/components/ui/recipes/skeleton.cjs +1 -0
  506. package/dist/styled/components/ui/recipes/skeleton.d.ts +2 -0
  507. package/dist/styled/components/ui/recipes/skeleton.js +16 -0
  508. package/dist/styled/components/ui/recipes/widget-toggle.cjs +1 -0
  509. package/dist/styled/components/ui/recipes/widget-toggle.d.ts +4 -0
  510. package/dist/styled/components/ui/recipes/widget-toggle.js +35 -0
  511. package/dist/styled/index.cjs +1 -0
  512. package/dist/styled/index.d.ts +2 -0
  513. package/dist/styled/index.js +200 -0
  514. package/dist/styled/inkeep.css.cjs +4567 -0
  515. package/dist/styled/inkeep.css.js +4571 -0
  516. package/dist/styled/utils.cjs +1 -0
  517. package/dist/styled/utils.d.ts +4 -0
  518. package/dist/styled/utils.js +11 -0
  519. package/dist/theme/color-utils.cjs +1 -0
  520. package/dist/theme/color-utils.d.ts +1 -0
  521. package/dist/theme/color-utils.js +21 -0
  522. package/dist/theme/colors.cjs +1 -0
  523. package/dist/theme/colors.d.ts +104 -0
  524. package/dist/theme/colors.js +143 -0
  525. package/dist/theme/index.cjs +1 -0
  526. package/dist/theme/index.d.ts +125 -0
  527. package/dist/theme/index.js +58 -0
  528. package/dist/theme/utils/create-css-variables.cjs +1 -0
  529. package/dist/theme/utils/create-css-variables.d.ts +2 -0
  530. package/dist/theme/utils/create-css-variables.js +24 -0
  531. package/dist/theme/utils/generate-theme-variables.cjs +1 -0
  532. package/dist/theme/utils/generate-theme-variables.d.ts +3 -0
  533. package/dist/theme/utils/generate-theme-variables.js +34 -0
  534. package/dist/types/color-mode.d.ts +44 -0
  535. package/dist/types/config/ai.d.ts +269 -0
  536. package/dist/types/config/base.d.ts +358 -0
  537. package/dist/types/config/components.d.ts +16 -0
  538. package/dist/types/config/filters.d.ts +17 -0
  539. package/dist/types/config/index.d.ts +36 -0
  540. package/dist/types/config/open-settings.d.ts +70 -0
  541. package/dist/types/config/search.d.ts +95 -0
  542. package/dist/types/config/settings/actions.d.ts +112 -0
  543. package/dist/types/config/settings/form.d.ts +83 -0
  544. package/dist/types/config/settings/jsonschema.d.ts +105 -0
  545. package/dist/types/config/settings/workflow.d.ts +86 -0
  546. package/dist/types/events.d.ts +188 -0
  547. package/dist/types/icons/built-in.d.ts +1 -0
  548. package/dist/types/icons/custom.d.ts +33 -0
  549. package/dist/types/icons/index.d.ts +2 -0
  550. package/dist/types/index.d.ts +20 -0
  551. package/dist/types/js/index.d.ts +55 -0
  552. package/dist/types/message.d.ts +43 -0
  553. package/dist/types/shadow.d.ts +15 -0
  554. package/dist/types/sources.d.ts +100 -0
  555. package/dist/types/theme.d.ts +25 -0
  556. package/dist/types/widget.d.ts +27 -0
  557. package/package.json +140 -0
package/LICENSE ADDED
@@ -0,0 +1,64 @@
1
+ Inkeep, Inc. Customer License (IICL) v1.1
2
+
3
+ This license agreement ("Agreement") is a legal agreement between you (either an individual or a
4
+ single entity) and Inkeep, Inc. ("Inkeep") for the npm React component package `widgets` (the
5
+ "Software"). By installing, copying, or otherwise using the Software, you agree to be bound by the
6
+ terms of this Agreement.
7
+
8
+ 1. Grant of License
9
+ Subject to the terms of this Agreement, Inkeep grants you a non-exclusive, non-transferable, limited license to install, copy, and use the Software solely for the purpose of serving Inkeep's search and chat services to your own end-users or employees. This license is applicable only as an Inkeep customer, and must be in accordance with Inkeep's search and chat service (the "Service"). You are not permitted to use the Software to act as a reseller, distributor, or vendor to provide Inkeep's search and chat services to third-party customers or use the Software with other search and chat services. The Software may only be used to serve your own end-users or employees.
10
+
11
+ 2. Modification and Extension
12
+ As an Inkeep customer, you are granted the right to modify and extend the Software for your internal business purposes, provided that such modifications and extensions are used solely in conjunction with the Service.
13
+
14
+ 3. Restrictions
15
+ a) You may not reverse engineer, decompile, or disassemble the Software.
16
+ b) You may not distribute or make the Software available to any third parties.
17
+ c) You may not sublicense, rent, lease, or lend the Software.
18
+ d) You may not use the Software or any modifications or extensions thereof with any search and chat services other than the Service.
19
+ e) You may not use the Software if you are not an Inkeep customer.
20
+
21
+ 4. Termination
22
+ This Agreement will terminate automatically if you fail to comply with any of the terms and conditions of this Agreement or if you cease to be an Inkeep customer. Upon termination, you must destroy all copies of the Software, including any modifications or extensions.
23
+
24
+ 5. Copyright The Software is protected by copyright laws and international copyright treaties, as
25
+ well as other intellectual property laws and treaties. All title, copyright, and other
26
+ intellectual property rights in and to the Software are owned by Inkeep or its licensors.
27
+
28
+ 6. No Warranties Inkeep expressly disclaims any warranty for the Software. The Software is provided
29
+ "as is" without any express or implied warranty of any kind, including but not limited to any
30
+ warranties of merchantability, non-infringement, or fitness for a particular purpose.
31
+
32
+ 7. Limitation of Liability In no event shall Inkeep or its licensors be liable for any damages
33
+ whatsoever (including, without limitation, damages for loss of business profits, business
34
+ interruption, loss of business information, or any other pecuniary loss) arising out of the use
35
+ of or inability to use the Software, even if Inkeep has been advised of the possibility of such
36
+ damages.
37
+
38
+ 8. Governing Law This Agreement shall be governed by and construed in accordance with the laws of
39
+ the jurisdiction in which Inkeep is incorporated, excluding its conflict of laws provisions.
40
+
41
+ 9. Entire Agreement This Agreement constitutes the entire agreement between you and Inkeep with
42
+ respect to the Software and supersedes all prior or contemporaneous understandings regarding the
43
+ same, whether written or oral.
44
+
45
+ 10. Additional Provisions With regard to the Software, you may only use the Software in production
46
+ if you (and any entity that you represent) are in compliance with Inkeep's terms of service,
47
+ available at <https://inkeep.com/terms-of-service/> (the "Enterprise Terms"). You are free to
48
+ modify the Software and publish patches to the Software, provided that such modifications and
49
+ patches are used solely in conjunction with the Service. You agree that Inkeep and/or its
50
+ licensors (as applicable) retain all right, title, and interest in and to all such modifications
51
+ and/or patches. You may copy and modify the Software for development and testing purposes,
52
+ without requiring a subscription. You agree that Inkeep and/or its licensors (as applicable)
53
+ retain all right, title, and interest in and to all such modifications. You are not granted any
54
+ other rights beyond what is expressly stated herein. Subject to the foregoing, it is forbidden
55
+ to copy, merge, publish, distribute, sublicense, and/or sell the Software.
56
+
57
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
58
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
59
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
60
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
61
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
62
+
63
+ For all third-party components incorporated into the Software, those components are licensed under
64
+ the original license provided by the owner of the applicable component.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # @inkeep
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
@@ -0,0 +1,4 @@
1
+ var e = { exports: {} };
2
+ export {
3
+ e as __module
4
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ var e = {};
3
+ export {
4
+ e as __exports
5
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ var e = {};
3
+ export {
4
+ e as __exports
5
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),n=require("react"),L=["light","dark"],P="(prefers-color-scheme: dark)",T=typeof window>"u",D=n.createContext(void 0),_={setColorMode:e=>{},colorModes:[]},I=()=>n.useContext(D)??_;function q(e,l){const t=I();return(t.forcedColorMode??t.resolvedColorMode)==="dark"?l:e}const z=e=>(n.useContext(D),x.jsx(N,{...e})),J=()=>{},Q={setColorMode:J,colorModes:["dark"],colorMode:"dark",forcedColorMode:"dark",resolvedColorMode:"dark",systemColorMode:"dark"},F=({children:e})=>x.jsx(D.Provider,{value:Q,children:x.jsx("div",{"data-theme":"dark",children:e})}),G=["light","dark"],N=({forcedColorMode:e,disableTransitionOnChange:l=!1,enableSystem:t=!1,enableColorScheme:y=!0,storageKey:m="inkeep-colorMode",colorModes:r=G,defaultColorMode:o=t?"system":"light",attribute:M="data-theme",value:$,children:S,nonce:j,shadowHostId:p,rootId:h})=>{const[i,a]=n.useState(()=>A(m,o)),[w,d]=n.useState(()=>A(m)),u=$?Object.values($):r,g=n.useCallback(s=>{let c=s;if(!c)return;s==="system"&&t&&(c=B());const C=$?$[c]:c,O=l?W():null,R=p&&h&&document.getElementById(p)?.shadowRoot,E=R?R.getElementById(h)??document.documentElement:document.documentElement;if(M==="class"?(E.classList.remove(...u),C&&E.classList.add(C)):C?E.setAttribute(M,C):E.removeAttribute(M),y){const V=L.includes(o)?o:null,b=L.includes(c)?c:V;E.style.colorScheme=b}O?.()},[]),f=n.useCallback(s=>{a(s);try{localStorage.setItem(m,s)}catch{}},[e]),v=n.useCallback(s=>{const c=B(s);d(c),i==="system"&&t&&!e&&g("system")},[i,e]);n.useEffect(()=>{const s=window.matchMedia(P);return s.addListener(v),v(s),()=>s.removeListener(v)},[v]),n.useEffect(()=>{const s=c=>{if(c.key!==m)return;const C=c.newValue||o;f(C)};return window.addEventListener("storage",s),()=>window.removeEventListener("storage",s)},[f]),n.useEffect(()=>{g(e??i)},[e,i]);const k=n.useMemo(()=>({colorMode:i,setColorMode:f,forcedColorMode:e,resolvedColorMode:i==="system"?w:i,colorModes:t?[...r,"system"]:r,systemColorMode:t?w:void 0}),[i,f,e,w,t,r]);return x.jsxs(D.Provider,{value:k,children:[x.jsx(U,{forcedColorMode:e,disableTransitionOnChange:l,enableSystem:t,enableColorScheme:y,storageKey:m,colorModes:r,defaultColorMode:o,attribute:M,value:$,children:S,attrs:u,nonce:j,shadowHostId:p,rootId:h}),S]})},U=n.memo(({forcedColorMode:e,storageKey:l,attribute:t,enableSystem:y,enableColorScheme:m,defaultColorMode:r,value:o,attrs:M,nonce:$,shadowHostId:S,rootId:j})=>{const p=r==="system",h=(()=>{const d=S&&j?`document.getElementById('${S}').shadowRoot.getElementById('${j}')`:"document.documentElement";if(t==="class"){const u=`c.remove(${M.map(g=>`'${g}'`).join(",")})`;return`var d=${d},c=d.classList;${u};`}return`var d=${d},n='${t}',s='setAttribute';`})(),i=m?(L.includes(r)?r:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${r}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",a=(d,u=!1,g=!0)=>{const f=o?o[d]:d,v=u?`${d}|| ''`:`'${f}'`;let k="";return m&&g&&!u&&L.includes(d)&&(k+=`d.style.colorScheme = '${d}';`),t==="class"?u||f?k+=`c.add(${v})`:k+="null":f&&(k+=`d[s](n,${v})`),k},w=e?`!function(){${h}${a(e)}}()`:y?`!function(){try{${h}var e=localStorage.getItem('${l}');if('system'===e||(!e&&${p})){var t='${P}',m=window.matchMedia(t);if(m.media!==t||m.matches){${a("dark")}}else{${a("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${a(o?"x[e]":"e",!0)}}${p?"":`else{${a(r,!1,!1)}}`}${i}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${l}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${a(o?"x[e]":"e",!0)}}else{${a(r,!1,!1)};}${i}}catch(t){}}();`;return x.jsx("script",{nonce:$,dangerouslySetInnerHTML:{__html:w}})},()=>!0),A=(e,l)=>{if(T)return;let t;try{t=localStorage.getItem(e)||void 0}catch{}return t||l},W=()=>{const e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},B=e=>(e||(e=window.matchMedia(P)),e.matches?"dark":"light");exports.ColorMode=N;exports.ColorModeProvider=z;exports.DarkModeProvider=F;exports.useColorMode=I;exports.useColorModeValue=q;
@@ -0,0 +1,20 @@
1
+ import { ColorModeProviderProps, UseColorModeProps } from '../types/index.ts';
2
+ export type ColorMode = 'light' | 'dark';
3
+ export declare const useColorMode: () => UseColorModeProps;
4
+ /**
5
+ * Change value based on color mode.
6
+ *
7
+ * @param light the light mode value
8
+ * @param dark the dark mode value
9
+ *
10
+ *
11
+ * ```js
12
+ * const Icon = useColorModeValue(MoonIcon, SunIcon)
13
+ * ```
14
+ */
15
+ export declare function useColorModeValue<TLight = unknown, TDark = unknown>(light: TLight, dark: TDark): TLight | TDark;
16
+ export declare const ColorModeProvider: React.FC<ColorModeProviderProps>;
17
+ export declare const DarkModeProvider: ({ children }: {
18
+ children: React.ReactNode;
19
+ }) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const ColorMode: React.FC<ColorModeProviderProps>;
@@ -0,0 +1,170 @@
1
+ import { jsx as x, jsxs as J } from "react/jsx-runtime";
2
+ import { useContext as O, createContext as T, useState as N, useCallback as A, useEffect as j, useMemo as Q, memo as q } from "react";
3
+ const L = ["light", "dark"], B = "(prefers-color-scheme: dark)", F = typeof window > "u", D = T(void 0), G = {
4
+ setColorMode: (e) => {
5
+ },
6
+ colorModes: []
7
+ }, U = () => O(D) ?? G;
8
+ function te(e, d) {
9
+ const t = U();
10
+ return (t.forcedColorMode ?? t.resolvedColorMode) === "dark" ? d : e;
11
+ }
12
+ const oe = (e) => (O(D), /* @__PURE__ */ x(Z, { ...e })), W = () => {
13
+ }, X = {
14
+ setColorMode: W,
15
+ colorModes: ["dark"],
16
+ colorMode: "dark",
17
+ forcedColorMode: "dark",
18
+ resolvedColorMode: "dark",
19
+ systemColorMode: "dark"
20
+ }, se = ({ children: e }) => /* @__PURE__ */ x(D.Provider, { value: X, children: /* @__PURE__ */ x("div", { "data-theme": "dark", children: e }) }), Y = ["light", "dark"], Z = ({
21
+ forcedColorMode: e,
22
+ disableTransitionOnChange: d = !1,
23
+ enableSystem: t = !1,
24
+ enableColorScheme: v = !0,
25
+ storageKey: a = "inkeep-colorMode",
26
+ colorModes: n = Y,
27
+ defaultColorMode: o = t ? "system" : "light",
28
+ attribute: k = "data-theme",
29
+ value: f,
30
+ children: w,
31
+ nonce: E,
32
+ shadowHostId: y,
33
+ rootId: $
34
+ }) => {
35
+ const [c, l] = N(() => P(a, o)), [C, i] = N(() => P(a)), m = f ? Object.values(f) : n, g = A((s) => {
36
+ let r = s;
37
+ if (!r) return;
38
+ s === "system" && t && (r = R());
39
+ const M = f ? f[r] : r, V = d ? H() : null, I = y && $ && document.getElementById(y)?.shadowRoot, S = I ? I.getElementById($) ?? document.documentElement : document.documentElement;
40
+ if (k === "class" ? (S.classList.remove(...m), M && S.classList.add(M)) : M ? S.setAttribute(k, M) : S.removeAttribute(k), v) {
41
+ const _ = L.includes(o) ? o : null, z = L.includes(r) ? r : _;
42
+ S.style.colorScheme = z;
43
+ }
44
+ V?.();
45
+ }, []), u = A(
46
+ (s) => {
47
+ l(s);
48
+ try {
49
+ localStorage.setItem(a, s);
50
+ } catch {
51
+ }
52
+ },
53
+ [e]
54
+ ), h = A(
55
+ (s) => {
56
+ const r = R(s);
57
+ i(r), c === "system" && t && !e && g("system");
58
+ },
59
+ [c, e]
60
+ );
61
+ j(() => {
62
+ const s = window.matchMedia(B);
63
+ return s.addListener(h), h(s), () => s.removeListener(h);
64
+ }, [h]), j(() => {
65
+ const s = (r) => {
66
+ if (r.key !== a)
67
+ return;
68
+ const M = r.newValue || o;
69
+ u(M);
70
+ };
71
+ return window.addEventListener("storage", s), () => window.removeEventListener("storage", s);
72
+ }, [u]), j(() => {
73
+ g(e ?? c);
74
+ }, [e, c]);
75
+ const p = Q(
76
+ () => ({
77
+ colorMode: c,
78
+ setColorMode: u,
79
+ forcedColorMode: e,
80
+ resolvedColorMode: c === "system" ? C : c,
81
+ colorModes: t ? [...n, "system"] : n,
82
+ systemColorMode: t ? C : void 0
83
+ }),
84
+ [c, u, e, C, t, n]
85
+ );
86
+ return /* @__PURE__ */ J(D.Provider, { value: p, children: [
87
+ /* @__PURE__ */ x(
88
+ b,
89
+ {
90
+ forcedColorMode: e,
91
+ disableTransitionOnChange: d,
92
+ enableSystem: t,
93
+ enableColorScheme: v,
94
+ storageKey: a,
95
+ colorModes: n,
96
+ defaultColorMode: o,
97
+ attribute: k,
98
+ value: f,
99
+ children: w,
100
+ attrs: m,
101
+ nonce: E,
102
+ shadowHostId: y,
103
+ rootId: $
104
+ }
105
+ ),
106
+ w
107
+ ] });
108
+ }, b = q(
109
+ ({
110
+ forcedColorMode: e,
111
+ storageKey: d,
112
+ attribute: t,
113
+ enableSystem: v,
114
+ enableColorScheme: a,
115
+ defaultColorMode: n,
116
+ value: o,
117
+ attrs: k,
118
+ nonce: f,
119
+ shadowHostId: w,
120
+ rootId: E
121
+ }) => {
122
+ const y = n === "system", $ = (() => {
123
+ const i = w && E ? `document.getElementById('${w}').shadowRoot.getElementById('${E}')` : "document.documentElement";
124
+ if (t === "class") {
125
+ const m = `c.remove(${k.map((g) => `'${g}'`).join(",")})`;
126
+ return `var d=${i},c=d.classList;${m};`;
127
+ }
128
+ return `var d=${i},n='${t}',s='setAttribute';`;
129
+ })(), c = a ? (L.includes(n) ? n : null) ? `if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${n}'` : "if(e==='light'||e==='dark')d.style.colorScheme=e" : "", l = (i, m = !1, g = !0) => {
130
+ const u = o ? o[i] : i, h = m ? `${i}|| ''` : `'${u}'`;
131
+ let p = "";
132
+ return a && g && !m && L.includes(i) && (p += `d.style.colorScheme = '${i}';`), t === "class" ? m || u ? p += `c.add(${h})` : p += "null" : u && (p += `d[s](n,${h})`), p;
133
+ }, C = e ? `!function(){${$}${l(e)}}()` : v ? `!function(){try{${$}var e=localStorage.getItem('${d}');if('system'===e||(!e&&${y})){var t='${B}',m=window.matchMedia(t);if(m.media!==t||m.matches){${l(
134
+ "dark"
135
+ )}}else{${l("light")}}}else if(e){${o ? `var x=${JSON.stringify(o)};` : ""}${l(o ? "x[e]" : "e", !0)}}${y ? "" : `else{${l(n, !1, !1)}}`}${c}}catch(e){}}()` : `!function(){try{${$}var e=localStorage.getItem('${d}');if(e){${o ? `var x=${JSON.stringify(o)};` : ""}${l(o ? "x[e]" : "e", !0)}}else{${l(
136
+ n,
137
+ !1,
138
+ !1
139
+ )};}${c}}catch(t){}}();`;
140
+ return /* @__PURE__ */ x("script", { nonce: f, dangerouslySetInnerHTML: { __html: C } });
141
+ },
142
+ // Never re-render this component
143
+ () => !0
144
+ ), P = (e, d) => {
145
+ if (F) return;
146
+ let t;
147
+ try {
148
+ t = localStorage.getItem(e) || void 0;
149
+ } catch {
150
+ }
151
+ return t || d;
152
+ }, H = () => {
153
+ const e = document.createElement("style");
154
+ return e.appendChild(
155
+ document.createTextNode(
156
+ "*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}"
157
+ )
158
+ ), document.head.appendChild(e), () => {
159
+ window.getComputedStyle(document.body), setTimeout(() => {
160
+ document.head.removeChild(e);
161
+ }, 1);
162
+ };
163
+ }, R = (e) => (e || (e = window.matchMedia(B)), e.matches ? "dark" : "light");
164
+ export {
165
+ Z as ColorMode,
166
+ oe as ColorModeProvider,
167
+ se as DarkModeProvider,
168
+ U as useColorMode,
169
+ te as useColorModeValue
170
+ };
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./react/embedded-chat.cjs"),H=require("./react/sidebar-chat.cjs"),l=require("./react/embedded-search-and-chat.cjs"),d=require("./react/embedded-search.cjs"),$=require("./react/modal.chat.cjs"),T=require("./react/modal.search-and-chat.cjs"),D=require("./react/modal.search.cjs"),p=require("./react/modal.cjs"),I=require("./react/chat-button.cjs"),O=require("./react/chat-button-modal.cjs"),b=require("./react/searchbar.cjs"),W=require("./styled/components/embedded-chat.cjs"),x=require("./styled/components/chat-history.cjs"),z=require("./styled/components/sidebar-chat.cjs"),L=require("./styled/components/chat-bubble.cjs"),j=require("./styled/components/embedded-search.cjs"),G=require("./styled/components/modal.cjs"),Q=require("./styled/components/chat-button.cjs"),U=require("./styled/components/searchbar.cjs"),_=require("./styled/components/shadow.cjs"),K=require("./styled/components/loading-indicator.cjs"),N=require("./styled/components/ui/recipes/widget-toggle.cjs"),V=require("./styled/components/message.cjs"),J=require("./styled/components/data-summary-group.cjs"),S=require("./primitives/providers/attachment-item-provider.cjs"),P=require("./primitives/providers/attachments-bar-provider.cjs"),v=require("./primitives/providers/base-events-provider.cjs"),u=require("./primitives/providers/chat-form-provider.cjs"),q=require("./primitives/providers/chat-history-provider.cjs"),m=require("./primitives/providers/config-provider.cjs"),k=require("./primitives/providers/feedback-item-provider.cjs"),M=require("./primitives/providers/feedback-provider.cjs"),g=require("./primitives/providers/form-field-provider.cjs"),c=require("./primitives/providers/help-menu-provider.cjs"),B=require("./primitives/providers/markdown-provider.cjs"),y=require("./primitives/providers/message-attachments-provider.cjs"),h=require("./primitives/providers/message-provider.cjs"),X=require("./primitives/providers/root-provider.cjs"),E=require("./primitives/providers/source-item-provider.cjs"),Y=require("./primitives/providers/theme-provider.cjs"),F=require("./primitives/providers/widget-provider.cjs"),n=require("./primitives/providers/sidebar-chat-provider.cjs"),s=require("./primitives/providers/chat-bubble-provider.cjs"),A=require("./primitives/components/factory.cjs"),Z=require("./primitives/components/embedded-chat.cjs"),ee=require("./primitives/components/sidebar-chat/index.cjs"),w=require("./primitives/components/embedded-chat/chat-provider.cjs"),re=require("./primitives/components/embedded-search.cjs"),C=require("./primitives/components/embedded-search/search-provider.cjs"),oe=require("./primitives/components/modal.cjs"),f=require("./primitives/components/modal/modal-provider.cjs"),te=require("./primitives/components/chat-button.cjs"),ae=require("./primitives/components/searchbar.cjs"),de=require("./primitives/components/chat-bubble/index.cjs"),ne=require("./primitives/components/data-summaries.cjs"),se=require("./primitives/components/chat-history/index.cjs"),ie=require("./primitives/hooks/use-boolean.cjs"),ue=require("./primitives/hooks/use-component-classnames.cjs"),me=require("./primitives/hooks/use-container-size.cjs"),ce=require("./primitives/hooks/use-inkeep-open-state.cjs"),he=require("./primitives/hooks/use-copy-to-clipboard.cjs"),Ce=require("./primitives/hooks/use-instant-update.cjs"),le=require("./primitives/hooks/use-is-mounted.cjs"),pe=require("./primitives/hooks/use-media-query.cjs"),Ie=require("./primitives/hooks/use-resize-observer.cjs"),be=require("./primitives/hooks/use-scrolling-fades.cjs"),Se=require("./primitives/hooks/use-settle-action.cjs"),Pe=require("./primitives/hooks/use-simple-scroll.cjs"),o=require("./primitives/utils/misc.cjs"),e=require("./primitives/utils/component-ids.cjs"),R=require("./primitives/utils/compose-refs.cjs"),ve=require("./primitives/utils/merge-props.cjs"),qe=require("./primitives/atoms/portal.cjs"),ke=require("./primitives/atoms/icons/custom-icon.cjs"),Me=require("./primitives/atoms/icons/built-in-icon-renderer.cjs"),ge=require("./primitives/atoms/portal-with-theme.cjs"),r=require("./primitives/atoms/cmdk/index.cjs"),Be=require("./primitives/atoms/error-boundary.cjs"),t=require("./color-mode/index.cjs"),i=require("./primitives/atoms/shadow/context.cjs");exports.InkeepEmbeddedChat=a.InkeepEmbeddedChat;exports.InkeepEmbeddedChatImpl=a.InkeepEmbeddedChatImpl;exports.InkeepEmbeddedChatImplContent=a.InkeepEmbeddedChatImplContent;exports.InkeepEmbeddedChatProvider=a.InkeepEmbeddedChatProvider;exports.InkeepSidebarChat=H.InkeepSidebarChat;exports.InkeepEmbeddedSearchAndChat=l.InkeepEmbeddedSearchAndChat;exports.InkeepEmbeddedSearchAndChatImpl=l.InkeepEmbeddedSearchAndChatImpl;exports.InkeepEmbeddedSearch=d.InkeepEmbeddedSearch;exports.InkeepEmbeddedSearchImpl=d.InkeepEmbeddedSearchImpl;exports.InkeepEmbeddedSearchImplContent=d.InkeepEmbeddedSearchImplContent;exports.InkeepEmbeddedSearchProvider=d.InkeepEmbeddedSearchProvider;exports.InkeepModalChat=$.InkeepModalChat;exports.InkeepModalSearchAndChat=T.InkeepModalSearchAndChat;exports.InkeepModalSearch=D.InkeepModalSearch;exports.InkeepModal=p.InkeepModal;exports.ModalContent=p.ModalContent;exports.ChatButtonImpl=I.ChatButtonImpl;exports.InkeepChatButton=I.InkeepChatButton;exports.InkeepChatButtonModal=O.InkeepChatButtonModal;exports.InkeepSearchBar=b.InkeepSearchBar;exports.SearchBarImpl=b.SearchBarImpl;exports.EmbeddedChat=W;exports.ChatHistory=x;exports.SidebarChat=z;exports.ChatBubble=L;exports.EmbeddedSearch=j;exports.Modal=G;exports.ChatButton=Q;exports.SearchBar=U;exports.Shadow=_.Shadow;exports.LoadingIndicator=K.LoadingIndicator;exports.widgetToggle=N.widgetToggle;exports.EmbeddedChatMessagePart=V.EmbeddedChatMessagePart;exports.DataSummaryGroup=J.DataSummaryGroup;exports.AttachmentItemProvider=S.AttachmentItemProvider;exports.useAttachmentItem=S.useAttachmentItem;exports.AttachmentsBarProvider=P.AttachmentsBarProvider;exports.useAttachmentsBar=P.useAttachmentsBar;exports.BaseEventsProvider=v.BaseEventsProvider;exports.useBaseEvents=v.useBaseEvents;exports.ChatFormProvider=u.ChatFormProvider;exports.useChatForm=u.useChatForm;exports.useChatFormState=u.useChatFormState;exports.ChatHistoryProvider=q.ChatHistoryProvider;exports.useChatHistory=q.useChatHistory;exports.InkeepConfigProvider=m.InkeepConfigProvider;exports.WebWidgetInteractionType=m.WebWidgetInteractionType;exports.useInkeepConfig=m.useInkeepConfig;exports.FeedbackItemProvider=k.FeedbackItemProvider;exports.useFeedbackItem=k.useFeedbackItem;exports.FeedbackProvider=M.FeedbackProvider;exports.useMessageFeedback=M.useMessageFeedback;exports.FormFieldProvider=g.FormFieldProvider;exports.useFormField=g.useFormField;exports.HelpMenuProvider=c.HelpMenuProvider;exports.useHelpMenu=c.useHelpMenu;exports.useHelpMenuState=c.useHelpMenuState;exports.ChatMarkdownProvider=B.ChatMarkdownProvider;exports.useChatMarkdown=B.useChatMarkdown;exports.MessageAttachmentsProvider=y.MessageAttachmentsProvider;exports.useMessageAttachments=y.useMessageAttachments;exports.MessageProvider=h.MessageProvider;exports.useMessage=h.useMessage;exports.useOptionalMessage=h.useOptionalMessage;exports.RootProvider=X.RootProvider;exports.SourceItemProvider=E.SourceItemProvider;exports.useSourceItem=E.useSourceItem;exports.ThemeProvider=Y.ThemeProvider;exports.WidgetProvider=F.WidgetProvider;exports.useWidget=F.useWidget;exports.SidebarChatProvider=n.SidebarChatProvider;exports.useInkeepSidebarChat=n.useInkeepSidebarChat;exports.useOptionalSidebarChat=n.useOptionalSidebarChat;exports.useSidebarChat=n.useSidebarChat;exports.ChatBubbleProvider=s.ChatBubbleProvider;exports.useChatBubble=s.useChatBubble;exports.useInkeepChatBubble=s.useInkeepChatBubble;exports.useOptionalChatBubble=s.useOptionalChatBubble;exports.ikp=A.ikp;exports.jsxFactory=A.jsxFactory;exports.EmbeddedChatPrimitive=Z;exports.SidebarChatPrimitive=ee;exports.ChatProvider=w.ChatProvider;exports.useChat=w.useChat;exports.EmbeddedSearchPrimitive=re;exports.SearchProvider=C.SearchProvider;exports.SearchProviderImpl=C.SearchProviderImpl;exports.useSearch=C.useSearch;exports.ModalPrimitive=oe;exports.ModalProvider=f.ModalProvider;exports.useModal=f.useModal;exports.ChatButtonPrimitive=te;exports.SearchBarPrimitive=ae;exports.ChatBubblePrimitive=de;exports.DataSummaryPrimitive=ne;exports.ChatHistoryPrimitive=se;exports.useBoolean=ie.useBoolean;exports.useComponentClassNames=ue.useComponentClassNames;exports.useContainerSize=me.useContainerSize;exports.useInkeepOpenState=ce.useInkeepOpenState;exports.useCopyToClipboard=he.useCopyToClipboard;exports.useInstantUpdate=Ce.useInstantUpdate;exports.useIsMounted=le.useIsMounted;exports.useMediaQuery=pe.useMediaQuery;exports.useResizeObserver=Ie.useResizeObserver;exports.useScrollingFades=be.useScrollingFades;exports.useSettleAction=Se.useSettleAction;exports.useSimpleScroll=Pe.useSimpleScroll;exports.callAll=o.callAll;exports.dataAttr=o.dataAttr;exports.getInitials=o.getInitials;exports.getMessageContent=o.getMessageContent;exports.isString=o.isString;exports.maybeRender=o.maybeRender;exports.toKebabCase=o.toKebabCase;exports.ChatBubbleComponentIds=e.ChatBubbleComponentIds;exports.DataSummaryComponentIds=e.DataSummaryComponentIds;exports.SearchBarComponentIds=e.SearchBarComponentIds;exports.SidebarChatComponentIds=e.SidebarChatComponentIds;exports.aiChatComponentIds=e.aiChatComponentIds;exports.aiChatHistoryComponentIds=e.aiChatHistoryComponentIds;exports.aiSearchComponentIds=e.aiSearchComponentIds;exports.chatButtonComponentIds=e.chatButtonComponentIds;exports.componentIDs=e.componentIDs;exports.markDownComponentIds=e.markDownComponentIds;exports.miscellanousComponentIds=e.miscellanousComponentIds;exports.modalComponentIds=e.modalComponentIds;exports.composeRefs=R.composeRefs;exports.useComposedRefs=R.useComposedRefs;exports.mergeProps=ve.mergeProps;exports.Portal=qe.Portal;exports.CustomIcon=ke.CustomIcon;exports.BuiltInIconRenderer=Me.BuiltInIconRenderer;exports.PortalWithTheme=ge.PortalWithTheme;exports.Command=r.Command;exports.CommandDialog=r.CommandDialog;exports.CommandEmpty=r.CommandEmpty;exports.CommandInput=r.CommandInput;exports.CommandItem=r.CommandItem;exports.CommandList=r.CommandList;exports.CommandLoading=r.CommandLoading;exports.CommandRoot=r.CommandRoot;exports.CommandSeparator=r.CommandSeparator;exports.defaultFilter=r.defaultFilter;exports.useCommandState=r.useCommandState;exports.useCommandStore=r.useCommandStore;exports.ErrorBoundary=Be.ErrorBoundary;exports.ColorMode=t.ColorMode;exports.ColorModeProvider=t.ColorModeProvider;exports.DarkModeProvider=t.DarkModeProvider;exports.useColorMode=t.useColorMode;exports.useColorModeValue=t.useColorModeValue;exports.InkeepShadow=i.InkeepShadow;exports.InkeepShadowProvider=i.InkeepShadowProvider;exports.ShadowContext=i.ShadowContext;exports.useShadow=i.useShadow;
@@ -0,0 +1 @@
1
+ export * from './react';
package/dist/index.js ADDED
@@ -0,0 +1,238 @@
1
+ import { InkeepEmbeddedChat as c, InkeepEmbeddedChatImpl as S, InkeepEmbeddedChatImplContent as P, InkeepEmbeddedChatProvider as v } from "./react/embedded-chat.js";
2
+ import { InkeepSidebarChat as M } from "./react/sidebar-chat.js";
3
+ import { InkeepEmbeddedSearchAndChat as g, InkeepEmbeddedSearchAndChatImpl as E } from "./react/embedded-search-and-chat.js";
4
+ import { InkeepEmbeddedSearch as F, InkeepEmbeddedSearchImpl as A, InkeepEmbeddedSearchImplContent as w, InkeepEmbeddedSearchProvider as H } from "./react/embedded-search.js";
5
+ import { InkeepModalChat as R } from "./react/modal.chat.js";
6
+ import { InkeepModalSearchAndChat as O } from "./react/modal.search-and-chat.js";
7
+ import { InkeepModalSearch as W } from "./react/modal.search.js";
8
+ import { InkeepModal as z, ModalContent as j } from "./react/modal.js";
9
+ import { ChatButtonImpl as K, InkeepChatButton as N } from "./react/chat-button.js";
10
+ import { InkeepChatButtonModal as U } from "./react/chat-button-modal.js";
11
+ import { InkeepSearchBar as q, SearchBarImpl as J } from "./react/searchbar.js";
12
+ import * as e from "./styled/components/embedded-chat.js";
13
+ import * as o from "./styled/components/chat-history.js";
14
+ import * as r from "./styled/components/sidebar-chat.js";
15
+ import * as t from "./styled/components/chat-bubble.js";
16
+ import * as a from "./styled/components/embedded-search.js";
17
+ import * as m from "./styled/components/modal.js";
18
+ import * as d from "./styled/components/chat-button.js";
19
+ import * as p from "./styled/components/searchbar.js";
20
+ import { Shadow as Y } from "./styled/components/shadow.js";
21
+ import { LoadingIndicator as _ } from "./styled/components/loading-indicator.js";
22
+ import { widgetToggle as oe } from "./styled/components/ui/recipes/widget-toggle.js";
23
+ import { EmbeddedChatMessagePart as te } from "./styled/components/message.js";
24
+ import { DataSummaryGroup as me } from "./styled/components/data-summary-group.js";
25
+ import { AttachmentItemProvider as pe, useAttachmentItem as se } from "./primitives/providers/attachment-item-provider.js";
26
+ import { AttachmentsBarProvider as ne, useAttachmentsBar as he } from "./primitives/providers/attachments-bar-provider.js";
27
+ import { BaseEventsProvider as fe, useBaseEvents as xe } from "./primitives/providers/base-events-provider.js";
28
+ import { ChatFormProvider as le, useChatForm as Ie, useChatFormState as be } from "./primitives/providers/chat-form-provider.js";
29
+ import { ChatHistoryProvider as Se, useChatHistory as Pe } from "./primitives/providers/chat-history-provider.js";
30
+ import { InkeepConfigProvider as ke, WebWidgetInteractionType as Me, useInkeepConfig as Be } from "./primitives/providers/config-provider.js";
31
+ import { FeedbackItemProvider as Ee, useFeedbackItem as ye } from "./primitives/providers/feedback-item-provider.js";
32
+ import { FeedbackProvider as Ae, useMessageFeedback as we } from "./primitives/providers/feedback-provider.js";
33
+ import { FormFieldProvider as De, useFormField as Re } from "./primitives/providers/form-field-provider.js";
34
+ import { HelpMenuProvider as Oe, useHelpMenu as Te, useHelpMenuState as We } from "./primitives/providers/help-menu-provider.js";
35
+ import { ChatMarkdownProvider as ze, useChatMarkdown as je } from "./primitives/providers/markdown-provider.js";
36
+ import { MessageAttachmentsProvider as Ke, useMessageAttachments as Ne } from "./primitives/providers/message-attachments-provider.js";
37
+ import { MessageProvider as Ue, useMessage as Ve, useOptionalMessage as qe } from "./primitives/providers/message-provider.js";
38
+ import { RootProvider as Xe } from "./primitives/providers/root-provider.js";
39
+ import { SourceItemProvider as Ze, useSourceItem as _e } from "./primitives/providers/source-item-provider.js";
40
+ import { ThemeProvider as oo } from "./primitives/providers/theme-provider.js";
41
+ import { WidgetProvider as to, useWidget as ao } from "./primitives/providers/widget-provider.js";
42
+ import { SidebarChatProvider as po, useInkeepSidebarChat as so, useOptionalSidebarChat as io, useSidebarChat as no } from "./primitives/providers/sidebar-chat-provider.js";
43
+ import { ChatBubbleProvider as Co, useChatBubble as fo, useInkeepChatBubble as xo, useOptionalChatBubble as uo } from "./primitives/providers/chat-bubble-provider.js";
44
+ import { ikp as Io, jsxFactory as bo } from "./primitives/components/factory.js";
45
+ import * as s from "./primitives/components/embedded-chat.js";
46
+ import * as i from "./primitives/components/sidebar-chat/index.js";
47
+ import { ChatProvider as So, useChat as Po } from "./primitives/components/embedded-chat/chat-provider.js";
48
+ import * as n from "./primitives/components/embedded-search.js";
49
+ import { SearchProvider as ko, SearchProviderImpl as Mo, useSearch as Bo } from "./primitives/components/embedded-search/search-provider.js";
50
+ import * as h from "./primitives/components/modal.js";
51
+ import { ModalProvider as Eo, useModal as yo } from "./primitives/components/modal/modal-provider.js";
52
+ import * as C from "./primitives/components/chat-button.js";
53
+ import * as f from "./primitives/components/searchbar.js";
54
+ import * as x from "./primitives/components/chat-bubble/index.js";
55
+ import * as u from "./primitives/components/data-summaries.js";
56
+ import * as l from "./primitives/components/chat-history/index.js";
57
+ import { useBoolean as Ao } from "./primitives/hooks/use-boolean.js";
58
+ import { useComponentClassNames as Ho } from "./primitives/hooks/use-component-classnames.js";
59
+ import { useContainerSize as Ro } from "./primitives/hooks/use-container-size.js";
60
+ import { useInkeepOpenState as Oo } from "./primitives/hooks/use-inkeep-open-state.js";
61
+ import { useCopyToClipboard as Wo } from "./primitives/hooks/use-copy-to-clipboard.js";
62
+ import { useInstantUpdate as zo } from "./primitives/hooks/use-instant-update.js";
63
+ import { useIsMounted as Go } from "./primitives/hooks/use-is-mounted.js";
64
+ import { useMediaQuery as No } from "./primitives/hooks/use-media-query.js";
65
+ import { useResizeObserver as Uo } from "./primitives/hooks/use-resize-observer.js";
66
+ import { useScrollingFades as qo } from "./primitives/hooks/use-scrolling-fades.js";
67
+ import { useSettleAction as Xo } from "./primitives/hooks/use-settle-action.js";
68
+ import { useSimpleScroll as Zo } from "./primitives/hooks/use-simple-scroll.js";
69
+ import { callAll as er, dataAttr as or, getInitials as rr, getMessageContent as tr, isString as ar, maybeRender as mr, toKebabCase as dr } from "./primitives/utils/misc.js";
70
+ import { ChatBubbleComponentIds as sr, DataSummaryComponentIds as ir, SearchBarComponentIds as nr, SidebarChatComponentIds as hr, aiChatComponentIds as Cr, aiChatHistoryComponentIds as fr, aiSearchComponentIds as xr, chatButtonComponentIds as ur, componentIDs as lr, markDownComponentIds as Ir, miscellanousComponentIds as br, modalComponentIds as cr } from "./primitives/utils/component-ids.js";
71
+ import { composeRefs as Pr, useComposedRefs as vr } from "./primitives/utils/compose-refs.js";
72
+ import { mergeProps as Mr } from "./primitives/utils/merge-props.js";
73
+ import { Portal as gr } from "./primitives/atoms/portal.js";
74
+ import { CustomIcon as yr } from "./primitives/atoms/icons/custom-icon.js";
75
+ import { BuiltInIconRenderer as Ar } from "./primitives/atoms/icons/built-in-icon-renderer.js";
76
+ import { PortalWithTheme as Hr } from "./primitives/atoms/portal-with-theme.js";
77
+ import { Command as Rr, CommandDialog as $r, CommandEmpty as Or, CommandInput as Tr, CommandItem as Wr, CommandList as Lr, CommandLoading as zr, CommandRoot as jr, CommandSeparator as Gr, defaultFilter as Kr, useCommandState as Nr, useCommandStore as Qr } from "./primitives/atoms/cmdk/index.js";
78
+ import { ErrorBoundary as Vr } from "./primitives/atoms/error-boundary.js";
79
+ import { ColorMode as Jr, ColorModeProvider as Xr, DarkModeProvider as Yr, useColorMode as Zr, useColorModeValue as _r } from "./color-mode/index.js";
80
+ import { InkeepShadow as ot, InkeepShadowProvider as rt, ShadowContext as tt, useShadow as at } from "./primitives/atoms/shadow/context.js";
81
+ export {
82
+ pe as AttachmentItemProvider,
83
+ ne as AttachmentsBarProvider,
84
+ fe as BaseEventsProvider,
85
+ Ar as BuiltInIconRenderer,
86
+ t as ChatBubble,
87
+ sr as ChatBubbleComponentIds,
88
+ x as ChatBubblePrimitive,
89
+ Co as ChatBubbleProvider,
90
+ d as ChatButton,
91
+ K as ChatButtonImpl,
92
+ C as ChatButtonPrimitive,
93
+ le as ChatFormProvider,
94
+ o as ChatHistory,
95
+ l as ChatHistoryPrimitive,
96
+ Se as ChatHistoryProvider,
97
+ ze as ChatMarkdownProvider,
98
+ So as ChatProvider,
99
+ Jr as ColorMode,
100
+ Xr as ColorModeProvider,
101
+ Rr as Command,
102
+ $r as CommandDialog,
103
+ Or as CommandEmpty,
104
+ Tr as CommandInput,
105
+ Wr as CommandItem,
106
+ Lr as CommandList,
107
+ zr as CommandLoading,
108
+ jr as CommandRoot,
109
+ Gr as CommandSeparator,
110
+ yr as CustomIcon,
111
+ Yr as DarkModeProvider,
112
+ ir as DataSummaryComponentIds,
113
+ me as DataSummaryGroup,
114
+ u as DataSummaryPrimitive,
115
+ e as EmbeddedChat,
116
+ te as EmbeddedChatMessagePart,
117
+ s as EmbeddedChatPrimitive,
118
+ a as EmbeddedSearch,
119
+ n as EmbeddedSearchPrimitive,
120
+ Vr as ErrorBoundary,
121
+ Ee as FeedbackItemProvider,
122
+ Ae as FeedbackProvider,
123
+ De as FormFieldProvider,
124
+ Oe as HelpMenuProvider,
125
+ N as InkeepChatButton,
126
+ U as InkeepChatButtonModal,
127
+ ke as InkeepConfigProvider,
128
+ c as InkeepEmbeddedChat,
129
+ S as InkeepEmbeddedChatImpl,
130
+ P as InkeepEmbeddedChatImplContent,
131
+ v as InkeepEmbeddedChatProvider,
132
+ F as InkeepEmbeddedSearch,
133
+ g as InkeepEmbeddedSearchAndChat,
134
+ E as InkeepEmbeddedSearchAndChatImpl,
135
+ A as InkeepEmbeddedSearchImpl,
136
+ w as InkeepEmbeddedSearchImplContent,
137
+ H as InkeepEmbeddedSearchProvider,
138
+ z as InkeepModal,
139
+ R as InkeepModalChat,
140
+ W as InkeepModalSearch,
141
+ O as InkeepModalSearchAndChat,
142
+ q as InkeepSearchBar,
143
+ ot as InkeepShadow,
144
+ rt as InkeepShadowProvider,
145
+ M as InkeepSidebarChat,
146
+ _ as LoadingIndicator,
147
+ Ke as MessageAttachmentsProvider,
148
+ Ue as MessageProvider,
149
+ m as Modal,
150
+ j as ModalContent,
151
+ h as ModalPrimitive,
152
+ Eo as ModalProvider,
153
+ gr as Portal,
154
+ Hr as PortalWithTheme,
155
+ Xe as RootProvider,
156
+ p as SearchBar,
157
+ nr as SearchBarComponentIds,
158
+ J as SearchBarImpl,
159
+ f as SearchBarPrimitive,
160
+ ko as SearchProvider,
161
+ Mo as SearchProviderImpl,
162
+ Y as Shadow,
163
+ tt as ShadowContext,
164
+ r as SidebarChat,
165
+ hr as SidebarChatComponentIds,
166
+ i as SidebarChatPrimitive,
167
+ po as SidebarChatProvider,
168
+ Ze as SourceItemProvider,
169
+ oo as ThemeProvider,
170
+ Me as WebWidgetInteractionType,
171
+ to as WidgetProvider,
172
+ Cr as aiChatComponentIds,
173
+ fr as aiChatHistoryComponentIds,
174
+ xr as aiSearchComponentIds,
175
+ er as callAll,
176
+ ur as chatButtonComponentIds,
177
+ lr as componentIDs,
178
+ Pr as composeRefs,
179
+ or as dataAttr,
180
+ Kr as defaultFilter,
181
+ rr as getInitials,
182
+ tr as getMessageContent,
183
+ Io as ikp,
184
+ ar as isString,
185
+ bo as jsxFactory,
186
+ Ir as markDownComponentIds,
187
+ mr as maybeRender,
188
+ Mr as mergeProps,
189
+ br as miscellanousComponentIds,
190
+ cr as modalComponentIds,
191
+ dr as toKebabCase,
192
+ se as useAttachmentItem,
193
+ he as useAttachmentsBar,
194
+ xe as useBaseEvents,
195
+ Ao as useBoolean,
196
+ Po as useChat,
197
+ fo as useChatBubble,
198
+ Ie as useChatForm,
199
+ be as useChatFormState,
200
+ Pe as useChatHistory,
201
+ je as useChatMarkdown,
202
+ Zr as useColorMode,
203
+ _r as useColorModeValue,
204
+ Nr as useCommandState,
205
+ Qr as useCommandStore,
206
+ Ho as useComponentClassNames,
207
+ vr as useComposedRefs,
208
+ Ro as useContainerSize,
209
+ Wo as useCopyToClipboard,
210
+ ye as useFeedbackItem,
211
+ Re as useFormField,
212
+ Te as useHelpMenu,
213
+ We as useHelpMenuState,
214
+ xo as useInkeepChatBubble,
215
+ Be as useInkeepConfig,
216
+ Oo as useInkeepOpenState,
217
+ so as useInkeepSidebarChat,
218
+ zo as useInstantUpdate,
219
+ Go as useIsMounted,
220
+ No as useMediaQuery,
221
+ Ve as useMessage,
222
+ Ne as useMessageAttachments,
223
+ we as useMessageFeedback,
224
+ yo as useModal,
225
+ uo as useOptionalChatBubble,
226
+ qe as useOptionalMessage,
227
+ io as useOptionalSidebarChat,
228
+ Uo as useResizeObserver,
229
+ qo as useScrollingFades,
230
+ Bo as useSearch,
231
+ Xo as useSettleAction,
232
+ at as useShadow,
233
+ no as useSidebarChat,
234
+ Zo as useSimpleScroll,
235
+ _e as useSourceItem,
236
+ ao as useWidget,
237
+ oe as widgetToggle
238
+ };
@@ -0,0 +1,9 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../../../../_virtual/use-sync-external-store-shim.development.cjs"),h=require("react");/**
2
+ * @license React
3
+ * use-sync-external-store-shim.development.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var f;function T(){return f||(f=1,process.env.NODE_ENV!=="production"&&function(){function d(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function S(e,t){c||o.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var r=t();if(!l){var u=t();_(r,u)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}u=p({inst:{value:r,getSnapshot:t}});var n=u[0].inst,s=u[1];return y(function(){n.value=r,n.getSnapshot=t,a(n)&&s({inst:n})},[e,r,t]),E(function(){return a(n)&&s({inst:n}),e(function(){a(n)&&s({inst:n})})},[e]),L(r),r}function a(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!_(e,r)}catch{return!0}}function O(e,t){return t()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=h,_=typeof Object.is=="function"?Object.is:d,p=o.useState,E=o.useEffect,y=o.useLayoutEffect,L=o.useDebugValue,c=!1,l=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?O:S;i.__exports.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),i.__exports}exports.__require=T;
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ import { __exports as s } from "../../../../../../_virtual/use-sync-external-store-shim.development.js";
3
+ import h from "react";
4
+ /**
5
+ * @license React
6
+ * use-sync-external-store-shim.development.js
7
+ *
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ var l;
14
+ function A() {
15
+ return l ? s : (l = 1, process.env.NODE_ENV !== "production" && function() {
16
+ function d(e, t) {
17
+ return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
18
+ }
19
+ function S(e, t) {
20
+ f || o.startTransition === void 0 || (f = !0, console.error(
21
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
22
+ ));
23
+ var r = t();
24
+ if (!c) {
25
+ var u = t();
26
+ _(r, u) || (console.error(
27
+ "The result of getSnapshot should be cached to avoid an infinite loop"
28
+ ), c = !0);
29
+ }
30
+ u = p({
31
+ inst: { value: r, getSnapshot: t }
32
+ });
33
+ var n = u[0].inst, i = u[1];
34
+ return L(
35
+ function() {
36
+ n.value = r, n.getSnapshot = t, a(n) && i({ inst: n });
37
+ },
38
+ [e, r, t]
39
+ ), E(
40
+ function() {
41
+ return a(n) && i({ inst: n }), e(function() {
42
+ a(n) && i({ inst: n });
43
+ });
44
+ },
45
+ [e]
46
+ ), y(r), r;
47
+ }
48
+ function a(e) {
49
+ var t = e.getSnapshot;
50
+ e = e.value;
51
+ try {
52
+ var r = t();
53
+ return !_(e, r);
54
+ } catch {
55
+ return !0;
56
+ }
57
+ }
58
+ function O(e, t) {
59
+ return t();
60
+ }
61
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
62
+ var o = h, _ = typeof Object.is == "function" ? Object.is : d, p = o.useState, E = o.useEffect, L = o.useLayoutEffect, y = o.useDebugValue, f = !1, c = !1, v = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? O : S;
63
+ s.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : v, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
64
+ }(), s);
65
+ }
66
+ export {
67
+ A as __require
68
+ };