@crafter/rn-ai-elements 0.0.1

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 (344) hide show
  1. package/lib/commonjs/chatbot/AIImage.js +126 -0
  2. package/lib/commonjs/chatbot/AIImage.js.map +1 -0
  3. package/lib/commonjs/chatbot/Attachments.js +317 -0
  4. package/lib/commonjs/chatbot/Attachments.js.map +1 -0
  5. package/lib/commonjs/chatbot/ChatErrorBoundary.js +201 -0
  6. package/lib/commonjs/chatbot/ChatErrorBoundary.js.map +1 -0
  7. package/lib/commonjs/chatbot/ChatMessageItem.js +169 -0
  8. package/lib/commonjs/chatbot/ChatMessageItem.js.map +1 -0
  9. package/lib/commonjs/chatbot/Conversation.js +415 -0
  10. package/lib/commonjs/chatbot/Conversation.js.map +1 -0
  11. package/lib/commonjs/chatbot/ConversationScrollButton.js +131 -0
  12. package/lib/commonjs/chatbot/ConversationScrollButton.js.map +1 -0
  13. package/lib/commonjs/chatbot/Message.js +203 -0
  14. package/lib/commonjs/chatbot/Message.js.map +1 -0
  15. package/lib/commonjs/chatbot/PromptInput.js +352 -0
  16. package/lib/commonjs/chatbot/PromptInput.js.map +1 -0
  17. package/lib/commonjs/chatbot/Reasoning.js +184 -0
  18. package/lib/commonjs/chatbot/Reasoning.js.map +1 -0
  19. package/lib/commonjs/chatbot/Shimmer.js +116 -0
  20. package/lib/commonjs/chatbot/Shimmer.js.map +1 -0
  21. package/lib/commonjs/chatbot/Sources.js +212 -0
  22. package/lib/commonjs/chatbot/Sources.js.map +1 -0
  23. package/lib/commonjs/chatbot/Suggestion.js +99 -0
  24. package/lib/commonjs/chatbot/Suggestion.js.map +1 -0
  25. package/lib/commonjs/chatbot/Tool.js +307 -0
  26. package/lib/commonjs/chatbot/Tool.js.map +1 -0
  27. package/lib/commonjs/chatbot/adapters/uiMessageAdapter.js +141 -0
  28. package/lib/commonjs/chatbot/adapters/uiMessageAdapter.js.map +1 -0
  29. package/lib/commonjs/chatbot/index.js +140 -0
  30. package/lib/commonjs/chatbot/index.js.map +1 -0
  31. package/lib/commonjs/chatbot/types.js +6 -0
  32. package/lib/commonjs/chatbot/types.js.map +1 -0
  33. package/lib/commonjs/hooks/index.js +34 -0
  34. package/lib/commonjs/hooks/index.js.map +1 -0
  35. package/lib/commonjs/hooks/useAutoScroll.js +39 -0
  36. package/lib/commonjs/hooks/useAutoScroll.js.map +1 -0
  37. package/lib/commonjs/hooks/useClipboard.js +44 -0
  38. package/lib/commonjs/hooks/useClipboard.js.map +1 -0
  39. package/lib/commonjs/hooks/useCollapsible.js +35 -0
  40. package/lib/commonjs/hooks/useCollapsible.js.map +1 -0
  41. package/lib/commonjs/hooks/useStickToBottom.js +68 -0
  42. package/lib/commonjs/hooks/useStickToBottom.js.map +1 -0
  43. package/lib/commonjs/index.js +257 -0
  44. package/lib/commonjs/index.js.map +1 -0
  45. package/lib/commonjs/package.json +1 -0
  46. package/lib/commonjs/primitives/Badge.js +119 -0
  47. package/lib/commonjs/primitives/Badge.js.map +1 -0
  48. package/lib/commonjs/primitives/Button.js +185 -0
  49. package/lib/commonjs/primitives/Button.js.map +1 -0
  50. package/lib/commonjs/primitives/Card.js +166 -0
  51. package/lib/commonjs/primitives/Card.js.map +1 -0
  52. package/lib/commonjs/primitives/Collapsible.js +137 -0
  53. package/lib/commonjs/primitives/Collapsible.js.map +1 -0
  54. package/lib/commonjs/primitives/ScrollArea.js +40 -0
  55. package/lib/commonjs/primitives/ScrollArea.js.map +1 -0
  56. package/lib/commonjs/primitives/index.js +83 -0
  57. package/lib/commonjs/primitives/index.js.map +1 -0
  58. package/lib/commonjs/streaming/StreamingMarkdown.js +252 -0
  59. package/lib/commonjs/streaming/StreamingMarkdown.js.map +1 -0
  60. package/lib/commonjs/streaming/index.js +13 -0
  61. package/lib/commonjs/streaming/index.js.map +1 -0
  62. package/lib/commonjs/streaming/parser.js +482 -0
  63. package/lib/commonjs/streaming/parser.js.map +1 -0
  64. package/lib/commonjs/streaming/renderers/BlockquoteRenderer.js +35 -0
  65. package/lib/commonjs/streaming/renderers/BlockquoteRenderer.js.map +1 -0
  66. package/lib/commonjs/streaming/renderers/CodeRenderer.js +128 -0
  67. package/lib/commonjs/streaming/renderers/CodeRenderer.js.map +1 -0
  68. package/lib/commonjs/streaming/renderers/HeadingRenderer.js +61 -0
  69. package/lib/commonjs/streaming/renderers/HeadingRenderer.js.map +1 -0
  70. package/lib/commonjs/streaming/renderers/ImageRenderer.js +53 -0
  71. package/lib/commonjs/streaming/renderers/ImageRenderer.js.map +1 -0
  72. package/lib/commonjs/streaming/renderers/LinkRenderer.js +49 -0
  73. package/lib/commonjs/streaming/renderers/LinkRenderer.js.map +1 -0
  74. package/lib/commonjs/streaming/renderers/ListRenderer.js +63 -0
  75. package/lib/commonjs/streaming/renderers/ListRenderer.js.map +1 -0
  76. package/lib/commonjs/streaming/renderers/TableRenderer.js +77 -0
  77. package/lib/commonjs/streaming/renderers/TableRenderer.js.map +1 -0
  78. package/lib/commonjs/streaming/renderers/TextRenderer.js +41 -0
  79. package/lib/commonjs/streaming/renderers/TextRenderer.js.map +1 -0
  80. package/lib/commonjs/streaming/renderers/index.js +76 -0
  81. package/lib/commonjs/streaming/renderers/index.js.map +1 -0
  82. package/lib/commonjs/streaming/renderers/renderInlineChildren.js +112 -0
  83. package/lib/commonjs/streaming/renderers/renderInlineChildren.js.map +1 -0
  84. package/lib/commonjs/streaming/renderers/renderNode.js +81 -0
  85. package/lib/commonjs/streaming/renderers/renderNode.js.map +1 -0
  86. package/lib/commonjs/theme/ThemeProvider.js +68 -0
  87. package/lib/commonjs/theme/ThemeProvider.js.map +1 -0
  88. package/lib/commonjs/theme/defaultTheme.js +96 -0
  89. package/lib/commonjs/theme/defaultTheme.js.map +1 -0
  90. package/lib/commonjs/theme/index.js +32 -0
  91. package/lib/commonjs/theme/index.js.map +1 -0
  92. package/lib/commonjs/theme/tokens.js +2 -0
  93. package/lib/commonjs/theme/tokens.js.map +1 -0
  94. package/lib/commonjs/types.d.js +2 -0
  95. package/lib/commonjs/types.d.js.map +1 -0
  96. package/lib/commonjs/voice/index.js +13 -0
  97. package/lib/commonjs/voice/index.js.map +1 -0
  98. package/lib/commonjs/voice/useSpeechRecognition.js +172 -0
  99. package/lib/commonjs/voice/useSpeechRecognition.js.map +1 -0
  100. package/lib/module/chatbot/AIImage.js +121 -0
  101. package/lib/module/chatbot/AIImage.js.map +1 -0
  102. package/lib/module/chatbot/Attachments.js +312 -0
  103. package/lib/module/chatbot/Attachments.js.map +1 -0
  104. package/lib/module/chatbot/ChatErrorBoundary.js +196 -0
  105. package/lib/module/chatbot/ChatErrorBoundary.js.map +1 -0
  106. package/lib/module/chatbot/ChatMessageItem.js +164 -0
  107. package/lib/module/chatbot/ChatMessageItem.js.map +1 -0
  108. package/lib/module/chatbot/Conversation.js +412 -0
  109. package/lib/module/chatbot/Conversation.js.map +1 -0
  110. package/lib/module/chatbot/ConversationScrollButton.js +126 -0
  111. package/lib/module/chatbot/ConversationScrollButton.js.map +1 -0
  112. package/lib/module/chatbot/Message.js +198 -0
  113. package/lib/module/chatbot/Message.js.map +1 -0
  114. package/lib/module/chatbot/PromptInput.js +347 -0
  115. package/lib/module/chatbot/PromptInput.js.map +1 -0
  116. package/lib/module/chatbot/Reasoning.js +179 -0
  117. package/lib/module/chatbot/Reasoning.js.map +1 -0
  118. package/lib/module/chatbot/Shimmer.js +111 -0
  119. package/lib/module/chatbot/Shimmer.js.map +1 -0
  120. package/lib/module/chatbot/Sources.js +207 -0
  121. package/lib/module/chatbot/Sources.js.map +1 -0
  122. package/lib/module/chatbot/Suggestion.js +94 -0
  123. package/lib/module/chatbot/Suggestion.js.map +1 -0
  124. package/lib/module/chatbot/Tool.js +303 -0
  125. package/lib/module/chatbot/Tool.js.map +1 -0
  126. package/lib/module/chatbot/adapters/uiMessageAdapter.js +137 -0
  127. package/lib/module/chatbot/adapters/uiMessageAdapter.js.map +1 -0
  128. package/lib/module/chatbot/index.js +39 -0
  129. package/lib/module/chatbot/index.js.map +1 -0
  130. package/lib/module/chatbot/types.js +4 -0
  131. package/lib/module/chatbot/types.js.map +1 -0
  132. package/lib/module/hooks/index.js +7 -0
  133. package/lib/module/hooks/index.js.map +1 -0
  134. package/lib/module/hooks/useAutoScroll.js +35 -0
  135. package/lib/module/hooks/useAutoScroll.js.map +1 -0
  136. package/lib/module/hooks/useClipboard.js +40 -0
  137. package/lib/module/hooks/useClipboard.js.map +1 -0
  138. package/lib/module/hooks/useCollapsible.js +31 -0
  139. package/lib/module/hooks/useCollapsible.js.map +1 -0
  140. package/lib/module/hooks/useStickToBottom.js +64 -0
  141. package/lib/module/hooks/useStickToBottom.js.map +1 -0
  142. package/lib/module/index.js +19 -0
  143. package/lib/module/index.js.map +1 -0
  144. package/lib/module/package.json +1 -0
  145. package/lib/module/primitives/Badge.js +114 -0
  146. package/lib/module/primitives/Badge.js.map +1 -0
  147. package/lib/module/primitives/Button.js +180 -0
  148. package/lib/module/primitives/Button.js.map +1 -0
  149. package/lib/module/primitives/Card.js +156 -0
  150. package/lib/module/primitives/Card.js.map +1 -0
  151. package/lib/module/primitives/Collapsible.js +130 -0
  152. package/lib/module/primitives/Collapsible.js.map +1 -0
  153. package/lib/module/primitives/ScrollArea.js +35 -0
  154. package/lib/module/primitives/ScrollArea.js.map +1 -0
  155. package/lib/module/primitives/index.js +8 -0
  156. package/lib/module/primitives/index.js.map +1 -0
  157. package/lib/module/streaming/StreamingMarkdown.js +246 -0
  158. package/lib/module/streaming/StreamingMarkdown.js.map +1 -0
  159. package/lib/module/streaming/index.js +4 -0
  160. package/lib/module/streaming/index.js.map +1 -0
  161. package/lib/module/streaming/parser.js +477 -0
  162. package/lib/module/streaming/parser.js.map +1 -0
  163. package/lib/module/streaming/renderers/BlockquoteRenderer.js +30 -0
  164. package/lib/module/streaming/renderers/BlockquoteRenderer.js.map +1 -0
  165. package/lib/module/streaming/renderers/CodeRenderer.js +123 -0
  166. package/lib/module/streaming/renderers/CodeRenderer.js.map +1 -0
  167. package/lib/module/streaming/renderers/HeadingRenderer.js +56 -0
  168. package/lib/module/streaming/renderers/HeadingRenderer.js.map +1 -0
  169. package/lib/module/streaming/renderers/ImageRenderer.js +48 -0
  170. package/lib/module/streaming/renderers/ImageRenderer.js.map +1 -0
  171. package/lib/module/streaming/renderers/LinkRenderer.js +44 -0
  172. package/lib/module/streaming/renderers/LinkRenderer.js.map +1 -0
  173. package/lib/module/streaming/renderers/ListRenderer.js +58 -0
  174. package/lib/module/streaming/renderers/ListRenderer.js.map +1 -0
  175. package/lib/module/streaming/renderers/TableRenderer.js +72 -0
  176. package/lib/module/streaming/renderers/TableRenderer.js.map +1 -0
  177. package/lib/module/streaming/renderers/TextRenderer.js +36 -0
  178. package/lib/module/streaming/renderers/TextRenderer.js.map +1 -0
  179. package/lib/module/streaming/renderers/index.js +13 -0
  180. package/lib/module/streaming/renderers/index.js.map +1 -0
  181. package/lib/module/streaming/renderers/renderInlineChildren.js +107 -0
  182. package/lib/module/streaming/renderers/renderInlineChildren.js.map +1 -0
  183. package/lib/module/streaming/renderers/renderNode.js +78 -0
  184. package/lib/module/streaming/renderers/renderNode.js.map +1 -0
  185. package/lib/module/theme/ThemeProvider.js +62 -0
  186. package/lib/module/theme/ThemeProvider.js.map +1 -0
  187. package/lib/module/theme/defaultTheme.js +92 -0
  188. package/lib/module/theme/defaultTheme.js.map +1 -0
  189. package/lib/module/theme/index.js +5 -0
  190. package/lib/module/theme/index.js.map +1 -0
  191. package/lib/module/theme/tokens.js +2 -0
  192. package/lib/module/theme/tokens.js.map +1 -0
  193. package/lib/module/types.d.js +2 -0
  194. package/lib/module/types.d.js.map +1 -0
  195. package/lib/module/voice/index.js +14 -0
  196. package/lib/module/voice/index.js.map +1 -0
  197. package/lib/module/voice/useSpeechRecognition.js +169 -0
  198. package/lib/module/voice/useSpeechRecognition.js.map +1 -0
  199. package/lib/typescript/src/chatbot/AIImage.d.ts +24 -0
  200. package/lib/typescript/src/chatbot/AIImage.d.ts.map +1 -0
  201. package/lib/typescript/src/chatbot/Attachments.d.ts +20 -0
  202. package/lib/typescript/src/chatbot/Attachments.d.ts.map +1 -0
  203. package/lib/typescript/src/chatbot/ChatErrorBoundary.d.ts +57 -0
  204. package/lib/typescript/src/chatbot/ChatErrorBoundary.d.ts.map +1 -0
  205. package/lib/typescript/src/chatbot/ChatMessageItem.d.ts +45 -0
  206. package/lib/typescript/src/chatbot/ChatMessageItem.d.ts.map +1 -0
  207. package/lib/typescript/src/chatbot/Conversation.d.ts +94 -0
  208. package/lib/typescript/src/chatbot/Conversation.d.ts.map +1 -0
  209. package/lib/typescript/src/chatbot/ConversationScrollButton.d.ts +62 -0
  210. package/lib/typescript/src/chatbot/ConversationScrollButton.d.ts.map +1 -0
  211. package/lib/typescript/src/chatbot/Message.d.ts +39 -0
  212. package/lib/typescript/src/chatbot/Message.d.ts.map +1 -0
  213. package/lib/typescript/src/chatbot/PromptInput.d.ts +93 -0
  214. package/lib/typescript/src/chatbot/PromptInput.d.ts.map +1 -0
  215. package/lib/typescript/src/chatbot/Reasoning.d.ts +14 -0
  216. package/lib/typescript/src/chatbot/Reasoning.d.ts.map +1 -0
  217. package/lib/typescript/src/chatbot/Shimmer.d.ts +13 -0
  218. package/lib/typescript/src/chatbot/Shimmer.d.ts.map +1 -0
  219. package/lib/typescript/src/chatbot/Sources.d.ts +17 -0
  220. package/lib/typescript/src/chatbot/Sources.d.ts.map +1 -0
  221. package/lib/typescript/src/chatbot/Suggestion.d.ts +15 -0
  222. package/lib/typescript/src/chatbot/Suggestion.d.ts.map +1 -0
  223. package/lib/typescript/src/chatbot/Tool.d.ts +30 -0
  224. package/lib/typescript/src/chatbot/Tool.d.ts.map +1 -0
  225. package/lib/typescript/src/chatbot/adapters/uiMessageAdapter.d.ts +24 -0
  226. package/lib/typescript/src/chatbot/adapters/uiMessageAdapter.d.ts.map +1 -0
  227. package/lib/typescript/src/chatbot/index.d.ts +29 -0
  228. package/lib/typescript/src/chatbot/index.d.ts.map +1 -0
  229. package/lib/typescript/src/chatbot/types.d.ts +49 -0
  230. package/lib/typescript/src/chatbot/types.d.ts.map +1 -0
  231. package/lib/typescript/src/hooks/index.d.ts +9 -0
  232. package/lib/typescript/src/hooks/index.d.ts.map +1 -0
  233. package/lib/typescript/src/hooks/useAutoScroll.d.ts +23 -0
  234. package/lib/typescript/src/hooks/useAutoScroll.d.ts.map +1 -0
  235. package/lib/typescript/src/hooks/useClipboard.d.ts +22 -0
  236. package/lib/typescript/src/hooks/useClipboard.d.ts.map +1 -0
  237. package/lib/typescript/src/hooks/useCollapsible.d.ts +28 -0
  238. package/lib/typescript/src/hooks/useCollapsible.d.ts.map +1 -0
  239. package/lib/typescript/src/hooks/useStickToBottom.d.ts +39 -0
  240. package/lib/typescript/src/hooks/useStickToBottom.d.ts.map +1 -0
  241. package/lib/typescript/src/index.d.ts +11 -0
  242. package/lib/typescript/src/index.d.ts.map +1 -0
  243. package/lib/typescript/src/primitives/Badge.d.ts +10 -0
  244. package/lib/typescript/src/primitives/Badge.d.ts.map +1 -0
  245. package/lib/typescript/src/primitives/Button.d.ts +16 -0
  246. package/lib/typescript/src/primitives/Button.d.ts.map +1 -0
  247. package/lib/typescript/src/primitives/Card.d.ts +33 -0
  248. package/lib/typescript/src/primitives/Card.d.ts.map +1 -0
  249. package/lib/typescript/src/primitives/Collapsible.d.ts +20 -0
  250. package/lib/typescript/src/primitives/Collapsible.d.ts.map +1 -0
  251. package/lib/typescript/src/primitives/ScrollArea.d.ts +10 -0
  252. package/lib/typescript/src/primitives/ScrollArea.d.ts.map +1 -0
  253. package/lib/typescript/src/primitives/index.d.ts +11 -0
  254. package/lib/typescript/src/primitives/index.d.ts.map +1 -0
  255. package/lib/typescript/src/streaming/StreamingMarkdown.d.ts +47 -0
  256. package/lib/typescript/src/streaming/StreamingMarkdown.d.ts.map +1 -0
  257. package/lib/typescript/src/streaming/index.d.ts +3 -0
  258. package/lib/typescript/src/streaming/index.d.ts.map +1 -0
  259. package/lib/typescript/src/streaming/parser.d.ts +41 -0
  260. package/lib/typescript/src/streaming/parser.d.ts.map +1 -0
  261. package/lib/typescript/src/streaming/renderers/BlockquoteRenderer.d.ts +7 -0
  262. package/lib/typescript/src/streaming/renderers/BlockquoteRenderer.d.ts.map +1 -0
  263. package/lib/typescript/src/streaming/renderers/CodeRenderer.d.ts +7 -0
  264. package/lib/typescript/src/streaming/renderers/CodeRenderer.d.ts.map +1 -0
  265. package/lib/typescript/src/streaming/renderers/HeadingRenderer.d.ts +7 -0
  266. package/lib/typescript/src/streaming/renderers/HeadingRenderer.d.ts.map +1 -0
  267. package/lib/typescript/src/streaming/renderers/ImageRenderer.d.ts +7 -0
  268. package/lib/typescript/src/streaming/renderers/ImageRenderer.d.ts.map +1 -0
  269. package/lib/typescript/src/streaming/renderers/LinkRenderer.d.ts +7 -0
  270. package/lib/typescript/src/streaming/renderers/LinkRenderer.d.ts.map +1 -0
  271. package/lib/typescript/src/streaming/renderers/ListRenderer.d.ts +7 -0
  272. package/lib/typescript/src/streaming/renderers/ListRenderer.d.ts.map +1 -0
  273. package/lib/typescript/src/streaming/renderers/TableRenderer.d.ts +7 -0
  274. package/lib/typescript/src/streaming/renderers/TableRenderer.d.ts.map +1 -0
  275. package/lib/typescript/src/streaming/renderers/TextRenderer.d.ts +7 -0
  276. package/lib/typescript/src/streaming/renderers/TextRenderer.d.ts.map +1 -0
  277. package/lib/typescript/src/streaming/renderers/index.d.ts +19 -0
  278. package/lib/typescript/src/streaming/renderers/index.d.ts.map +1 -0
  279. package/lib/typescript/src/streaming/renderers/renderInlineChildren.d.ts +12 -0
  280. package/lib/typescript/src/streaming/renderers/renderInlineChildren.d.ts.map +1 -0
  281. package/lib/typescript/src/streaming/renderers/renderNode.d.ts +8 -0
  282. package/lib/typescript/src/streaming/renderers/renderNode.d.ts.map +1 -0
  283. package/lib/typescript/src/theme/ThemeProvider.d.ts +14 -0
  284. package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -0
  285. package/lib/typescript/src/theme/defaultTheme.d.ts +4 -0
  286. package/lib/typescript/src/theme/defaultTheme.d.ts.map +1 -0
  287. package/lib/typescript/src/theme/index.d.ts +5 -0
  288. package/lib/typescript/src/theme/index.d.ts.map +1 -0
  289. package/lib/typescript/src/theme/tokens.d.ts +66 -0
  290. package/lib/typescript/src/theme/tokens.d.ts.map +1 -0
  291. package/lib/typescript/src/voice/index.d.ts +3 -0
  292. package/lib/typescript/src/voice/index.d.ts.map +1 -0
  293. package/lib/typescript/src/voice/useSpeechRecognition.d.ts +77 -0
  294. package/lib/typescript/src/voice/useSpeechRecognition.d.ts.map +1 -0
  295. package/package.json +132 -0
  296. package/src/chatbot/AIImage.tsx +166 -0
  297. package/src/chatbot/Attachments.tsx +382 -0
  298. package/src/chatbot/ChatErrorBoundary.tsx +230 -0
  299. package/src/chatbot/ChatMessageItem.tsx +195 -0
  300. package/src/chatbot/Conversation.tsx +537 -0
  301. package/src/chatbot/ConversationScrollButton.tsx +149 -0
  302. package/src/chatbot/Message.tsx +266 -0
  303. package/src/chatbot/PromptInput.tsx +532 -0
  304. package/src/chatbot/Reasoning.tsx +198 -0
  305. package/src/chatbot/Shimmer.tsx +146 -0
  306. package/src/chatbot/Sources.tsx +263 -0
  307. package/src/chatbot/Suggestion.tsx +123 -0
  308. package/src/chatbot/Tool.tsx +340 -0
  309. package/src/chatbot/adapters/uiMessageAdapter.ts +177 -0
  310. package/src/chatbot/index.ts +97 -0
  311. package/src/chatbot/types.ts +66 -0
  312. package/src/hooks/index.ts +17 -0
  313. package/src/hooks/useAutoScroll.ts +43 -0
  314. package/src/hooks/useClipboard.ts +46 -0
  315. package/src/hooks/useCollapsible.ts +42 -0
  316. package/src/hooks/useStickToBottom.ts +82 -0
  317. package/src/index.ts +139 -0
  318. package/src/primitives/Badge.tsx +119 -0
  319. package/src/primitives/Button.tsx +213 -0
  320. package/src/primitives/Card.tsx +221 -0
  321. package/src/primitives/Collapsible.tsx +168 -0
  322. package/src/primitives/ScrollArea.tsx +53 -0
  323. package/src/primitives/index.ts +36 -0
  324. package/src/streaming/StreamingMarkdown.tsx +282 -0
  325. package/src/streaming/index.ts +2 -0
  326. package/src/streaming/parser.ts +506 -0
  327. package/src/streaming/renderers/BlockquoteRenderer.tsx +42 -0
  328. package/src/streaming/renderers/CodeRenderer.tsx +158 -0
  329. package/src/streaming/renderers/HeadingRenderer.tsx +64 -0
  330. package/src/streaming/renderers/ImageRenderer.tsx +62 -0
  331. package/src/streaming/renderers/LinkRenderer.tsx +53 -0
  332. package/src/streaming/renderers/ListRenderer.tsx +65 -0
  333. package/src/streaming/renderers/TableRenderer.tsx +103 -0
  334. package/src/streaming/renderers/TextRenderer.tsx +39 -0
  335. package/src/streaming/renderers/index.ts +26 -0
  336. package/src/streaming/renderers/renderInlineChildren.tsx +115 -0
  337. package/src/streaming/renderers/renderNode.tsx +72 -0
  338. package/src/theme/ThemeProvider.tsx +77 -0
  339. package/src/theme/defaultTheme.ts +93 -0
  340. package/src/theme/index.ts +4 -0
  341. package/src/theme/tokens.ts +69 -0
  342. package/src/types.d.ts +71 -0
  343. package/src/voice/index.ts +15 -0
  344. package/src/voice/useSpeechRecognition.ts +230 -0
