@inkeep/agents-ui 0.1.0 → 0.14.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/LICENSE +64 -0
  2. package/README.md +1 -67
  3. package/dist/_virtual/index.cjs +1 -0
  4. package/dist/_virtual/index.js +4 -0
  5. package/dist/_virtual/use-sync-external-store-shim.development.cjs +1 -0
  6. package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
  7. package/dist/_virtual/use-sync-external-store-shim.production.cjs +1 -0
  8. package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
  9. package/dist/color-mode/index.cjs +1 -0
  10. package/dist/color-mode/index.js +170 -0
  11. package/dist/index.cjs +1 -0
  12. package/dist/index.d.cts +5093 -0
  13. package/dist/index.d.ts +5093 -0
  14. package/dist/index.js +213 -0
  15. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
  16. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
  17. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +9 -0
  18. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
  19. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.cjs +1 -0
  20. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.js +8 -0
  21. package/dist/primitives/atoms/avatars/ai.cjs +1 -0
  22. package/dist/primitives/atoms/avatars/ai.js +99 -0
  23. package/dist/primitives/atoms/avatars/user.cjs +1 -0
  24. package/dist/primitives/atoms/avatars/user.js +27 -0
  25. package/dist/primitives/atoms/cmdk/command-score.cjs +1 -0
  26. package/dist/primitives/atoms/cmdk/command-score.js +46 -0
  27. package/dist/primitives/atoms/cmdk/index.cjs +1 -0
  28. package/dist/primitives/atoms/cmdk/index.js +521 -0
  29. package/dist/primitives/atoms/codeblock/index.cjs +1 -0
  30. package/dist/primitives/atoms/codeblock/index.js +40 -0
  31. package/dist/primitives/atoms/custom-styles.cjs +1 -0
  32. package/dist/primitives/atoms/custom-styles.js +57 -0
  33. package/dist/primitives/atoms/dialog.cjs +1 -0
  34. package/dist/primitives/atoms/dialog.js +226 -0
  35. package/dist/primitives/atoms/error-boundary.cjs +1 -0
  36. package/dist/primitives/atoms/error-boundary.js +9 -0
  37. package/dist/primitives/atoms/icons/built-in-icon-renderer.cjs +1 -0
  38. package/dist/primitives/atoms/icons/built-in-icon-renderer.js +51 -0
  39. package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -0
  40. package/dist/primitives/atoms/icons/built-in-icons.js +86 -0
  41. package/dist/primitives/atoms/icons/checkbox-icon.cjs +1 -0
  42. package/dist/primitives/atoms/icons/checkbox-icon.js +24 -0
  43. package/dist/primitives/atoms/icons/collections/bi.cjs +1 -0
  44. package/dist/primitives/atoms/icons/collections/bi.js +49 -0
  45. package/dist/primitives/atoms/icons/collections/fi.cjs +1 -0
  46. package/dist/primitives/atoms/icons/collections/fi.js +29 -0
  47. package/dist/primitives/atoms/icons/collections/gr.cjs +1 -0
  48. package/dist/primitives/atoms/icons/collections/gr.js +21 -0
  49. package/dist/primitives/atoms/icons/collections/io5.cjs +1 -0
  50. package/dist/primitives/atoms/icons/collections/io5.js +806 -0
  51. package/dist/primitives/atoms/icons/collections/pi.cjs +1 -0
  52. package/dist/primitives/atoms/icons/collections/pi.js +49 -0
  53. package/dist/primitives/atoms/icons/custom-icon.cjs +1 -0
  54. package/dist/primitives/atoms/icons/custom-icon.js +19 -0
  55. package/dist/primitives/atoms/icons/generate-icon.cjs +1 -0
  56. package/dist/primitives/atoms/icons/generate-icon.js +56 -0
  57. package/dist/primitives/atoms/icons/index.cjs +1 -0
  58. package/dist/primitives/atoms/icons/index.js +6 -0
  59. package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -0
  60. package/dist/primitives/atoms/icons/inkeep-default-icons.js +24 -0
  61. package/dist/primitives/atoms/link.cjs +1 -0
  62. package/dist/primitives/atoms/link.js +35 -0
  63. package/dist/primitives/atoms/markdown/components.cjs +1 -0
  64. package/dist/primitives/atoms/markdown/components.js +73 -0
  65. package/dist/primitives/atoms/markdown/index.cjs +1 -0
  66. package/dist/primitives/atoms/markdown/index.js +115 -0
  67. package/dist/primitives/atoms/markdown/rehype-inline-code-property.cjs +1 -0
  68. package/dist/primitives/atoms/markdown/rehype-inline-code-property.js +12 -0
  69. package/dist/primitives/atoms/portal-with-theme.cjs +1 -0
  70. package/dist/primitives/atoms/portal-with-theme.js +12 -0
  71. package/dist/primitives/atoms/portal.cjs +1 -0
  72. package/dist/primitives/atoms/portal.js +19 -0
  73. package/dist/primitives/atoms/select.cjs +1 -0
  74. package/dist/primitives/atoms/select.js +785 -0
  75. package/dist/primitives/atoms/shadow/context.cjs +1 -0
  76. package/dist/primitives/atoms/shadow/context.js +54 -0
  77. package/dist/primitives/atoms/shadow/create.cjs +1 -0
  78. package/dist/primitives/atoms/shadow/create.js +56 -0
  79. package/dist/primitives/atoms/shadow/root.cjs +1 -0
  80. package/dist/primitives/atoms/shadow/root.js +22 -0
  81. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.cjs +1 -0
  82. package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.js +11 -0
  83. package/dist/primitives/atoms/shadow/utils.cjs +1 -0
  84. package/dist/primitives/atoms/shadow/utils.js +16 -0
  85. package/dist/primitives/components/chat-button.cjs +1 -0
  86. package/dist/primitives/components/chat-button.js +46 -0
  87. package/dist/primitives/components/embedded-chat/chat-provider.cjs +1 -0
  88. package/dist/primitives/components/embedded-chat/chat-provider.js +20 -0
  89. package/dist/primitives/components/embedded-chat/use-chat-action.cjs +1 -0
  90. package/dist/primitives/components/embedded-chat/use-chat-action.js +38 -0
  91. package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +3 -0
  92. package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +160 -0
  93. package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -0
  94. package/dist/primitives/components/embedded-chat/use-stream-processor.js +82 -0
  95. package/dist/primitives/components/embedded-chat.cjs +11 -0
  96. package/dist/primitives/components/embedded-chat.js +1898 -0
  97. package/dist/primitives/components/embedded-search/search-provider.cjs +1 -0
  98. package/dist/primitives/components/embedded-search/search-provider.js +26 -0
  99. package/dist/primitives/components/embedded-search/transform-results.cjs +1 -0
  100. package/dist/primitives/components/embedded-search/transform-results.js +47 -0
  101. package/dist/primitives/components/embedded-search/url-query.cjs +1 -0
  102. package/dist/primitives/components/embedded-search/url-query.js +12 -0
  103. package/dist/primitives/components/embedded-search/use-inkeep-search.cjs +1 -0
  104. package/dist/primitives/components/embedded-search/use-inkeep-search.js +35 -0
  105. package/dist/primitives/components/embedded-search/use-search-filter.cjs +1 -0
  106. package/dist/primitives/components/embedded-search/use-search-filter.js +77 -0
  107. package/dist/primitives/components/embedded-search.cjs +1 -0
  108. package/dist/primitives/components/embedded-search.js +628 -0
  109. package/dist/primitives/components/factory.cjs +1 -0
  110. package/dist/primitives/components/factory.js +39 -0
  111. package/dist/primitives/components/index.cjs +1 -0
  112. package/dist/primitives/components/index.js +27 -0
  113. package/dist/primitives/components/modal/modal-provider.cjs +1 -0
  114. package/dist/primitives/components/modal/modal-provider.js +8 -0
  115. package/dist/primitives/components/modal/use-inkeep-modal.cjs +1 -0
  116. package/dist/primitives/components/modal/use-inkeep-modal.js +45 -0
  117. package/dist/primitives/components/modal/widget-auto-focus.cjs +1 -0
  118. package/dist/primitives/components/modal/widget-auto-focus.js +16 -0
  119. package/dist/primitives/components/modal.cjs +1 -0
  120. package/dist/primitives/components/modal.js +40 -0
  121. package/dist/primitives/components/presence.cjs +1 -0
  122. package/dist/primitives/components/presence.js +26 -0
  123. package/dist/primitives/components/searchbar.cjs +1 -0
  124. package/dist/primitives/components/searchbar.js +54 -0
  125. package/dist/primitives/components/sidebar-chat/index.cjs +1 -0
  126. package/dist/primitives/components/sidebar-chat/index.js +86 -0
  127. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.cjs +1 -0
  128. package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.js +34 -0
  129. package/dist/primitives/components/tagline-logo-icon.cjs +1 -0
  130. package/dist/primitives/components/tagline-logo-icon.js +26 -0
  131. package/dist/primitives/components/use-component-trigger.cjs +1 -0
  132. package/dist/primitives/components/use-component-trigger.js +16 -0
  133. package/dist/primitives/constants/search.cjs +1 -0
  134. package/dist/primitives/constants/search.js +5 -0
  135. package/dist/primitives/hooks/index.cjs +1 -0
  136. package/dist/primitives/hooks/index.js +24 -0
  137. package/dist/primitives/hooks/use-boolean.cjs +1 -0
  138. package/dist/primitives/hooks/use-boolean.js +17 -0
  139. package/dist/primitives/hooks/use-component-classnames.cjs +1 -0
  140. package/dist/primitives/hooks/use-component-classnames.js +14 -0
  141. package/dist/primitives/hooks/use-container-size.cjs +1 -0
  142. package/dist/primitives/hooks/use-container-size.js +18 -0
  143. package/dist/primitives/hooks/use-copy-to-clipboard.cjs +1 -0
  144. package/dist/primitives/hooks/use-copy-to-clipboard.js +24 -0
  145. package/dist/primitives/hooks/use-debounce.cjs +1 -0
  146. package/dist/primitives/hooks/use-debounce.js +16 -0
  147. package/dist/primitives/hooks/use-instant-update.cjs +1 -0
  148. package/dist/primitives/hooks/use-instant-update.js +16 -0
  149. package/dist/primitives/hooks/use-is-mounted.cjs +1 -0
  150. package/dist/primitives/hooks/use-is-mounted.js +11 -0
  151. package/dist/primitives/hooks/use-media-query.cjs +1 -0
  152. package/dist/primitives/hooks/use-media-query.js +14 -0
  153. package/dist/primitives/hooks/use-resize-observer.cjs +1 -0
  154. package/dist/primitives/hooks/use-resize-observer.js +32 -0
  155. package/dist/primitives/hooks/use-scroll-to-bottom.cjs +1 -0
  156. package/dist/primitives/hooks/use-scroll-to-bottom.js +52 -0
  157. package/dist/primitives/hooks/use-scrolling-fades.cjs +1 -0
  158. package/dist/primitives/hooks/use-scrolling-fades.js +18 -0
  159. package/dist/primitives/hooks/use-settle-action.cjs +1 -0
  160. package/dist/primitives/hooks/use-settle-action.js +11 -0
  161. package/dist/primitives/index.cjs +1 -0
  162. package/dist/primitives/index.js +155 -0
  163. package/dist/primitives/providers/attachment-item-provider.cjs +1 -0
  164. package/dist/primitives/providers/attachment-item-provider.js +13 -0
  165. package/dist/primitives/providers/attachments-bar-provider.cjs +1 -0
  166. package/dist/primitives/providers/attachments-bar-provider.js +57 -0
  167. package/dist/primitives/providers/base-events-provider.cjs +1 -0
  168. package/dist/primitives/providers/base-events-provider.js +37 -0
  169. package/dist/primitives/providers/chat-form-provider.cjs +1 -0
  170. package/dist/primitives/providers/chat-form-provider.js +109 -0
  171. package/dist/primitives/providers/config-provider.cjs +1 -0
  172. package/dist/primitives/providers/config-provider.js +38 -0
  173. package/dist/primitives/providers/feedback-item-provider.cjs +1 -0
  174. package/dist/primitives/providers/feedback-item-provider.js +16 -0
  175. package/dist/primitives/providers/feedback-provider.cjs +1 -0
  176. package/dist/primitives/providers/feedback-provider.js +83 -0
  177. package/dist/primitives/providers/form-field-provider.cjs +1 -0
  178. package/dist/primitives/providers/form-field-provider.js +17 -0
  179. package/dist/primitives/providers/help-menu-provider.cjs +1 -0
  180. package/dist/primitives/providers/help-menu-provider.js +19 -0
  181. package/dist/primitives/providers/hover-popover-provider.cjs +1 -0
  182. package/dist/primitives/providers/hover-popover-provider.js +13 -0
  183. package/dist/primitives/providers/index.cjs +1 -0
  184. package/dist/primitives/providers/index.js +57 -0
  185. package/dist/primitives/providers/markdown-provider.cjs +1 -0
  186. package/dist/primitives/providers/markdown-provider.js +8 -0
  187. package/dist/primitives/providers/message-attachments-provider.cjs +1 -0
  188. package/dist/primitives/providers/message-attachments-provider.js +27 -0
  189. package/dist/primitives/providers/message-provider.cjs +1 -0
  190. package/dist/primitives/providers/message-provider.js +14 -0
  191. package/dist/primitives/providers/root-provider.cjs +1 -0
  192. package/dist/primitives/providers/root-provider.js +21 -0
  193. package/dist/primitives/providers/search-events-provider.cjs +1 -0
  194. package/dist/primitives/providers/search-events-provider.js +17 -0
  195. package/dist/primitives/providers/sidebar-chat-provider.cjs +1 -0
  196. package/dist/primitives/providers/sidebar-chat-provider.js +41 -0
  197. package/dist/primitives/providers/source-item-provider.cjs +1 -0
  198. package/dist/primitives/providers/source-item-provider.js +13 -0
  199. package/dist/primitives/providers/theme-provider.cjs +3 -0
  200. package/dist/primitives/providers/theme-provider.js +79 -0
  201. package/dist/primitives/providers/widget-provider.cjs +1 -0
  202. package/dist/primitives/providers/widget-provider.js +8 -0
  203. package/dist/primitives/utils/component-ids.cjs +1 -0
  204. package/dist/primitives/utils/component-ids.js +309 -0
  205. package/dist/primitives/utils/compose-event-handlers.cjs +1 -0
  206. package/dist/primitives/utils/compose-event-handlers.js +10 -0
  207. package/dist/primitives/utils/compose-refs.cjs +1 -0
  208. package/dist/primitives/utils/compose-refs.js +30 -0
  209. package/dist/primitives/utils/default-settings.cjs +1 -0
  210. package/dist/primitives/utils/default-settings.js +50 -0
  211. package/dist/primitives/utils/form.cjs +1 -0
  212. package/dist/primitives/utils/form.js +17 -0
  213. package/dist/primitives/utils/generate-uid.cjs +1 -0
  214. package/dist/primitives/utils/generate-uid.js +14 -0
  215. package/dist/primitives/utils/get-source-icon.cjs +1 -0
  216. package/dist/primitives/utils/get-source-icon.js +11 -0
  217. package/dist/primitives/utils/highlight-emphasis.cjs +1 -0
  218. package/dist/primitives/utils/highlight-emphasis.js +15 -0
  219. package/dist/primitives/utils/merge-props.cjs +1 -0
  220. package/dist/primitives/utils/merge-props.js +41 -0
  221. package/dist/primitives/utils/misc.cjs +1 -0
  222. package/dist/primitives/utils/misc.js +31 -0
  223. package/dist/primitives/utils/split-props.cjs +1 -0
  224. package/dist/primitives/utils/split-props.js +10 -0
  225. package/dist/react/chat-button.cjs +1 -0
  226. package/dist/react/chat-button.js +60 -0
  227. package/dist/react/embedded-chat.cjs +1 -0
  228. package/dist/react/embedded-chat.js +380 -0
  229. package/dist/react/embedded-search-and-chat.cjs +1 -0
  230. package/dist/react/embedded-search-and-chat.impl.cjs +1 -0
  231. package/dist/react/embedded-search-and-chat.impl.js +43 -0
  232. package/dist/react/embedded-search-and-chat.js +66 -0
  233. package/dist/react/embedded-search.cjs +1 -0
  234. package/dist/react/embedded-search.js +181 -0
  235. package/dist/react/index.cjs +1 -0
  236. package/dist/react/index.js +213 -0
  237. package/dist/react/modal.chat.cjs +1 -0
  238. package/dist/react/modal.chat.js +21 -0
  239. package/dist/react/modal.cjs +1 -0
  240. package/dist/react/modal.js +27 -0
  241. package/dist/react/modal.search-and-chat.cjs +1 -0
  242. package/dist/react/modal.search-and-chat.js +27 -0
  243. package/dist/react/modal.search.cjs +1 -0
  244. package/dist/react/modal.search.js +21 -0
  245. package/dist/react/searchbar.cjs +1 -0
  246. package/dist/react/searchbar.js +68 -0
  247. package/dist/react/sidebar-chat.cjs +1 -0
  248. package/dist/react/sidebar-chat.js +49 -0
  249. package/dist/react/utils.cjs +1 -0
  250. package/dist/react/utils.js +20 -0
  251. package/dist/react/widget-toggle.cjs +1 -0
  252. package/dist/react/widget-toggle.js +65 -0
  253. package/dist/styled/components/chat-button.cjs +1 -0
  254. package/dist/styled/components/chat-button.js +56 -0
  255. package/dist/styled/components/data-summary-group.cjs +1 -0
  256. package/dist/styled/components/data-summary-group.js +76 -0
  257. package/dist/styled/components/embedded-chat.cjs +1 -0
  258. package/dist/styled/components/embedded-chat.js +1816 -0
  259. package/dist/styled/components/embedded-search/results-loading.cjs +1 -0
  260. package/dist/styled/components/embedded-search/results-loading.js +39 -0
  261. package/dist/styled/components/embedded-search.cjs +1 -0
  262. package/dist/styled/components/embedded-search.js +680 -0
  263. package/dist/styled/components/index.cjs +1 -0
  264. package/dist/styled/components/index.js +24 -0
  265. package/dist/styled/components/loading-indicator.cjs +1 -0
  266. package/dist/styled/components/loading-indicator.js +36 -0
  267. package/dist/styled/components/message.cjs +1 -0
  268. package/dist/styled/components/message.js +140 -0
  269. package/dist/styled/components/modal.cjs +1 -0
  270. package/dist/styled/components/modal.js +46 -0
  271. package/dist/styled/components/searchbar.cjs +1 -0
  272. package/dist/styled/components/searchbar.js +81 -0
  273. package/dist/styled/components/shadow.cjs +1 -0
  274. package/dist/styled/components/shadow.js +8 -0
  275. package/dist/styled/components/sidebar-chat.cjs +1 -0
  276. package/dist/styled/components/sidebar-chat.js +90 -0
  277. package/dist/styled/components/ui/markdown-styles.cjs +1 -0
  278. package/dist/styled/components/ui/markdown-styles.js +38 -0
  279. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.cjs +1 -0
  280. package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.js +32 -0
  281. package/dist/styled/components/ui/recipes/attachment.cjs +1 -0
  282. package/dist/styled/components/ui/recipes/attachment.js +28 -0
  283. package/dist/styled/components/ui/recipes/button.cjs +1 -0
  284. package/dist/styled/components/ui/recipes/button.js +81 -0
  285. package/dist/styled/components/ui/recipes/checkbox.cjs +1 -0
  286. package/dist/styled/components/ui/recipes/checkbox.js +23 -0
  287. package/dist/styled/components/ui/recipes/citation.cjs +1 -0
  288. package/dist/styled/components/ui/recipes/citation.js +75 -0
  289. package/dist/styled/components/ui/recipes/icon.cjs +1 -0
  290. package/dist/styled/components/ui/recipes/icon.js +6 -0
  291. package/dist/styled/components/ui/recipes/index.cjs +1 -0
  292. package/dist/styled/components/ui/recipes/index.js +37 -0
  293. package/dist/styled/components/ui/recipes/input.cjs +1 -0
  294. package/dist/styled/components/ui/recipes/input.js +34 -0
  295. package/dist/styled/components/ui/recipes/link.cjs +1 -0
  296. package/dist/styled/components/ui/recipes/link.js +13 -0
  297. package/dist/styled/components/ui/recipes/markdown.cjs +1 -0
  298. package/dist/styled/components/ui/recipes/markdown.js +103 -0
  299. package/dist/styled/components/ui/recipes/modal.cjs +1 -0
  300. package/dist/styled/components/ui/recipes/modal.js +59 -0
  301. package/dist/styled/components/ui/recipes/popover.cjs +1 -0
  302. package/dist/styled/components/ui/recipes/popover.js +20 -0
  303. package/dist/styled/components/ui/recipes/scrollable.cjs +1 -0
  304. package/dist/styled/components/ui/recipes/scrollable.js +15 -0
  305. package/dist/styled/components/ui/recipes/select.cjs +1 -0
  306. package/dist/styled/components/ui/recipes/select.js +38 -0
  307. package/dist/styled/components/ui/recipes/skeleton.cjs +1 -0
  308. package/dist/styled/components/ui/recipes/skeleton.js +16 -0
  309. package/dist/styled/components/ui/recipes/widget-toggle.cjs +1 -0
  310. package/dist/styled/components/ui/recipes/widget-toggle.js +35 -0
  311. package/dist/styled/index.cjs +1 -0
  312. package/dist/styled/index.js +177 -0
  313. package/dist/styled/inkeep.css.cjs +4049 -0
  314. package/dist/styled/inkeep.css.js +4053 -0
  315. package/dist/styled/utils.cjs +1 -0
  316. package/dist/styled/utils.js +11 -0
  317. package/dist/theme/color-utils.cjs +1 -0
  318. package/dist/theme/color-utils.js +21 -0
  319. package/dist/theme/colors.cjs +1 -0
  320. package/dist/theme/colors.js +143 -0
  321. package/dist/theme/index.cjs +1 -0
  322. package/dist/theme/index.js +58 -0
  323. package/dist/theme/utils/create-css-variables.cjs +1 -0
  324. package/dist/theme/utils/create-css-variables.js +24 -0
  325. package/dist/theme/utils/generate-theme-variables.cjs +1 -0
  326. package/dist/theme/utils/generate-theme-variables.js +34 -0
  327. package/dist/types/message.cjs +1 -0
  328. package/dist/types/message.js +5 -0
  329. package/dist/types/types.d.cts +1754 -0
  330. package/dist/types/types.d.ts +1754 -0
  331. package/package.json +132 -39
  332. package/LICENSE.md +0 -51
  333. package/dist/assets/index-3anqgmEs.js +0 -49
  334. package/dist/assets/index-CF_BRP1w.css +0 -1
  335. package/dist/index.html +0 -14
