@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,116 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Shimmer = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
+ var _theme = require("../theme");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ // ---------------------------------------------------------------------------
14
+ // Types
15
+ // ---------------------------------------------------------------------------
16
+
17
+ // ---------------------------------------------------------------------------
18
+ // Single shimmer bar
19
+ // ---------------------------------------------------------------------------
20
+
21
+ const LINE_WIDTHS = ['100%', '92%', '76%', '85%', '60%'];
22
+ const DEFAULT_HEIGHT = 14;
23
+ const ANIMATION_DURATION = 1200;
24
+ function ShimmerBar({
25
+ width,
26
+ height,
27
+ borderRadius,
28
+ backgroundColor,
29
+ delay
30
+ }) {
31
+ const opacity = (0, _reactNativeReanimated.useSharedValue)(0.3);
32
+ (0, _react.useEffect)(() => {
33
+ const timer = setTimeout(() => {
34
+ opacity.value = (0, _reactNativeReanimated.withRepeat)((0, _reactNativeReanimated.withTiming)(1, {
35
+ duration: ANIMATION_DURATION,
36
+ easing: _reactNativeReanimated.Easing.inOut(_reactNativeReanimated.Easing.ease)
37
+ }), -1, true);
38
+ }, delay);
39
+ return () => clearTimeout(timer);
40
+ }, [opacity, delay]);
41
+ const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
42
+ opacity: opacity.value
43
+ }));
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
45
+ style: [{
46
+ width: width,
47
+ height,
48
+ borderRadius,
49
+ backgroundColor
50
+ }, animatedStyle]
51
+ });
52
+ }
53
+
54
+ // ---------------------------------------------------------------------------
55
+ // Component
56
+ // ---------------------------------------------------------------------------
57
+
58
+ function ShimmerComponent({
59
+ width: customWidth,
60
+ height: customHeight,
61
+ borderRadius: customBorderRadius,
62
+ style,
63
+ lines = 1
64
+ }) {
65
+ const theme = (0, _theme.useAIElementsTheme)();
66
+ const defaultBorderRadius = theme.radius.sm;
67
+ const barHeight = customHeight ?? DEFAULT_HEIGHT;
68
+ const barBorderRadius = customBorderRadius ?? defaultBorderRadius;
69
+ const bgColor = theme.colors.muted;
70
+ if (lines <= 1) {
71
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
72
+ style: style,
73
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ShimmerBar, {
74
+ width: customWidth ?? '100%',
75
+ height: barHeight,
76
+ borderRadius: barBorderRadius,
77
+ backgroundColor: bgColor,
78
+ delay: 0
79
+ })
80
+ });
81
+ }
82
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
83
+ style: [styles.multiline, {
84
+ gap: theme.spacing.sm
85
+ }, style],
86
+ children: Array.from({
87
+ length: lines
88
+ }).map((_, index) => {
89
+ const lineWidth = customWidth ?? LINE_WIDTHS[index % LINE_WIDTHS.length];
90
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ShimmerBar, {
91
+ width: lineWidth,
92
+ height: barHeight,
93
+ borderRadius: barBorderRadius,
94
+ backgroundColor: bgColor,
95
+ delay: index * 150
96
+ }, index);
97
+ })
98
+ });
99
+ }
100
+
101
+ // ---------------------------------------------------------------------------
102
+ // Styles
103
+ // ---------------------------------------------------------------------------
104
+
105
+ const styles = _reactNative.StyleSheet.create({
106
+ multiline: {
107
+ flexDirection: 'column'
108
+ }
109
+ });
110
+
111
+ // ---------------------------------------------------------------------------
112
+ // Export
113
+ // ---------------------------------------------------------------------------
114
+
115
+ const Shimmer = exports.Shimmer = /*#__PURE__*/(0, _react.memo)(ShimmerComponent);
116
+ //# sourceMappingURL=Shimmer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_theme","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","LINE_WIDTHS","DEFAULT_HEIGHT","ANIMATION_DURATION","ShimmerBar","width","height","borderRadius","backgroundColor","delay","opacity","useSharedValue","useEffect","timer","setTimeout","value","withRepeat","withTiming","duration","easing","Easing","inOut","ease","clearTimeout","animatedStyle","useAnimatedStyle","jsx","View","style","ShimmerComponent","customWidth","customHeight","customBorderRadius","lines","theme","useAIElementsTheme","defaultBorderRadius","radius","sm","barHeight","barBorderRadius","bgColor","colors","muted","children","styles","multiline","gap","spacing","Array","from","length","map","_","index","lineWidth","StyleSheet","create","flexDirection","Shimmer","exports","memo"],"sourceRoot":"../../../src","sources":["chatbot/Shimmer.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AAA8C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,C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C,CAAC,EAAEC,KAAK,KAAK;MAC/C,MAAMC,SAAS,GACbzB,WAAW,IAAI7B,WAAW,CAACqD,KAAK,GAAGrD,WAAW,CAACkD,MAAM,CAAC;MAExD,oBACE,IAAAtE,WAAA,CAAA6C,GAAA,EAACtB,UAAU;QAETC,KAAK,EAAEkD,SAAU;QACjBjD,MAAM,EAAEiC,SAAU;QAClBhC,YAAY,EAAEiC,eAAgB;QAC9BhC,eAAe,EAAEiC,OAAQ;QACzBhC,KAAK,EAAE6C,KAAK,GAAG;MAAI,GALdA,KAMN,CAAC;IAEN,CAAC;EAAC,CACE,CAAC;AAEX;;AAEA;AACA;AACA;;AAEA,MAAMT,MAAM,GAAGW,uBAAU,CAACC,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;;AAEF;AACA;AACA;;AAEO,MAAMC,OAAO,GAAAC,OAAA,CAAAD,OAAA,gBAAG,IAAAE,WAAI,EAAChC,gBAAgB,CAAC","ignoreList":[]}
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Sources = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _lucideReactNative = require("lucide-react-native");
10
+ var _theme = require("../theme");
11
+ var _primitives = require("../primitives");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ // ---------------------------------------------------------------------------
15
+ // Types
16
+ // ---------------------------------------------------------------------------
17
+
18
+ // ---------------------------------------------------------------------------
19
+ // Single source row
20
+ // ---------------------------------------------------------------------------
21
+
22
+ function SourceRow({
23
+ source
24
+ }) {
25
+ const theme = (0, _theme.useAIElementsTheme)();
26
+ const handlePress = (0, _react.useCallback)(() => {
27
+ _reactNative.Linking.openURL(source.url).catch(() => {
28
+ // silently ignore if URL cannot be opened
29
+ });
30
+ }, [source.url]);
31
+ const titleStyle = {
32
+ color: theme.colors.foreground,
33
+ fontSize: theme.typography.fontSize.sm,
34
+ fontWeight: theme.typography.fontWeight.medium,
35
+ fontFamily: theme.typography.fontFamily
36
+ };
37
+ const urlStyle = {
38
+ color: theme.colors.mutedForeground,
39
+ fontSize: theme.typography.fontSize.xs,
40
+ fontFamily: theme.typography.fontFamily
41
+ };
42
+ const hostname = getHostname(source.url);
43
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
44
+ onPress: handlePress,
45
+ style: ({
46
+ pressed
47
+ }) => [styles.sourceRow, {
48
+ backgroundColor: pressed ? theme.colors.muted : 'transparent',
49
+ borderRadius: theme.radius.md,
50
+ padding: theme.spacing.md,
51
+ gap: theme.spacing.md
52
+ }],
53
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
54
+ style: styles.faviconContainer,
55
+ children: source.favicon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
56
+ source: {
57
+ uri: source.favicon
58
+ },
59
+ style: [styles.favicon, {
60
+ borderRadius: theme.radius.sm
61
+ }]
62
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
63
+ style: [styles.faviconPlaceholder, {
64
+ backgroundColor: theme.colors.muted,
65
+ borderRadius: theme.radius.sm
66
+ }],
67
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Globe, {
68
+ size: 14,
69
+ color: theme.colors.mutedForeground
70
+ })
71
+ })
72
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
73
+ style: styles.sourceInfo,
74
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
75
+ style: titleStyle,
76
+ numberOfLines: 1,
77
+ children: source.title
78
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
79
+ style: urlStyle,
80
+ numberOfLines: 1,
81
+ children: hostname
82
+ })]
83
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.ExternalLink, {
84
+ size: 14,
85
+ color: theme.colors.mutedForeground
86
+ })]
87
+ });
88
+ }
89
+
90
+ // ---------------------------------------------------------------------------
91
+ // Component
92
+ // ---------------------------------------------------------------------------
93
+
94
+ function SourcesComponent({
95
+ sources,
96
+ maxVisible,
97
+ style
98
+ }) {
99
+ const theme = (0, _theme.useAIElementsTheme)();
100
+ if (sources.length === 0) {
101
+ return null;
102
+ }
103
+ const visibleSources = maxVisible ? sources.slice(0, maxVisible) : sources;
104
+ const triggerTextStyle = {
105
+ color: theme.colors.mutedForeground,
106
+ fontSize: theme.typography.fontSize.sm,
107
+ fontWeight: theme.typography.fontWeight.medium,
108
+ fontFamily: theme.typography.fontFamily
109
+ };
110
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.Collapsible, {
111
+ style: style,
112
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.CollapsibleTrigger, {
113
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
114
+ style: [styles.trigger, {
115
+ backgroundColor: theme.colors.muted,
116
+ borderRadius: theme.radius.md,
117
+ paddingHorizontal: theme.spacing.md,
118
+ paddingVertical: theme.spacing.sm,
119
+ gap: theme.spacing.sm
120
+ }],
121
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Globe, {
122
+ size: 16,
123
+ color: theme.colors.mutedForeground
124
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
125
+ style: triggerTextStyle,
126
+ children: [sources.length, " ", sources.length === 1 ? 'source' : 'sources']
127
+ })]
128
+ })
129
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.CollapsibleContent, {
130
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
131
+ style: [styles.list, {
132
+ marginTop: theme.spacing.xs,
133
+ borderColor: theme.colors.border,
134
+ borderRadius: theme.radius.md
135
+ }],
136
+ children: visibleSources.map((source, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
137
+ children: [index > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
138
+ style: [styles.divider, {
139
+ backgroundColor: theme.colors.border
140
+ }]
141
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(SourceRow, {
142
+ source: source
143
+ })]
144
+ }, `${source.url}-${index}`))
145
+ })
146
+ })]
147
+ });
148
+ }
149
+
150
+ // ---------------------------------------------------------------------------
151
+ // Helpers
152
+ // ---------------------------------------------------------------------------
153
+
154
+ /**
155
+ * Extract a hostname from a URL string without depending on the DOM `URL`
156
+ * constructor (whose type isn't available in the package's RN tsconfig).
157
+ * Handles protocol-less URLs, basic auth, and `:port` suffixes; strips a
158
+ * leading `www.` for display.
159
+ */
160
+ function getHostname(url) {
161
+ const match = url.match(/^(?:[a-z][a-z0-9+.-]*:\/\/)?(?:[^@/]*@)?([^:/?#]+)/i);
162
+ return (match?.[1] ?? url).replace(/^www\./, '');
163
+ }
164
+
165
+ // ---------------------------------------------------------------------------
166
+ // Styles
167
+ // ---------------------------------------------------------------------------
168
+
169
+ const styles = _reactNative.StyleSheet.create({
170
+ trigger: {
171
+ flexDirection: 'row',
172
+ alignItems: 'center',
173
+ alignSelf: 'flex-start'
174
+ },
175
+ list: {
176
+ borderWidth: _reactNative.StyleSheet.hairlineWidth,
177
+ overflow: 'hidden'
178
+ },
179
+ sourceRow: {
180
+ flexDirection: 'row',
181
+ alignItems: 'center'
182
+ },
183
+ faviconContainer: {
184
+ width: 24,
185
+ height: 24
186
+ },
187
+ favicon: {
188
+ width: 24,
189
+ height: 24
190
+ },
191
+ faviconPlaceholder: {
192
+ width: 24,
193
+ height: 24,
194
+ alignItems: 'center',
195
+ justifyContent: 'center'
196
+ },
197
+ sourceInfo: {
198
+ flex: 1,
199
+ gap: 2
200
+ },
201
+ divider: {
202
+ height: _reactNative.StyleSheet.hairlineWidth,
203
+ marginHorizontal: 12
204
+ }
205
+ });
206
+
207
+ // ---------------------------------------------------------------------------
208
+ // Export
209
+ // ---------------------------------------------------------------------------
210
+
211
+ const Sources = exports.Sources = /*#__PURE__*/(0, _react.memo)(SourcesComponent);
212
+ //# sourceMappingURL=Sources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_lucideReactNative","_theme","_primitives","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SourceRow","source","theme","useAIElementsTheme","handlePress","useCallback","Linking","openURL","url","catch","titleStyle","color","colors","foreground","fontSize","typography","sm","fontWeight","medium","fontFamily","urlStyle","mutedForeground","xs","hostname","getHostname","jsxs","Pressable","onPress","style","pressed","styles","sourceRow","backgroundColor","muted","borderRadius","radius","md","padding","spacing","gap","children","jsx","View","faviconContainer","favicon","Image","uri","faviconPlaceholder","Globe","size","sourceInfo","Text","numberOfLines","title","ExternalLink","SourcesComponent","sources","maxVisible","length","visibleSources","slice","triggerTextStyle","Collapsible","CollapsibleTrigger","trigger","paddingHorizontal","paddingVertical","CollapsibleContent","list","marginTop","borderColor","border","map","index","divider","match","replace","StyleSheet","create","flexDirection","alignItems","alignSelf","borderWidth","hairlineWidth","overflow","width","height","justifyContent","flex","marginHorizontal","Sources","exports","memo"],"sourceRoot":"../../../src","sources":["chatbot/Sources.tsx"],"mappings":";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;IACPjD,GAAG,EAAE;EACP,CAAC;EACDmC,OAAO,EAAE;IACPY,MAAM,EAAET,uBAAU,CAACM,aAAa;IAChCM,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC;;AAEF;AACA;AACA;;AAEO,MAAMC,OAAO,GAAAC,OAAA,CAAAD,OAAA,gBAAG,IAAAE,WAAI,EAACrC,gBAAgB,CAAC","ignoreList":[]}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Suggestion = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _theme = require("../theme");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ // ---------------------------------------------------------------------------
13
+ // Types
14
+ // ---------------------------------------------------------------------------
15
+
16
+ // ---------------------------------------------------------------------------
17
+ // Chip
18
+ // ---------------------------------------------------------------------------
19
+
20
+ function Chip({
21
+ item,
22
+ onPress
23
+ }) {
24
+ const theme = (0, _theme.useAIElementsTheme)();
25
+ const handlePress = (0, _react.useCallback)(() => {
26
+ onPress(item.value ?? item.label);
27
+ }, [item, onPress]);
28
+ const textStyle = {
29
+ color: theme.colors.foreground,
30
+ fontSize: theme.typography.fontSize.sm,
31
+ fontFamily: theme.typography.fontFamily,
32
+ fontWeight: theme.typography.fontWeight.medium
33
+ };
34
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
35
+ onPress: handlePress,
36
+ style: ({
37
+ pressed
38
+ }) => [styles.chip, {
39
+ borderColor: theme.colors.border,
40
+ borderRadius: theme.radius.full,
41
+ paddingHorizontal: theme.spacing.lg,
42
+ paddingVertical: theme.spacing.sm,
43
+ backgroundColor: pressed ? theme.colors.muted : theme.colors.background
44
+ }],
45
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
46
+ style: textStyle,
47
+ children: item.label
48
+ })
49
+ });
50
+ }
51
+
52
+ // ---------------------------------------------------------------------------
53
+ // Component
54
+ // ---------------------------------------------------------------------------
55
+
56
+ function SuggestionComponent({
57
+ suggestions,
58
+ onSelect,
59
+ style
60
+ }) {
61
+ const theme = (0, _theme.useAIElementsTheme)();
62
+ if (suggestions.length === 0) {
63
+ return null;
64
+ }
65
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
66
+ horizontal: true,
67
+ showsHorizontalScrollIndicator: false,
68
+ contentContainerStyle: [styles.container, {
69
+ paddingHorizontal: theme.spacing.lg,
70
+ gap: theme.spacing.sm
71
+ }],
72
+ style: style,
73
+ children: suggestions.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Chip, {
74
+ item: item,
75
+ onPress: onSelect
76
+ }, `${item.label}-${index}`))
77
+ });
78
+ }
79
+
80
+ // ---------------------------------------------------------------------------
81
+ // Styles
82
+ // ---------------------------------------------------------------------------
83
+
84
+ const styles = _reactNative.StyleSheet.create({
85
+ container: {
86
+ flexDirection: 'row',
87
+ alignItems: 'center'
88
+ },
89
+ chip: {
90
+ borderWidth: 1
91
+ }
92
+ });
93
+
94
+ // ---------------------------------------------------------------------------
95
+ // Export
96
+ // ---------------------------------------------------------------------------
97
+
98
+ const Suggestion = exports.Suggestion = /*#__PURE__*/(0, _react.memo)(SuggestionComponent);
99
+ //# sourceMappingURL=Suggestion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_theme","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Chip","item","onPress","theme","useAIElementsTheme","handlePress","useCallback","value","label","textStyle","color","colors","foreground","fontSize","typography","sm","fontFamily","fontWeight","medium","jsx","Pressable","style","pressed","styles","chip","borderColor","border","borderRadius","radius","full","paddingHorizontal","spacing","lg","paddingVertical","backgroundColor","muted","background","children","Text","SuggestionComponent","suggestions","onSelect","length","ScrollView","horizontal","showsHorizontalScrollIndicator","contentContainerStyle","container","gap","map","index","StyleSheet","create","flexDirection","alignItems","borderWidth","Suggestion","exports","memo"],"sourceRoot":"../../../src","sources":["chatbot/Suggestion.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,MAAA,GAAAF,OAAA;AAA8C,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa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