@@ -0,0 +1,39 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export interface ChatMessage {
4
+ id: string;
5
+ role: 'user' | 'assistant' | 'system';
6
+ content: string;
7
+ [key: string]: any;
8
+ }
9
+ export interface MessageContextValue {
10
+ message: ChatMessage;
11
+ isStreaming?: boolean;
12
+ }
13
+ export interface MessageProps {
14
+ message: ChatMessage;
15
+ isStreaming?: boolean;
16
+ children?: ReactNode;
17
+ style?: StyleProp<ViewStyle>;
18
+ }
19
+ export interface MessageAvatarProps {
20
+ children?: ReactNode;
21
+ style?: StyleProp<ViewStyle>;
22
+ }
23
+ export interface MessageContentProps {
24
+ style?: StyleProp<ViewStyle>;
25
+ }
26
+ export interface MessageActionsProps {
27
+ children?: ReactNode;
28
+ style?: StyleProp<ViewStyle>;
29
+ }
30
+ declare function MessageRoot({ message, isStreaming, children, style }: MessageProps): import("react/jsx-runtime").JSX.Element;
31
+ declare function MessageAvatarComponent({ children, style }: MessageAvatarProps): import("react/jsx-runtime").JSX.Element;
32
+ declare function MessageContentComponent({ style }: MessageContentProps): import("react/jsx-runtime").JSX.Element;
33
+ declare function MessageActionsComponent({ children, style }: MessageActionsProps): import("react/jsx-runtime").JSX.Element;
34
+ export declare const Message: React.MemoExoticComponent<typeof MessageRoot>;
35
+ export declare const MessageAvatar: React.MemoExoticComponent<typeof MessageAvatarComponent>;
36
+ export declare const MessageContent: React.MemoExoticComponent<typeof MessageContentComponent>;
37
+ export declare const MessageActions: React.MemoExoticComponent<typeof MessageActionsComponent>;
38
+ export {};
39
+ //# sourceMappingURL=Message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../src/chatbot/Message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAStB,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAsBD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAMD,iBAAS,WAAW,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,YAAY,2CAyB3E;AAMD,iBAAS,sBAAsB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,kBAAkB,2CAsCtE;AAMD,iBAAS,uBAAuB,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CA4B9D;AAMD,iBAAS,uBAAuB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAcxE;AA4DD,eAAO,MAAM,OAAO,+CAAoB,CAAC;AACzC,eAAO,MAAM,aAAa,0DAA+B,CAAC;AAC1D,eAAO,MAAM,cAAc,2DAAgC,CAAC;AAC5D,eAAO,MAAM,cAAc,2DAAgC,CAAC"}
@@ -0,0 +1,93 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { type TextInputProps, type ViewProps } from 'react-native';
3
+ /**
4
+ * Lifecycle status of the chat the PromptInput is attached to. Drives the
5
+ * shape of the right-side action button.
6
+ *
7
+ * - `'ready'` — idle. Right action shows mic (empty) or send (has text).
8
+ * - `'submitted'` — request just sent, awaiting first token. Right action
9
+ * shows a spinner.
10
+ * - `'streaming'` — assistant is generating. Right action shows a Stop
11
+ * button (calls `onStop` when pressed).
12
+ * - `'error'` — request failed. Right action shows an error icon; tap
13
+ * re-submits.
14
+ *
15
+ * Inspired by Vercel ai-elements `PromptInputSubmit.status`.
16
+ */
17
+ export type PromptInputStatus = 'ready' | 'submitted' | 'streaming' | 'error';
18
+ /** Imperative handle exposed via ref. */
19
+ export interface PromptInputRef {
20
+ /** Focus the underlying TextInput. */
21
+ focus: () => void;
22
+ /** Blur the underlying TextInput. */
23
+ blur: () => void;
24
+ /** Clear the input value and reset the expanding-textarea height. */
25
+ clear: () => void;
26
+ /** Whether the underlying TextInput currently has focus. */
27
+ isFocused: () => boolean;
28
+ }
29
+ export interface PromptInputProps extends Omit<ViewProps, 'children'> {
30
+ /** Current input text value (controlled). */
31
+ value: string;
32
+ /** Called when the input text changes. */
33
+ onChangeText: (text: string) => void;
34
+ /**
35
+ * Called when the user submits — either by tapping the send button or
36
+ * pressing enter/return on the keyboard.
37
+ */
38
+ onSubmit: () => void;
39
+ /**
40
+ * Called when the user taps the Stop button while `status === 'streaming'`.
41
+ * If omitted, the Stop button still appears but does nothing on press.
42
+ */
43
+ onStop?: () => void;
44
+ /**
45
+ * Lifecycle status. When omitted (or `'ready'`), the right-side action
46
+ * uses the legacy mic-or-send behavior driven by `disabled`.
47
+ */
48
+ status?: PromptInputStatus;
49
+ /**
50
+ * Disables editing. Independent of `status` so callers can keep the bar
51
+ * editable while showing a loader, or vice-versa.
52
+ */
53
+ disabled?: boolean;
54
+ /** Placeholder text. Default: `"Ask me anything..."` */
55
+ placeholder?: string;
56
+ /** Minimum pill height. Default `36`. */
57
+ minHeight?: number;
58
+ /** Maximum pill height before the textarea scrolls. Default `100`. */
59
+ maxHeight?: number;
60
+ /** Safe-area bottom inset — applied to the row and the keyboard offset. */
61
+ bottomInset?: number;
62
+ /** Slot above the input row (e.g. starter suggestions). */
63
+ suggestions?: ReactNode;
64
+ /** Optional override for the default left action (Plus circle). */
65
+ leftAction?: ReactNode;
66
+ /** Pressed when the default Plus button is tapped. */
67
+ onLeftActionPress?: () => void;
68
+ /** Optional override for the default right action (Mic / Send / Stop). */
69
+ rightAction?: ReactNode;
70
+ /**
71
+ * True while a speech-recognition session is active. When set, the
72
+ * default mic button flips to an "active" look (destructive tint +
73
+ * subtle pulsing) so the recording state is obvious. Pair with
74
+ * `onMicPress` to actually start/stop recognition.
75
+ */
76
+ isListening?: boolean;
77
+ /**
78
+ * Handler for the default mic button. When omitted (or when a custom
79
+ * `rightAction` is provided) the built-in mic is a no-op placeholder.
80
+ * Typically wired to a `useSpeechRecognition` hook's `toggle()`.
81
+ */
82
+ onMicPress?: () => void;
83
+ /**
84
+ * iOS software keyboard appearance. Defaults to the current theme's mode
85
+ * (`'dark'` when the theme is dark, `'light'` otherwise). Pass `'default'`
86
+ * to fall back to the system setting, or force a specific value.
87
+ *
88
+ * Note: iOS only — Android ignores this.
89
+ */
90
+ keyboardAppearance?: TextInputProps['keyboardAppearance'];
91
+ }
92
+ export declare const PromptInput: React.ForwardRefExoticComponent<PromptInputProps & React.RefAttributes<PromptInputRef>>;
93
+ //# sourceMappingURL=PromptInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../../src/chatbot/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EASL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAUtB;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAE9E,yCAAyC;AACzC,MAAM,WAAW,cAAc;IAC7B,sCAAsC;IACtC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,qCAAqC;IACrC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,qEAAqE;IACrE,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACnE,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;OAGG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mEAAmE;IACnE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,0EAA0E;IAC1E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAC;CAC3D;AAkXD,eAAO,MAAM,WAAW,yFAAkB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export interface ReasoningProps {
4
+ content: string;
5
+ isStreaming?: boolean;
6
+ defaultOpen?: boolean;
7
+ /** Override the trigger label. Defaults to "Thinking..." / "Thought for Xs". */
8
+ title?: string;
9
+ style?: StyleProp<ViewStyle>;
10
+ }
11
+ declare function ReasoningComponent({ content, isStreaming, defaultOpen, title, style, }: ReasoningProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare const Reasoning: React.MemoExoticComponent<typeof ReasoningComponent>;
13
+ export {};
14
+ //# sourceMappingURL=Reasoning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Reasoning.d.ts","sourceRoot":"","sources":["../../../../src/chatbot/Reasoning.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAC9E,OAAO,EAIL,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAqBtB,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAuCD,iBAAS,kBAAkB,CAAC,EAC1B,OAAO,EACP,WAAmB,EACnB,WAAmB,EACnB,KAAK,EACL,KAAK,GACN,EAAE,cAAc,2CA8FhB;AAsBD,eAAO,MAAM,SAAS,sDAA2B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export interface ShimmerProps {
4
+ width?: number | string;
5
+ height?: number;
6
+ borderRadius?: number;
7
+ style?: StyleProp<ViewStyle>;
8
+ lines?: number;
9
+ }
10
+ declare function ShimmerComponent({ width: customWidth, height: customHeight, borderRadius: customBorderRadius, style, lines, }: ShimmerProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare const Shimmer: React.MemoExoticComponent<typeof ShimmerComponent>;
12
+ export {};
13
+ //# sourceMappingURL=Shimmer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.d.ts","sourceRoot":"","sources":["../../../../src/chatbot/Shimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAchF,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA8DD,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,kBAAkB,EAChC,KAAK,EACL,KAAS,GACV,EAAE,YAAY,2CAwCd;AAgBD,eAAO,MAAM,OAAO,oDAAyB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export interface Source {
4
+ title: string;
5
+ url: string;
6
+ description?: string;
7
+ favicon?: string;
8
+ }
9
+ export interface SourcesProps {
10
+ sources: Source[];
11
+ maxVisible?: number;
12
+ style?: StyleProp<ViewStyle>;
13
+ }
14
+ declare function SourcesComponent({ sources, maxVisible, style, }: SourcesProps): import("react/jsx-runtime").JSX.Element | null;
15
+ export declare const Sources: React.MemoExoticComponent<typeof SourcesComponent>;
16
+ export {};
17
+ //# sourceMappingURL=Sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sources.d.ts","sourceRoot":"","sources":["../../../../src/chatbot/Sources.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAOL,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAatB,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AA4FD,iBAAS,gBAAgB,CAAC,EACxB,OAAO,EACP,UAAU,EACV,KAAK,GACN,EAAE,YAAY,kDAoEd;AA+DD,eAAO,MAAM,OAAO,oDAAyB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export interface SuggestionItem {
4
+ label: string;
5
+ value?: string;
6
+ }
7
+ export interface SuggestionProps {
8
+ suggestions: SuggestionItem[];
9
+ onSelect: (value: string) => void;
10
+ style?: StyleProp<ViewStyle>;
11
+ }
12
+ declare function SuggestionComponent({ suggestions, onSelect, style, }: SuggestionProps): import("react/jsx-runtime").JSX.Element | null;
13
+ export declare const Suggestion: React.MemoExoticComponent<typeof SuggestionComponent>;
14
+ export {};
15
+ //# sourceMappingURL=Suggestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Suggestion.d.ts","sourceRoot":"","sources":["../../../../src/chatbot/Suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAKL,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAOtB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAgDD,iBAAS,mBAAmB,CAAC,EAC3B,WAAW,EACX,QAAQ,EACR,KAAK,GACN,EAAE,eAAe,kDAyBjB;AAoBD,eAAO,MAAM,UAAU,uDAA4B,CAAC"}
@@ -0,0 +1,30 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export type ToolStatus = 'pending' | 'running' | 'completed' | 'failed';
4
+ export interface ToolProps {
5
+ name: string;
6
+ status: ToolStatus;
7
+ args?: Record<string, any>;
8
+ result?: string;
9
+ children?: ReactNode;
10
+ style?: StyleProp<ViewStyle>;
11
+ }
12
+ declare function ToolRoot({ name, status, args, result, children, style }: ToolProps): import("react/jsx-runtime").JSX.Element;
13
+ export interface ToolHeaderProps {
14
+ style?: StyleProp<ViewStyle>;
15
+ }
16
+ declare function ToolHeaderComponent({ style }: ToolHeaderProps): import("react/jsx-runtime").JSX.Element;
17
+ export interface ToolArgsProps {
18
+ style?: StyleProp<ViewStyle>;
19
+ }
20
+ declare function ToolArgsComponent({ style }: ToolArgsProps): import("react/jsx-runtime").JSX.Element | null;
21
+ export interface ToolResultProps {
22
+ style?: StyleProp<ViewStyle>;
23
+ }
24
+ declare function ToolResultComponent({ style }: ToolResultProps): import("react/jsx-runtime").JSX.Element | null;
25
+ export declare const Tool: React.MemoExoticComponent<typeof ToolRoot>;
26
+ export declare const ToolHeader: React.MemoExoticComponent<typeof ToolHeaderComponent>;
27
+ export declare const ToolArgs: React.MemoExoticComponent<typeof ToolArgsComponent>;
28
+ export declare const ToolResult: React.MemoExoticComponent<typeof ToolResultComponent>;
29
+ export {};
30
+ //# sourceMappingURL=Tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tool.d.ts","sourceRoot":"","sources":["../../../../src/chatbot/Tool.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAmC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAIL,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAqBtB,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAExE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AA0ED,iBAAS,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,SAAS,2CA2B3E;AAMD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,iBAAS,mBAAmB,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe,2CAgDtD;AAMD,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,iBAAS,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,kDA+ClD;AAMD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,iBAAS,mBAAmB,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe,kDA6CtD;AA2BD,eAAO,MAAM,IAAI,4CAAiB,CAAC;AACnC,eAAO,MAAM,UAAU,uDAA4B,CAAC;AACpD,eAAO,MAAM,QAAQ,qDAA0B,CAAC;AAChD,eAAO,MAAM,UAAU,uDAA4B,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { UIMessage } from 'ai';
2
+ import type { ChatMessageData } from '../types';
3
+ /**
4
+ * Convert an `@ai-sdk/react` `UIMessage` into the canonical
5
+ * {@link ChatMessageData} shape consumed by `<ChatMessageItem>`.
6
+ *
7
+ * Behavior:
8
+ * - All `text` parts are concatenated in document order.
9
+ * - The first **non-empty** `reasoning` part wins (most messages only
10
+ * have one); `isStreaming` follows the part's `state` field. Empty
11
+ * reasoning shells (no deltas ever emitted) are filtered out so the UI
12
+ * doesn't render a "Thinking..." ghost with nothing inside.
13
+ * - The first tool part wins (we only render one tool block per message
14
+ * today — multi-tool messages can be added later).
15
+ * - All `source-url` parts are collected into the sources array.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const data = uiMessageToChatMessageData(message);
20
+ * return <ChatMessageItem item={data} />;
21
+ * ```
22
+ */
23
+ export declare function uiMessageToChatMessageData(message: UIMessage): ChatMessageData;
24
+ //# sourceMappingURL=uiMessageAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uiMessageAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/chatbot/adapters/uiMessageAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAKV,MAAM,IAAI,CAAC;AACZ,OAAO,KAAK,EAAE,eAAe,EAAY,MAAM,UAAU,CAAC;AA8E1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,SAAS,GACjB,eAAe,CAqEjB"}
@@ -0,0 +1,29 @@
1
+ export { Conversation } from './Conversation';
2
+ export type { ConversationProps, ConversationRef, ConversationMessage, ConversationMessageOrder, ConversationScrollBehavior, } from './Conversation';
3
+ export { ConversationScrollButton } from './ConversationScrollButton';
4
+ export type { ConversationScrollButtonProps } from './ConversationScrollButton';
5
+ export { ChatMessageItem } from './ChatMessageItem';
6
+ export type { ChatMessageItemProps } from './ChatMessageItem';
7
+ export { ChatErrorBoundary } from './ChatErrorBoundary';
8
+ export type { ChatErrorBoundaryProps } from './ChatErrorBoundary';
9
+ export type { ChatMessageData, ChatReasoning, ChatTool, } from './types';
10
+ export { uiMessageToChatMessageData } from './adapters/uiMessageAdapter';
11
+ export { Message, MessageAvatar, MessageContent, MessageActions, } from './Message';
12
+ export type { ChatMessage, MessageContextValue, MessageProps, MessageAvatarProps, MessageContentProps, MessageActionsProps, } from './Message';
13
+ export { PromptInput } from './PromptInput';
14
+ export type { PromptInputProps, PromptInputRef, PromptInputStatus, } from './PromptInput';
15
+ export { Reasoning } from './Reasoning';
16
+ export type { ReasoningProps } from './Reasoning';
17
+ export { Suggestion } from './Suggestion';
18
+ export type { SuggestionProps, SuggestionItem } from './Suggestion';
19
+ export { Shimmer } from './Shimmer';
20
+ export type { ShimmerProps } from './Shimmer';
21
+ export { Tool, ToolHeader, ToolArgs, ToolResult } from './Tool';
22
+ export type { ToolProps, ToolStatus, ToolHeaderProps, ToolArgsProps, ToolResultProps, } from './Tool';
23
+ export { Sources } from './Sources';
24
+ export type { Source, SourcesProps } from './Sources';
25
+ export { Attachments } from './Attachments';
26
+ export type { Attachment, AttachmentVariant, AttachmentsProps, } from './Attachments';
27
+ export { AIImage } from './AIImage';
28
+ export type { AIImageProps, AIImageSource } from './AIImage';
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/chatbot/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAGhF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,YAAY,EACV,eAAe,EACf,aAAa,EACb,QAAQ,GACT,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAGzE,OAAO,EACL,OAAO,EACP,aAAa,EACb,cAAc,EACd,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAChE,YAAY,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { ChatMessage } from './Message';
2
+ import type { Source } from './Sources';
3
+ import type { ToolStatus } from './Tool';
4
+ /** Reasoning ("thinking") content attached to an assistant message. */
5
+ export interface ChatReasoning {
6
+ /** The reasoning text (rendered as markdown). */
7
+ content: string;
8
+ /** True while the reasoning is still streaming. */
9
+ isStreaming?: boolean;
10
+ }
11
+ /** A tool / function invocation attached to an assistant message. */
12
+ export interface ChatTool {
13
+ /** Tool / function name (e.g. `"search_docs"`). */
14
+ name: string;
15
+ /** Lifecycle state. */
16
+ status: ToolStatus;
17
+ /** Arguments the tool was called with. */
18
+ args?: Record<string, unknown>;
19
+ /** Tool output, once the call resolves. */
20
+ result?: string;
21
+ }
22
+ /**
23
+ * The canonical message shape consumed by `ChatMessageItem`. Map your
24
+ * own message type to this shape inside your `renderMessage` callback.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const data: ChatMessageData = {
29
+ * id: msg.id,
30
+ * role: msg.role,
31
+ * content: msg.content,
32
+ * reasoning: msg.reasoning && {
33
+ * content: msg.reasoning,
34
+ * isStreaming: msg.reasoningStreaming,
35
+ * },
36
+ * tool: msg.tool,
37
+ * sources: msg.sources,
38
+ * };
39
+ * ```
40
+ */
41
+ export interface ChatMessageData {
42
+ id: string;
43
+ role: ChatMessage['role'];
44
+ content: string;
45
+ reasoning?: ChatReasoning;
46
+ tool?: ChatTool;
47
+ sources?: Source[];
48
+ }
49
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/chatbot/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAiBzC,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,qEAAqE;AACrE,MAAM,WAAW,QAAQ;IACvB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB"}
@@ -0,0 +1,9 @@
1
+ export { useAutoScroll } from './useAutoScroll';
2
+ export type { UseAutoScrollOptions, UseAutoScrollReturn } from './useAutoScroll';
3
+ export { useClipboard } from './useClipboard';
4
+ export type { UseClipboardReturn } from './useClipboard';
5
+ export { useStickToBottom } from './useStickToBottom';
6
+ export type { UseStickToBottomOptions, UseStickToBottomReturn, } from './useStickToBottom';
7
+ export { useCollapsible } from './useCollapsible';
8
+ export type { UseCollapsibleOptions, UseCollapsibleReturn, } from './useCollapsible';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEjF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { FlatList } from 'react-native';
2
+ export interface UseAutoScrollOptions {
3
+ /** When true, auto-scrolls to bottom on content size changes. Defaults to `true`. */
4
+ enabled?: boolean;
5
+ }
6
+ export interface UseAutoScrollReturn<T = any> {
7
+ /** Ref to attach to your FlatList. */
8
+ ref: React.RefObject<FlatList<T> | null>;
9
+ /** Imperatively scroll to the end of the list. */
10
+ scrollToEnd: () => void;
11
+ /** Pass as the `onContentSizeChange` prop on your FlatList. */
12
+ onContentSizeChange: () => void;
13
+ }
14
+ /**
15
+ * Provides a FlatList ref and helpers that keep the list pinned to the bottom.
16
+ *
17
+ * ```tsx
18
+ * const { ref, onContentSizeChange } = useAutoScroll();
19
+ * <FlatList ref={ref} onContentSizeChange={onContentSizeChange} ... />
20
+ * ```
21
+ */
22
+ export declare function useAutoScroll<T = any>(options?: UseAutoScrollOptions): UseAutoScrollReturn<T>;
23
+ //# sourceMappingURL=useAutoScroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutoScroll.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAutoScroll.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,WAAW,oBAAoB;IACnC,qFAAqF;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,GAAG;IAC1C,sCAAsC;IACtC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACzC,kDAAkD;IAClD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,+DAA+D;IAC/D,mBAAmB,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EACnC,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,CAAC,CAAC,CAAC,CAexB"}
@@ -0,0 +1,22 @@
1
+ export interface UseClipboardReturn {
2
+ /** Copy text to the clipboard. Resolves once the text has been written. */
3
+ copy: (text: string) => Promise<void>;
4
+ /** `true` for 2 seconds after a successful `copy` call, then resets. */
5
+ copied: boolean;
6
+ }
7
+ /**
8
+ * Thin wrapper around the system clipboard with a transient `copied` flag.
9
+ *
10
+ * Uses the built-in `react-native` Clipboard API. The implementation is
11
+ * isolated so it can be swapped for `@react-native-clipboard/clipboard`
12
+ * without changing the public interface.
13
+ *
14
+ * ```tsx
15
+ * const { copy, copied } = useClipboard();
16
+ * <Pressable onPress={() => copy(code)}>
17
+ * <Text>{copied ? 'Copied!' : 'Copy'}</Text>
18
+ * </Pressable>
19
+ * ```
20
+ */
21
+ export declare function useClipboard(): UseClipboardReturn;
22
+ //# sourceMappingURL=useClipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useClipboard.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,2EAA2E;IAC3E,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,wEAAwE;IACxE,MAAM,EAAE,OAAO,CAAC;CACjB;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,IAAI,kBAAkB,CAmBjD"}
@@ -0,0 +1,28 @@
1
+ export interface UseCollapsibleOptions {
2
+ /** Initial open state. Defaults to `false`. */
3
+ defaultOpen?: boolean;
4
+ }
5
+ export interface UseCollapsibleReturn {
6
+ /** Whether the collapsible section is currently open. */
7
+ isOpen: boolean;
8
+ /** Toggle between open and closed. */
9
+ toggle: () => void;
10
+ /** Set to open. */
11
+ open: () => void;
12
+ /** Set to closed. */
13
+ close: () => void;
14
+ }
15
+ /**
16
+ * Minimal state hook for a collapsible section.
17
+ *
18
+ * ```tsx
19
+ * const { isOpen, toggle } = useCollapsible({ defaultOpen: true });
20
+ *
21
+ * <Pressable onPress={toggle}>
22
+ * <Text>{isOpen ? 'Hide' : 'Show'}</Text>
23
+ * </Pressable>
24
+ * {isOpen && <View>...</View>}
25
+ * ```
26
+ */
27
+ export declare function useCollapsible(options?: UseCollapsibleOptions): UseCollapsibleReturn;
28
+ //# sourceMappingURL=useCollapsible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCollapsible.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCollapsible.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IACpC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,MAAM,EAAE,OAAO,CAAC;IAChB,sCAAsC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,mBAAmB;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,qBAAqB;IACrB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CAStB"}
@@ -0,0 +1,39 @@
1
+ import type { FlatList, NativeScrollEvent, NativeSyntheticEvent } from 'react-native';
2
+ export interface UseStickToBottomOptions {
3
+ /** Distance (in px) from the bottom that still counts as "at the bottom". Defaults to `50`. */
4
+ threshold?: number;
5
+ }
6
+ export interface UseStickToBottomReturn<T = any> {
7
+ /** Whether the list is currently scrolled to (or near) the bottom. */
8
+ isAtBottom: boolean;
9
+ /** Imperatively scroll to the bottom. */
10
+ scrollToBottom: () => void;
11
+ /** Pass as the `onScroll` prop on your FlatList / ScrollView. */
12
+ onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
13
+ /** Pass as the `onContentSizeChange` prop to auto-scroll when already at bottom. */
14
+ onContentSizeChange: () => void;
15
+ /** Ref to attach to your FlatList. */
16
+ ref: React.RefObject<FlatList<T> | null>;
17
+ }
18
+ /**
19
+ * Chat-style "stick to bottom" behaviour for a FlatList.
20
+ *
21
+ * When the user is scrolled to (or near) the bottom and new content arrives,
22
+ * the list automatically scrolls down. If the user scrolls up to read history,
23
+ * auto-scrolling pauses until they return to the bottom.
24
+ *
25
+ * ```tsx
26
+ * const { ref, onScroll, onContentSizeChange, isAtBottom, scrollToBottom } =
27
+ * useStickToBottom();
28
+ *
29
+ * <FlatList
30
+ * ref={ref}
31
+ * onScroll={onScroll}
32
+ * onContentSizeChange={onContentSizeChange}
33
+ * scrollEventThrottle={16}
34
+ * ...
35
+ * />
36
+ * ```
37
+ */
38
+ export declare function useStickToBottom<T = any>(options?: UseStickToBottomOptions): UseStickToBottomReturn<T>;
39
+ //# sourceMappingURL=useStickToBottom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStickToBottom.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useStickToBottom.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,uBAAuB;IACtC,+FAA+F;IAC/F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,GAAG;IAC7C,sEAAsE;IACtE,UAAU,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,iEAAiE;IACjE,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACnE,oFAAoF;IACpF,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,sCAAsC;IACtC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,GAAG,EACtC,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CAAC,CAAC,CAAC,CAkC3B"}
@@ -0,0 +1,11 @@
1
+ export { AIElementsProvider, useAIElementsTheme, lightTheme, darkTheme, } from './theme';
2
+ export type { AIElementsProviderProps, ColorSchemeMode, AIElementsTheme, ColorTokens, SpacingTokens, RadiusTokens, TypographyTokens, } from './theme';
3
+ export { Button, Badge, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Collapsible, CollapsibleTrigger, CollapsibleContent, ScrollArea, } from './primitives';
4
+ export type { ButtonProps, ButtonVariant, ButtonSize, BadgeProps, BadgeVariant, CardProps, CardHeaderProps, CardTitleProps, CardDescriptionProps, CardContentProps, CardFooterProps, CollapsibleProps, CollapsibleTriggerProps, CollapsibleContentProps, ScrollAreaProps, } from './primitives';
5
+ export { StreamingMarkdown } from './streaming';
6
+ export type { StreamingMarkdownProps } from './streaming';
7
+ export { useAutoScroll, useClipboard, useStickToBottom, useCollapsible, } from './hooks';
8
+ export type { UseAutoScrollOptions, UseAutoScrollReturn, UseClipboardReturn, UseStickToBottomOptions, UseStickToBottomReturn, UseCollapsibleOptions, UseCollapsibleReturn, } from './hooks';
9
+ export { Conversation, ConversationScrollButton, ChatMessageItem, ChatErrorBoundary, Message, MessageAvatar, MessageContent, MessageActions, PromptInput, Reasoning, Suggestion, Shimmer, Tool, ToolHeader, ToolArgs, ToolResult, Sources, Attachments, AIImage, uiMessageToChatMessageData, } from './chatbot';
10
+ export type { ConversationProps, ConversationRef, ConversationMessage, ConversationMessageOrder, ConversationScrollBehavior, ConversationScrollButtonProps, ChatMessageItemProps, ChatErrorBoundaryProps, ChatMessageData, ChatReasoning, ChatTool, ChatMessage, MessageProps, MessageAvatarProps, MessageContentProps, MessageActionsProps, PromptInputProps, PromptInputRef, PromptInputStatus, ReasoningProps, SuggestionProps, ShimmerProps, ToolProps, ToolStatus, Source, SourcesProps, Attachment, AttachmentsProps, AIImageProps, } from './chatbot';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,SAAS,GACV,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,EACZ,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,MAAM,EACN,KAAK,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAAS,EACT,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,EACL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,SAAS,EACT,UAAU,EACV,OAAO,EACP,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,EACX,OAAO,EACP,0BAA0B,GAC3B,MAAM,WAAW,CAAC;AAGnB,YAAY,EAEV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAE1B,6BAA6B,EAE7B,oBAAoB,EAEpB,sBAAsB,EAEtB,eAAe,EACf,aAAa,EACb,QAAQ,EAER,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EAEnB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EAEjB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,SAAS,EACT,UAAU,EACV,MAAM,EACN,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,WAAW,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export type BadgeVariant = 'default' | 'secondary' | 'outline' | 'destructive' | 'success' | 'warning';
4
+ export interface BadgeProps {
5
+ variant?: BadgeVariant;
6
+ children?: ReactNode;
7
+ style?: StyleProp<ViewStyle>;
8
+ }
9
+ export declare function Badge({ variant, children, style }: BadgeProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=Badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Badge.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAItB,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,WAAW,GACX,SAAS,GACT,aAAa,GACb,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AA8CD,wBAAgB,KAAK,CAAC,EAAE,OAAmB,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,UAAU,2CAkCzE"}
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type PressableProps, type StyleProp, type ViewStyle } from 'react-native';
3
+ export type ButtonVariant = 'default' | 'secondary' | 'outline' | 'ghost' | 'destructive';
4
+ export type ButtonSize = 'sm' | 'md' | 'lg';
5
+ export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'> {
6
+ variant?: ButtonVariant;
7
+ size?: ButtonSize;
8
+ disabled?: boolean;
9
+ onPress?: PressableProps['onPress'];
10
+ children?: ReactNode;
11
+ style?: StyleProp<ViewStyle>;
12
+ leftIcon?: ReactNode;
13
+ rightIcon?: ReactNode;
14
+ }
15
+ export declare function Button({ variant, size, disabled, onPress, children, style, leftIcon, rightIcon, ...pressableProps }: ButtonProps): import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAe,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAItB,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,CAAC;AAElB,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,UAAU,CAAC;IAClD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAiGD,wBAAgB,MAAM,CAAC,EACrB,OAAmB,EACnB,IAAW,EACX,QAAgB,EAChB,OAAO,EACP,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,cAAc,EAClB,EAAE,WAAW,2CA+Cb"}
@@ -0,0 +1,33 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
3
+ export interface CardProps {
4
+ children?: ReactNode;
5
+ style?: StyleProp<ViewStyle>;
6
+ }
7
+ export interface CardHeaderProps {
8
+ children?: ReactNode;
9
+ style?: StyleProp<ViewStyle>;
10
+ }
11
+ export interface CardTitleProps {
12
+ children?: ReactNode;
13
+ style?: StyleProp<TextStyle>;
14
+ }
15
+ export interface CardDescriptionProps {
16
+ children?: ReactNode;
17
+ style?: StyleProp<TextStyle>;
18
+ }
19
+ export interface CardContentProps {
20
+ children?: ReactNode;
21
+ style?: StyleProp<ViewStyle>;
22
+ }
23
+ export interface CardFooterProps {
24
+ children?: ReactNode;
25
+ style?: StyleProp<ViewStyle>;
26
+ }
27
+ export declare function Card({ children, style }: CardProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function CardHeader({ children, style }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function CardTitle({ children, style }: CardTitleProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function CardDescription({ children, style }: CardDescriptionProps): import("react/jsx-runtime").JSX.Element;
31
+ export declare function CardContent({ children, style }: CardContentProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function CardFooter({ children, style }: CardFooterProps): import("react/jsx-runtime").JSX.Element;
33
+ //# sourceMappingURL=Card.d.ts.map