@@ -0,0 +1,628 @@
1
+ "use client";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { useCommandState as g, Command as y, useCommandStore as V } from "../atoms/cmdk/index.js";
4
+ import { ikp as s } from "./factory.js";
5
+ import { dataAttr as I, maybeRender as L } from "../utils/misc.js";
6
+ import { forwardRef as C, useMemo as E, useState as J, useEffect as x, useCallback as A, useRef as K } from "react";
7
+ import { useSearch as d } from "./embedded-search/search-provider.js";
8
+ import { SearchProvider as bi } from "./embedded-search/search-provider.js";
9
+ import X from "./tagline-logo-icon.js";
10
+ import { CustomIcon as f } from "../atoms/icons/custom-icon.js";
11
+ import * as O from "@radix-ui/react-scroll-area";
12
+ import * as B from "@radix-ui/react-tabs";
13
+ import { useInkeepConfig as b } from "../providers/config-provider.js";
14
+ import { useSearchEvents as Y } from "../providers/search-events-provider.js";
15
+ import { LinkWithQueryParams as U } from "../atoms/link.js";
16
+ import { SourceItemProvider as W, useSourceItem as v } from "../providers/source-item-provider.js";
17
+ import { BuiltInIconRenderer as H } from "../atoms/icons/built-in-icon-renderer.js";
18
+ import { highlightEmphasis as Z } from "../utils/highlight-emphasis.js";
19
+ import { useScrollingFades as ee } from "../hooks/use-scrolling-fades.js";
20
+ import { useColorModeValue as te } from "../../color-mode/index.js";
21
+ import ie from "../atoms/avatars/ai.js";
22
+ import { useModal as N } from "./modal/modal-provider.js";
23
+ import { useComposedRefs as M } from "../utils/compose-refs.js";
24
+ import { composeEventHandlers as T } from "../utils/compose-event-handlers.js";
25
+ import { useShadow as se } from "../atoms/shadow/context.js";
26
+ import { Markdown as re } from "../atoms/markdown/index.js";
27
+ import { useMediaQuery as F } from "../hooks/use-media-query.js";
28
+ import { useSearchFetch as ne } from "./embedded-search/use-search-filter.js";
29
+ import { getUrlWithQuery as ae } from "./embedded-search/url-query.js";
30
+ import { ASK_AI_TRIGGER_VALUE as k } from "../constants/search.js";
31
+ import { useWidgetAutoFocus as oe } from "./modal/widget-auto-focus.js";
32
+ const ce = s("div", {
33
+ _id: "aiSearchWrapper"
34
+ }), bt = (e) => {
35
+ const {
36
+ searchSettings: { view: t }
37
+ } = b(), { isHidden: i, hasContent: r } = d(), n = F("(max-width: 768px)"), a = N();
38
+ return /* @__PURE__ */ o(
39
+ ce,
40
+ {
41
+ "data-hidden": I(i),
42
+ "data-has-content": I(r),
43
+ "data-in-modal": I(!!a),
44
+ "data-mobile": I(n),
45
+ "data-view": t,
46
+ "data-dual-pane-search-expanded": I(r && t === "dual-pane" && !i),
47
+ ...e
48
+ }
49
+ );
50
+ }, le = s("div", {
51
+ _id: "aiSearchRoot"
52
+ }), pt = (e) => {
53
+ const { isHidden: t } = d(), i = F("(max-width: 768px)");
54
+ return /* @__PURE__ */ o(le, { "data-hidden": I(t), "data-mobile": I(i), ...e });
55
+ }, de = s(y.List, {
56
+ _id: "aiSearchContent"
57
+ }), Rt = C((e, t) => {
58
+ const i = g((r) => r.value);
59
+ return /* @__PURE__ */ o(
60
+ de,
61
+ {
62
+ "aria-activedescendant": `aiSearchResults__Item-${i}`,
63
+ ...e,
64
+ ref: t
65
+ }
66
+ );
67
+ }), Pt = s("div", {
68
+ _id: "aiSearchInputGroup"
69
+ }), gt = s(f, {
70
+ _id: "aiSearchInputIcon",
71
+ iconKey: "search"
72
+ }), ue = s(y.Input, {
73
+ _id: "aiSearchInput"
74
+ }), Tt = C(({ onInput: e, ...t }, i) => {
75
+ const { inputRef: r, shouldAutoFocusInput: n } = d(), a = g((h) => h.value), l = F("(max-width: 768px)"), { searchSettings: c } = b(), m = E(
76
+ () => c.placeholder || (l ? "Search..." : "Search for anything..."),
77
+ [c.placeholder, l]
78
+ ), _ = M(i, r);
79
+ return oe("search", r, n), ne(), /* @__PURE__ */ o(
80
+ ue,
81
+ {
82
+ ref: _,
83
+ placeholder: m,
84
+ "aria-activedescendant": `aiSearchResults__Item-${a}`,
85
+ ...t
86
+ }
87
+ );
88
+ }), me = s(H, {
89
+ _id: "aiSearchLoading",
90
+ iconSettings: {
91
+ builtIn: "LuLoaderCircle"
92
+ }
93
+ }), ft = (e) => {
94
+ const { loading: t } = d();
95
+ return t ? /* @__PURE__ */ o(me, { ...e }) : null;
96
+ }, he = s(y.Item, {
97
+ _id: "aiAskAITrigger",
98
+ value: k
99
+ }), wt = (e) => {
100
+ const { results: t, tab: i } = d(), r = V(), n = t[i]?.[0]?.id ?? "NONE";
101
+ return /* @__PURE__ */ o(
102
+ he,
103
+ {
104
+ ...e,
105
+ id: `aiSearchResults__Item-${k}`,
106
+ tabIndex: 0,
107
+ onPointerLeave: () => r.setState("value", n, !0)
108
+ }
109
+ );
110
+ }, Ie = s("img", {
111
+ _id: "aiAskAITrigger__Icon"
112
+ }), Et = (e) => {
113
+ const { aiChatSettings: t } = b(), { aiAssistantAvatar: i } = t ?? {}, r = typeof i == "string" ? i : i?.light, n = (typeof i == "string" ? i : i?.dark) ?? r, a = te(r, n), [l, c] = J(a);
114
+ return x(() => {
115
+ c(a);
116
+ }, [a]), /* @__PURE__ */ o(Ie, { asChild: !0, ...e, children: l ? (
117
+ // biome-ignore lint/a11y/useAltText: <explanation>
118
+ /* @__PURE__ */ o(
119
+ "img",
120
+ {
121
+ src: l,
122
+ alt: "AI Avatar",
123
+ "data-type": "image",
124
+ onError: T(() => {
125
+ c(null);
126
+ }),
127
+ ...e
128
+ }
129
+ )
130
+ ) : /* @__PURE__ */ o(ie, { "data-type": "icon", ...e }) });
131
+ }, At = s("span", {
132
+ _id: "aiAskAITrigger__Label"
133
+ }), kt = s("span", {
134
+ _id: "aiAskAITrigger__Query"
135
+ }), yt = s(f, {
136
+ _id: "aiAskAITrigger__Indicator",
137
+ iconKey: "openLinkInSameTab"
138
+ }), Lt = s("span", {
139
+ _id: "aiAskAITrigger__IndicatorText"
140
+ }), ve = s(B.Root, {
141
+ _id: "aiSearchResults"
142
+ }), Ct = (e) => {
143
+ const {
144
+ searchSettings: { view: t }
145
+ } = b(), { tab: i, setTab: r, hasContent: n, isHidden: a, disableTransition: l, results: c, defaultTab: m } = d(), _ = V(), h = A(
146
+ (u) => {
147
+ l(), r(u);
148
+ const S = c[u][0] ? c[u][0]?.id : void 0;
149
+ _.setState("value", S, !0);
150
+ },
151
+ [c, l]
152
+ );
153
+ return x(() => {
154
+ let u = i in c ? i : Object.keys(c)[0];
155
+ if (!c[u]?.length) {
156
+ const R = Object.keys(c).find((P) => c[P]?.length);
157
+ R ? u = R : u = m;
158
+ }
159
+ if (!u) return;
160
+ r(u);
161
+ const S = c[u]?.[0];
162
+ S && _.setState("value", S.id, !0);
163
+ }, [c]), /* @__PURE__ */ o(
164
+ ve,
165
+ {
166
+ value: i,
167
+ onValueChange: h,
168
+ "data-has-content": I(n),
169
+ "data-dual-pane-search-expanded": I(n && t === "dual-pane" && !a),
170
+ ...e
171
+ }
172
+ );
173
+ }, _e = s("div", {
174
+ _id: "aiSearchResults__Loading"
175
+ }), Ot = (e) => {
176
+ const { loading: t, resultsList: i } = d();
177
+ return !t || i.length > 0 ? null : /* @__PURE__ */ o(_e, { ...e });
178
+ }, Se = s(y.Empty, {
179
+ _id: "aiSearchResults__Empty"
180
+ }), xt = (e) => {
181
+ const t = g((l) => l.search), { loading: i, results: r, tab: n } = d(), a = r[n]?.length;
182
+ return i || !t || a ? null : /* @__PURE__ */ o(Se, { children: "No results found.", ...e });
183
+ }, be = s(B.List, {
184
+ _id: "aiSearchResults__TabList"
185
+ }), Bt = (e) => {
186
+ const { children: t, ...i } = e, {
187
+ searchSettings: { tabs: r }
188
+ } = b(), { results: n, loading: a, resultsList: l } = d();
189
+ if (a && l.length === 0) return null;
190
+ const c = Object.keys(n);
191
+ return !r.length || !c.length ? null : /* @__PURE__ */ o(be, { tabIndex: -1, children: L(t, c), ...i });
192
+ }, pe = s(B.Trigger, {
193
+ _id: "aiSearchResults__Tab"
194
+ }), Nt = C((e, t) => {
195
+ const i = K(null), r = M(t, i), { tab: n, onClick: a, ...l } = e, { results: c, tab: m, inputRef: _ } = d(), h = c[n].length, u = n === m, S = () => {
196
+ _.current?.focus();
197
+ }, R = se();
198
+ return x(() => {
199
+ u && R?.shadowHost?.shadowRoot?.activeElement?.hasAttribute("ikp-tab") && i.current?.focus();
200
+ }, [u]), /* @__PURE__ */ o(
201
+ pe,
202
+ {
203
+ ref: r,
204
+ "ikp-tab": "",
205
+ tabIndex: u ? 0 : -1,
206
+ value: n,
207
+ children: `${n} (${h})`,
208
+ onClick: T(a, S),
209
+ ...l
210
+ }
211
+ );
212
+ }), Mt = s("div", {
213
+ _id: "aiSearchResults__Content"
214
+ }), Re = s(O.Root, {
215
+ _id: "aiSearchResults__ScrollArea"
216
+ }), Kt = (e) => {
217
+ const { loading: t, resultsList: i } = d();
218
+ return t && i.length === 0 ? null : /* @__PURE__ */ o(Re, { tabIndex: -1, ...e });
219
+ }, Pe = s(O.Viewport, {
220
+ _id: "aiSearchResults__ScrollAreaViewport"
221
+ }), Ut = C(({ children: e, ...t }, i) => {
222
+ const r = ee(), n = M(i, r), { tab: a } = d();
223
+ return x(() => {
224
+ a && r.current?.scrollTo({ top: 0, behavior: "auto" });
225
+ }, [a]), /* @__PURE__ */ o(
226
+ Pe,
227
+ {
228
+ ref: n,
229
+ tabIndex: -1,
230
+ children: (
231
+ /* added this to fix an overflow issue see https://github.com/radix-ui/primitives/issues/926 */
232
+ /* @__PURE__ */ o("div", { tabIndex: -1, style: { display: "grid" }, children: e })
233
+ ),
234
+ ...t
235
+ }
236
+ );
237
+ }), Ht = s(
238
+ O.ScrollAreaScrollbar,
239
+ {
240
+ _id: "aiSearchResults__ScrollAreaScrollbar"
241
+ }
242
+ ), Ft = s(O.ScrollAreaThumb, {
243
+ _id: "aiSearchResults__ScrollAreaThumb"
244
+ }), Dt = s(O.Corner, {
245
+ _id: "aiSearchResults__ScrollAreaCorner"
246
+ }), ge = s(B.Content, {
247
+ _id: "aiSearchResults__List"
248
+ }), Qt = (e) => {
249
+ const { children: t, ...i } = e, { results: r, tab: n } = d(), a = r[n] ?? [];
250
+ return /* @__PURE__ */ o(
251
+ ge,
252
+ {
253
+ value: n,
254
+ "data-has-results": I(a.length > 0),
255
+ "aria-label": "Search results",
256
+ children: L(t, a),
257
+ tabIndex: -1,
258
+ ...i
259
+ }
260
+ );
261
+ }, Te = s(y.Item, {
262
+ _id: "aiSearchResults__Item",
263
+ asChild: !0
264
+ }), Vt = C(({ item: e, onClick: t, onSelect: i, children: r, ...n }, a) => {
265
+ const {
266
+ searchSettings: { shouldOpenLinksInNewTab: l, view: c, searchQueryParamKey: m }
267
+ } = b(), { logEvent: _ } = Y(), h = g((p) => p.search), { transitionsDisabled: u } = d(), S = g((p) => p.value), R = K(null), P = N(), D = M(a, R), $ = A((p) => {
268
+ p.trigger === "keyboard" && R.current?.click();
269
+ }, []), w = E(
270
+ () => e.shouldOpenInNewTab !== void 0 ? e.shouldOpenInNewTab : l,
271
+ [e.shouldOpenInNewTab, l]
272
+ ), G = A(
273
+ (p) => {
274
+ _({
275
+ eventName: "search_result_clicked",
276
+ properties: {
277
+ searchQuery: h,
278
+ title: e.title,
279
+ url: e.url
280
+ }
281
+ });
282
+ const z = p.metaKey || p.ctrlKey;
283
+ P?.isOpen && !z && !w && P.setOpen(!1);
284
+ },
285
+ [_, h, e.title, e.url, P, w]
286
+ ), Q = S === e.id, j = Q || (S === "NONE" || S === k), q = E(() => ({
287
+ href: m ? ae(e.url, h, m) : e.url,
288
+ isExternal: w,
289
+ appendToUrl: e.appendToUrl,
290
+ children: r,
291
+ id: `aiSearchResults__Item-${e.id}`
292
+ }), [e.url, w, e.appendToUrl, r, e.id, m, h]);
293
+ return /* @__PURE__ */ o(W, { source: { ...e, isExternal: w }, children: /* @__PURE__ */ o(
294
+ Te,
295
+ {
296
+ ref: D,
297
+ value: e.id,
298
+ "data-type": e.type,
299
+ "data-breadcrumbs": !!e.breadcrumbs?.length,
300
+ "data-disable-transitions": I(u),
301
+ "data-view": c,
302
+ onSelect: T(i, $),
303
+ onClick: T(t, G),
304
+ "data-selected": I(Q),
305
+ tabIndex: j ? 0 : -1,
306
+ ...n,
307
+ children: /* @__PURE__ */ o(U, { ...q })
308
+ }
309
+ ) });
310
+ }), fe = s("div", {
311
+ _id: "aiSearchResults__ItemBreadcrumbs"
312
+ }), we = (e) => {
313
+ const { source: t } = v(), { tab: i } = d();
314
+ if (!t.breadcrumbs?.length) return null;
315
+ const { children: r, ...n } = e, l = t.tabs?.find((c) => typeof c != "string" && c[0] === i)?.[1]?.breadcrumbs ?? t.breadcrumbs ?? [];
316
+ return /* @__PURE__ */ o(
317
+ fe,
318
+ {
319
+ "aria-hidden": "true",
320
+ children: L(r, l),
321
+ ...n
322
+ }
323
+ );
324
+ }, Ee = s(f, {
325
+ _id: "aiSearchResults__ItemBreadcrumbIcon",
326
+ iconKey: "breadcrumbSeparator"
327
+ }), Ae = s(H, {
328
+ _id: "aiSearchResults__ItemIcon"
329
+ }), Wt = (e) => {
330
+ const { source: t } = v();
331
+ return t.icon ? /* @__PURE__ */ o(Ae, { iconSettings: t.icon, "data-type": t.type, ...e }) : null;
332
+ }, ke = s("span", {
333
+ _id: "aiSearchResults__ItemTitle"
334
+ }), $t = (e) => {
335
+ const { source: t } = v();
336
+ return /* @__PURE__ */ o(ke, { "data-type": t.type, children: t.title, ...e });
337
+ }, ye = s("span", {
338
+ _id: "aiSearchResults__ItemTag"
339
+ }), Gt = (e) => {
340
+ const { source: t } = v();
341
+ return /* @__PURE__ */ o(ye, { "data-type": t.type, children: t.tag, ...e });
342
+ }, Le = s("span", {
343
+ _id: "aiSearchResults__ItemDescription"
344
+ }), jt = (e) => {
345
+ const { source: t } = v(), { children: i, ...r } = e, n = E(() => t.description ? Z(t.description) : [], [t.description]);
346
+ return n.length ? /* @__PURE__ */ o(
347
+ Le,
348
+ {
349
+ "data-type": t.type,
350
+ "aria-hidden": "true",
351
+ children: L(i, n),
352
+ ...r
353
+ }
354
+ ) : null;
355
+ }, Ce = s("span", {
356
+ _id: "aiSearchResults__ItemDescriptionPart"
357
+ }), qt = (e) => {
358
+ const { part: t, ...i } = e, { source: r } = v();
359
+ return typeof t == "string" ? t : /* @__PURE__ */ o(
360
+ Ce,
361
+ {
362
+ "data-type": r.type,
363
+ children: t.content,
364
+ "data-highlighted": I(t.highlighted),
365
+ ...i
366
+ }
367
+ );
368
+ }, Oe = s(f, {
369
+ _id: "aiSearchResults__ItemIndicator"
370
+ }), zt = (e) => {
371
+ const { source: t } = v(), {
372
+ searchSettings: { view: i }
373
+ } = b();
374
+ return /* @__PURE__ */ o(
375
+ Oe,
376
+ {
377
+ iconKey: t.isExternal ? "openLinkInNewTab" : "openLinkInSameTab",
378
+ "data-view": i,
379
+ ...e
380
+ }
381
+ );
382
+ }, xe = s("div", {
383
+ _id: "aiSearchResults__ItemPreview",
384
+ "aria-hidden": !0
385
+ }), Jt = (e) => {
386
+ const {
387
+ searchSettings: { view: t, shouldOpenLinksInNewTab: i }
388
+ } = b(), { results: r, tab: n } = d(), a = g((h) => h.value), l = r[n] ?? [], c = K(null), m = E(() => {
389
+ if (a === k) return c.current;
390
+ const h = l.find((u) => u.id === a);
391
+ return c.current = h, h;
392
+ }, [a]);
393
+ if (t !== "dual-pane" || a === k || !m) return null;
394
+ const _ = m.shouldOpenInNewTab !== void 0 ? m.shouldOpenInNewTab : i;
395
+ return /* @__PURE__ */ o(W, { source: { ...m, isExternal: _ }, children: /* @__PURE__ */ o(xe, { ...e }) });
396
+ }, Xt = s("div", {
397
+ _id: "aiSearchResults__ItemPreview__Header"
398
+ }), Be = s(U, {
399
+ _id: "aiSearchResults__ItemPreview__Heading"
400
+ }), Yt = (e) => {
401
+ const { source: t } = v(), i = N(), r = A(
402
+ (n) => {
403
+ const a = n.metaKey || n.ctrlKey;
404
+ i?.isOpen && !a && !t.isExternal && i.setOpen(!1);
405
+ },
406
+ [i, t.isExternal]
407
+ );
408
+ return /* @__PURE__ */ o(
409
+ Be,
410
+ {
411
+ href: t.url,
412
+ isExternal: t.isExternal,
413
+ appendToUrl: t.appendToUrl,
414
+ "data-type": t.type,
415
+ onClick: T(e.onClick, r),
416
+ ...e
417
+ }
418
+ );
419
+ }, Ne = s("span", {
420
+ _id: "aiSearchResults__ItemPreview__Title"
421
+ }), Zt = (e) => {
422
+ const { source: t } = v();
423
+ return /* @__PURE__ */ o(Ne, { children: t.title, ...e });
424
+ }, Me = s(f, {
425
+ _id: "aiSearchResults__ItemPreview__Title__LinkIcon",
426
+ iconKey: "openLinkInNewTab"
427
+ }), ei = (e) => {
428
+ const { source: t } = v();
429
+ return /* @__PURE__ */ o(
430
+ Me,
431
+ {
432
+ iconKey: t.isExternal ? "openLinkInNewTab" : "openLinkInSameTab",
433
+ ...e
434
+ }
435
+ );
436
+ }, ti = s(
437
+ we,
438
+ {
439
+ _id: "aiSearchResults__ItemPreview__Breadcrumbs"
440
+ }
441
+ ), ii = s(
442
+ Ee,
443
+ {
444
+ _id: "aiSearchResults__ItemPreview__BreadcrumbIcon"
445
+ }
446
+ ), Ke = s(re, {
447
+ _id: "aiSearchResults__ItemPreview__Body"
448
+ }), si = (e) => {
449
+ const { source: t } = v(), { resultsList: i } = d(), r = i.find((a) => a.id === t.id), {
450
+ searchSettings: { shouldOpenLinksInNewTab: n }
451
+ } = b();
452
+ return r ? /* @__PURE__ */ o(
453
+ Ke,
454
+ {
455
+ shouldOpenLinksInNewTab: n,
456
+ children: r.preview,
457
+ ...e
458
+ }
459
+ ) : null;
460
+ }, Ue = s("div", {
461
+ _id: "aiSearchResults__ItemPreview__Outline"
462
+ }), ri = (e) => {
463
+ const { source: t } = v(), { resultsList: i } = d();
464
+ return i.find((a) => a.id === t.id)?.headings?.length ? /* @__PURE__ */ o(Ue, { ...e }) : null;
465
+ }, ni = s("span", {
466
+ _id: "aiSearchResults__ItemPreview__Outline__Title",
467
+ children: "On this page"
468
+ }), He = s("ul", {
469
+ _id: "aiSearchResults__ItemPreview__Outline__List"
470
+ }), ai = (e) => {
471
+ const { source: t } = v(), { resultsList: i } = d(), n = i.find((c) => c.id === t.id)?.headings;
472
+ if (!n?.length) return null;
473
+ const { children: a, ...l } = e;
474
+ return /* @__PURE__ */ o(He, { children: L(a, n), ...l });
475
+ }, Fe = s(U, {
476
+ _id: "aiSearchResults__ItemPreview__Outline__Item"
477
+ }), oi = (e) => {
478
+ const {
479
+ searchSettings: { shouldOpenLinksInNewTab: t }
480
+ } = b(), i = N(), r = A(
481
+ (n) => {
482
+ const a = n.metaKey || n.ctrlKey;
483
+ i?.isOpen && !a && !t && i.setOpen(!1);
484
+ },
485
+ [i, t]
486
+ );
487
+ return /* @__PURE__ */ o(
488
+ Fe,
489
+ {
490
+ isExternal: t,
491
+ onClick: T(e.onClick, r),
492
+ ...e
493
+ }
494
+ );
495
+ }, ci = s(f, {
496
+ _id: "aiSearchResults__ItemPreview__Outline__ItemIcon",
497
+ iconKey: "newLine"
498
+ }), De = s("span", {
499
+ _id: "aiSearchResults__ItemPreview__Outline__ItemText"
500
+ }), li = (e) => /* @__PURE__ */ o(De, { ...e }), di = s(
501
+ H,
502
+ {
503
+ _id: "aiSearchResults__ItemPreview__Outline__ItemLinkIcon",
504
+ iconSettings: {
505
+ builtIn: "LuLink"
506
+ }
507
+ }
508
+ ), Qe = s("div", {
509
+ _id: "aiSearchFooter"
510
+ }), ui = (e) => {
511
+ const { hasContent: t } = d();
512
+ return /* @__PURE__ */ o(Qe, { "data-has-results": I(t), ...e });
513
+ }, mi = s("div", {
514
+ _id: "aiSearchTagline__Container"
515
+ }), hi = s("span", {
516
+ _id: "aiSearchTagline__Text",
517
+ children: "Powered by"
518
+ }), Ii = s(X, {
519
+ _id: "aiSearchTagline__Logo"
520
+ }), vi = s("a", {
521
+ _id: "aiSearchTagline__BrandName",
522
+ children: "inkeep",
523
+ href: "https://www.inkeep.com/",
524
+ target: "_blank",
525
+ rel: "noopener noreferrer"
526
+ });
527
+ export {
528
+ wt as AskAITrigger,
529
+ Et as AskAITriggerIcon,
530
+ yt as AskAITriggerIndicator,
531
+ Lt as AskAITriggerIndicatorText,
532
+ At as AskAITriggerLabel,
533
+ kt as AskAITriggerQuery,
534
+ Rt as Content,
535
+ gt as EmbeddedSearchInputIcon,
536
+ wt as EmbeddedSearchPrimitiveAskAITrigger,
537
+ Et as EmbeddedSearchPrimitiveAskAITriggerIcon,
538
+ yt as EmbeddedSearchPrimitiveAskAITriggerIndicator,
539
+ Lt as EmbeddedSearchPrimitiveAskAITriggerIndicatorText,
540
+ At as EmbeddedSearchPrimitiveAskAITriggerLabel,
541
+ kt as EmbeddedSearchPrimitiveAskAITriggerQuery,
542
+ Rt as EmbeddedSearchPrimitiveContent,
543
+ ui as EmbeddedSearchPrimitiveFooter,
544
+ Tt as EmbeddedSearchPrimitiveInput,
545
+ Pt as EmbeddedSearchPrimitiveInputGroup,
546
+ ft as EmbeddedSearchPrimitiveLoading,
547
+ Ct as EmbeddedSearchPrimitiveResults,
548
+ Mt as EmbeddedSearchPrimitiveResultsContent,
549
+ xt as EmbeddedSearchPrimitiveResultsEmpty,
550
+ Vt as EmbeddedSearchPrimitiveResultsItem,
551
+ we as EmbeddedSearchPrimitiveResultsItemBreadcrumbs,
552
+ jt as EmbeddedSearchPrimitiveResultsItemDescription,
553
+ qt as EmbeddedSearchPrimitiveResultsItemDescriptionPart,
554
+ Wt as EmbeddedSearchPrimitiveResultsItemIcon,
555
+ zt as EmbeddedSearchPrimitiveResultsItemIndicator,
556
+ Jt as EmbeddedSearchPrimitiveResultsItemPreview,
557
+ si as EmbeddedSearchPrimitiveResultsItemPreviewBody,
558
+ ii as EmbeddedSearchPrimitiveResultsItemPreviewBreadcrumbIcon,
559
+ Yt as EmbeddedSearchPrimitiveResultsItemPreviewHeading,
560
+ ri as EmbeddedSearchPrimitiveResultsItemPreviewOutline,
561
+ oi as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItem,
562
+ ci as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemIcon,
563
+ di as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemLinkIcon,
564
+ li as EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemText,
565
+ ai as EmbeddedSearchPrimitiveResultsItemPreviewOutlineList,
566
+ ni as EmbeddedSearchPrimitiveResultsItemPreviewOutlineTitle,
567
+ Zt as EmbeddedSearchPrimitiveResultsItemPreviewTitle,
568
+ ei as EmbeddedSearchPrimitiveResultsItemPreviewTitleLinkIcon,
569
+ Gt as EmbeddedSearchPrimitiveResultsItemTag,
570
+ $t as EmbeddedSearchPrimitiveResultsItemTitle,
571
+ Qt as EmbeddedSearchPrimitiveResultsList,
572
+ Ot as EmbeddedSearchPrimitiveResultsLoading,
573
+ Kt as EmbeddedSearchPrimitiveResultsScrollArea,
574
+ Ut as EmbeddedSearchPrimitiveResultsScrollAreaViewport,
575
+ Nt as EmbeddedSearchPrimitiveResultsTab,
576
+ Bt as EmbeddedSearchPrimitiveResultsTabList,
577
+ pt as EmbeddedSearchPrimitiveRoot,
578
+ bt as EmbeddedSearchPrimitiveWrapper,
579
+ ui as Footer,
580
+ Tt as Input,
581
+ Pt as InputGroup,
582
+ gt as InputIcon,
583
+ ft as Loading,
584
+ de as PrimitiveContent,
585
+ bi as Provider,
586
+ Ct as Results,
587
+ Mt as ResultsContent,
588
+ xt as ResultsEmpty,
589
+ Vt as ResultsItem,
590
+ Ee as ResultsItemBreadcrumbIcon,
591
+ we as ResultsItemBreadcrumbs,
592
+ jt as ResultsItemDescription,
593
+ qt as ResultsItemDescriptionPart,
594
+ Wt as ResultsItemIcon,
595
+ zt as ResultsItemIndicator,
596
+ Jt as ResultsItemPreview,
597
+ si as ResultsItemPreviewBody,
598
+ ii as ResultsItemPreviewBreadcrumbIcon,
599
+ ti as ResultsItemPreviewBreadcrumbs,
600
+ Xt as ResultsItemPreviewHeader,
601
+ Yt as ResultsItemPreviewHeading,
602
+ ri as ResultsItemPreviewOutline,
603
+ oi as ResultsItemPreviewOutlineItem,
604
+ ci as ResultsItemPreviewOutlineItemIcon,
605
+ di as ResultsItemPreviewOutlineItemLinkIcon,
606
+ li as ResultsItemPreviewOutlineItemText,
607
+ ai as ResultsItemPreviewOutlineList,
608
+ ni as ResultsItemPreviewOutlineTitle,
609
+ Zt as ResultsItemPreviewTitle,
610
+ ei as ResultsItemPreviewTitleLinkIcon,
611
+ Gt as ResultsItemTag,
612
+ $t as ResultsItemTitle,
613
+ Qt as ResultsList,
614
+ Ot as ResultsLoading,
615
+ Kt as ResultsScrollArea,
616
+ Dt as ResultsScrollAreaCorner,
617
+ Ht as ResultsScrollAreaScrollbar,
618
+ Ft as ResultsScrollAreaThumb,
619
+ Ut as ResultsScrollAreaViewport,
620
+ Nt as ResultsTab,
621
+ Bt as ResultsTabList,
622
+ pt as Root,
623
+ vi as TaglineBrandName,
624
+ mi as TaglineContainer,
625
+ Ii as TaglineLogo,
626
+ hi as TaglineText,
627
+ bt as Wrapper
628
+ };
@@ -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,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 r=require("./factory.cjs"),o=require("./embedded-chat.cjs"),a=require("./sidebar-chat/index.cjs"),i=require("./embedded-chat/chat-provider.cjs"),d=require("./embedded-search.cjs"),e=require("./embedded-search/search-provider.cjs"),c=require("./modal.cjs"),t=require("./modal/modal-provider.cjs"),s=require("./chat-button.cjs"),h=require("./searchbar.cjs");exports.ikp=r.ikp;exports.jsxFactory=r.jsxFactory;exports.EmbeddedChatPrimitive=o;exports.SidebarChatPrimitive=a;exports.ChatProvider=i.ChatProvider;exports.useChat=i.useChat;exports.EmbeddedSearchPrimitive=d;exports.SearchProvider=e.SearchProvider;exports.SearchProviderImpl=e.SearchProviderImpl;exports.useSearch=e.useSearch;exports.ModalPrimitive=c;exports.ModalProvider=t.ModalProvider;exports.useModal=t.useModal;exports.ChatButtonPrimitive=s;exports.SearchBarPrimitive=h;
@@ -0,0 +1,27 @@
1
+ import { ikp as p, jsxFactory as s } from "./factory.js";
2
+ import * as r from "./embedded-chat.js";
3
+ import * as e from "./sidebar-chat/index.js";
4
+ import { ChatProvider as x, useChat as f } from "./embedded-chat/chat-provider.js";
5
+ import * as o from "./embedded-search.js";
6
+ import { SearchProvider as P, SearchProviderImpl as c, useSearch as S } from "./embedded-search/search-provider.js";
7
+ import * as a from "./modal.js";
8
+ import { ModalProvider as C, useModal as l } from "./modal/modal-provider.js";
9
+ import * as t from "./chat-button.js";
10
+ import * as i from "./searchbar.js";
11
+ export {
12
+ t as ChatButtonPrimitive,
13
+ x as ChatProvider,
14
+ r as EmbeddedChatPrimitive,
15
+ o as EmbeddedSearchPrimitive,
16
+ a as ModalPrimitive,
17
+ C as ModalProvider,
18
+ i as SearchBarPrimitive,
19
+ P as SearchProvider,
20
+ c as SearchProviderImpl,
21
+ e as SidebarChatPrimitive,
22
+ p as ikp,
23
+ s as jsxFactory,
24
+ f as useChat,
25
+ l as useModal,
26
+ S as useSearch
27
+ };