stream-chat-react-native-core 9.9.4 → 9.10.0-beta.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 (714) hide show
  1. package/ai-components/package.json +6 -0
  2. package/lib/commonjs/ai-components/AITypingIndicatorView.js +49 -0
  3. package/lib/commonjs/ai-components/AITypingIndicatorView.js.map +1 -0
  4. package/lib/commonjs/ai-components/README.md +279 -0
  5. package/lib/commonjs/ai-components/StreamingMessageView.js +75 -0
  6. package/lib/commonjs/ai-components/StreamingMessageView.js.map +1 -0
  7. package/lib/commonjs/ai-components/charts/Chart.js +25 -0
  8. package/lib/commonjs/ai-components/charts/Chart.js.map +1 -0
  9. package/lib/commonjs/ai-components/charts/components/PieLegend.js +54 -0
  10. package/lib/commonjs/ai-components/charts/components/PieLegend.js.map +1 -0
  11. package/lib/commonjs/ai-components/charts/components/VictoryChart.js +183 -0
  12. package/lib/commonjs/ai-components/charts/components/VictoryChart.js.map +1 -0
  13. package/lib/commonjs/ai-components/charts/components/index.js +26 -0
  14. package/lib/commonjs/ai-components/charts/components/index.js.map +1 -0
  15. package/lib/commonjs/ai-components/charts/index.js +70 -0
  16. package/lib/commonjs/ai-components/charts/index.js.map +1 -0
  17. package/lib/commonjs/ai-components/charts/mermaid/index.js +15 -0
  18. package/lib/commonjs/ai-components/charts/mermaid/index.js.map +1 -0
  19. package/lib/commonjs/ai-components/charts/mermaid/parser.js +45 -0
  20. package/lib/commonjs/ai-components/charts/mermaid/parser.js.map +1 -0
  21. package/lib/commonjs/ai-components/charts/types.js +2 -0
  22. package/lib/commonjs/ai-components/charts/types.js.map +1 -0
  23. package/lib/commonjs/ai-components/charts/utils/generate-pie-colors.js +68 -0
  24. package/lib/commonjs/ai-components/charts/utils/generate-pie-colors.js.map +1 -0
  25. package/lib/commonjs/ai-components/charts/utils/index.js +26 -0
  26. package/lib/commonjs/ai-components/charts/utils/index.js.map +1 -0
  27. package/lib/commonjs/ai-components/charts/utils/parse-json-chart.js +15 -0
  28. package/lib/commonjs/ai-components/charts/utils/parse-json-chart.js.map +1 -0
  29. package/lib/commonjs/ai-components/charts/vega-lite/index.js +26 -0
  30. package/lib/commonjs/ai-components/charts/vega-lite/index.js.map +1 -0
  31. package/lib/commonjs/ai-components/charts/vega-lite/parser.js +54 -0
  32. package/lib/commonjs/ai-components/charts/vega-lite/parser.js.map +1 -0
  33. package/lib/commonjs/ai-components/charts/vega-lite/schema.js +82 -0
  34. package/lib/commonjs/ai-components/charts/vega-lite/schema.js.map +1 -0
  35. package/lib/commonjs/ai-components/components/BottomSheet.js +182 -0
  36. package/lib/commonjs/ai-components/components/BottomSheet.js.map +1 -0
  37. package/lib/commonjs/ai-components/components/MarkdownReactiveScrollView.js +81 -0
  38. package/lib/commonjs/ai-components/components/MarkdownReactiveScrollView.js.map +1 -0
  39. package/lib/commonjs/ai-components/components/index.js +26 -0
  40. package/lib/commonjs/ai-components/components/index.js.map +1 -0
  41. package/lib/commonjs/ai-components/contexts/composer-context.js +68 -0
  42. package/lib/commonjs/ai-components/contexts/composer-context.js.map +1 -0
  43. package/lib/commonjs/ai-components/contexts/index.js +26 -0
  44. package/lib/commonjs/ai-components/contexts/index.js.map +1 -0
  45. package/lib/commonjs/ai-components/contexts/theme-context.js +53 -0
  46. package/lib/commonjs/ai-components/contexts/theme-context.js.map +1 -0
  47. package/lib/commonjs/ai-components/index.js +166 -0
  48. package/lib/commonjs/ai-components/index.js.map +1 -0
  49. package/lib/commonjs/ai-components/internal/hooks/useStableCallback.js +14 -0
  50. package/lib/commonjs/ai-components/internal/hooks/useStableCallback.js.map +1 -0
  51. package/lib/commonjs/ai-components/internal/icons/Camera.js +18 -0
  52. package/lib/commonjs/ai-components/internal/icons/Camera.js.map +1 -0
  53. package/lib/commonjs/ai-components/internal/icons/CircleStop.js +24 -0
  54. package/lib/commonjs/ai-components/internal/icons/CircleStop.js.map +1 -0
  55. package/lib/commonjs/ai-components/internal/icons/Close.js +18 -0
  56. package/lib/commonjs/ai-components/internal/icons/Close.js.map +1 -0
  57. package/lib/commonjs/ai-components/internal/icons/Mic.js +27 -0
  58. package/lib/commonjs/ai-components/internal/icons/Mic.js.map +1 -0
  59. package/lib/commonjs/ai-components/internal/icons/Picture.js +21 -0
  60. package/lib/commonjs/ai-components/internal/icons/Picture.js.map +1 -0
  61. package/lib/commonjs/ai-components/internal/icons/SendUp.js +28 -0
  62. package/lib/commonjs/ai-components/internal/icons/SendUp.js.map +1 -0
  63. package/lib/commonjs/ai-components/internal/icons/utils/base.js +42 -0
  64. package/lib/commonjs/ai-components/internal/icons/utils/base.js.map +1 -0
  65. package/lib/commonjs/ai-components/markdown/components/Autolink.js +37 -0
  66. package/lib/commonjs/ai-components/markdown/components/Autolink.js.map +1 -0
  67. package/lib/commonjs/ai-components/markdown/components/BlockQuote.js +37 -0
  68. package/lib/commonjs/ai-components/markdown/components/BlockQuote.js.map +1 -0
  69. package/lib/commonjs/ai-components/markdown/components/Bold.js +32 -0
  70. package/lib/commonjs/ai-components/markdown/components/Bold.js.map +1 -0
  71. package/lib/commonjs/ai-components/markdown/components/CodeBlock.js +114 -0
  72. package/lib/commonjs/ai-components/markdown/components/CodeBlock.js.map +1 -0
  73. package/lib/commonjs/ai-components/markdown/components/Emphasis.js +32 -0
  74. package/lib/commonjs/ai-components/markdown/components/Emphasis.js.map +1 -0
  75. package/lib/commonjs/ai-components/markdown/components/Heading.js +41 -0
  76. package/lib/commonjs/ai-components/markdown/components/Heading.js.map +1 -0
  77. package/lib/commonjs/ai-components/markdown/components/HorizontalRule.js +26 -0
  78. package/lib/commonjs/ai-components/markdown/components/HorizontalRule.js.map +1 -0
  79. package/lib/commonjs/ai-components/markdown/components/InlineCode.js +32 -0
  80. package/lib/commonjs/ai-components/markdown/components/InlineCode.js.map +1 -0
  81. package/lib/commonjs/ai-components/markdown/components/LineBreak.js +27 -0
  82. package/lib/commonjs/ai-components/markdown/components/LineBreak.js.map +1 -0
  83. package/lib/commonjs/ai-components/markdown/components/Link.js +41 -0
  84. package/lib/commonjs/ai-components/markdown/components/Link.js.map +1 -0
  85. package/lib/commonjs/ai-components/markdown/components/List.js +85 -0
  86. package/lib/commonjs/ai-components/markdown/components/List.js.map +1 -0
  87. package/lib/commonjs/ai-components/markdown/components/Mailto.js +37 -0
  88. package/lib/commonjs/ai-components/markdown/components/Mailto.js.map +1 -0
  89. package/lib/commonjs/ai-components/markdown/components/Markdown.js +49 -0
  90. package/lib/commonjs/ai-components/markdown/components/Markdown.js.map +1 -0
  91. package/lib/commonjs/ai-components/markdown/components/NewLine.js +27 -0
  92. package/lib/commonjs/ai-components/markdown/components/NewLine.js.map +1 -0
  93. package/lib/commonjs/ai-components/markdown/components/Paragraph.js +72 -0
  94. package/lib/commonjs/ai-components/markdown/components/Paragraph.js.map +1 -0
  95. package/lib/commonjs/ai-components/markdown/components/Strikethrough.js +32 -0
  96. package/lib/commonjs/ai-components/markdown/components/Strikethrough.js.map +1 -0
  97. package/lib/commonjs/ai-components/markdown/components/Table.js +105 -0
  98. package/lib/commonjs/ai-components/markdown/components/Table.js.map +1 -0
  99. package/lib/commonjs/ai-components/markdown/components/Text.js +45 -0
  100. package/lib/commonjs/ai-components/markdown/components/Text.js.map +1 -0
  101. package/lib/commonjs/ai-components/markdown/components/Url.js +37 -0
  102. package/lib/commonjs/ai-components/markdown/components/Url.js.map +1 -0
  103. package/lib/commonjs/ai-components/markdown/components/index.js +213 -0
  104. package/lib/commonjs/ai-components/markdown/components/index.js.map +1 -0
  105. package/lib/commonjs/ai-components/markdown/index.js +59 -0
  106. package/lib/commonjs/ai-components/markdown/index.js.map +1 -0
  107. package/lib/commonjs/ai-components/markdown/rules.js +152 -0
  108. package/lib/commonjs/ai-components/markdown/rules.js.map +1 -0
  109. package/lib/commonjs/ai-components/markdown/styles.js +240 -0
  110. package/lib/commonjs/ai-components/markdown/styles.js.map +1 -0
  111. package/lib/commonjs/ai-components/markdown/types.js +4 -0
  112. package/lib/commonjs/ai-components/markdown/types.js.map +1 -0
  113. package/lib/commonjs/ai-components/markdown/utils/generate-markdown-text.js +73 -0
  114. package/lib/commonjs/ai-components/markdown/utils/generate-markdown-text.js.map +1 -0
  115. package/lib/commonjs/ai-components/markdown/utils/index.js +15 -0
  116. package/lib/commonjs/ai-components/markdown/utils/index.js.map +1 -0
  117. package/lib/commonjs/ai-components/message-composer/ActionButton.js +104 -0
  118. package/lib/commonjs/ai-components/message-composer/ActionButton.js.map +1 -0
  119. package/lib/commonjs/ai-components/message-composer/ActionSheet.js +197 -0
  120. package/lib/commonjs/ai-components/message-composer/ActionSheet.js.map +1 -0
  121. package/lib/commonjs/ai-components/message-composer/AttachmentButton.js +55 -0
  122. package/lib/commonjs/ai-components/message-composer/AttachmentButton.js.map +1 -0
  123. package/lib/commonjs/ai-components/message-composer/ComposerView.js +151 -0
  124. package/lib/commonjs/ai-components/message-composer/ComposerView.js.map +1 -0
  125. package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js +84 -0
  126. package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js.map +1 -0
  127. package/lib/commonjs/ai-components/message-composer/SpeechToTextButton.js +82 -0
  128. package/lib/commonjs/ai-components/message-composer/SpeechToTextButton.js.map +1 -0
  129. package/lib/commonjs/ai-components/message-composer/index.js +59 -0
  130. package/lib/commonjs/ai-components/message-composer/index.js.map +1 -0
  131. package/lib/commonjs/ai-components/message-composer/utils/withCloseSheet.js +16 -0
  132. package/lib/commonjs/ai-components/message-composer/utils/withCloseSheet.js.map +1 -0
  133. package/lib/commonjs/ai-components/native/AIDictation.js +60 -0
  134. package/lib/commonjs/ai-components/native/AIDictation.js.map +1 -0
  135. package/lib/commonjs/ai-components/native/PerfText.js +31 -0
  136. package/lib/commonjs/ai-components/native/PerfText.js.map +1 -0
  137. package/lib/commonjs/ai-components/native-specs/NativeAIDictation.js +7 -0
  138. package/lib/commonjs/ai-components/native-specs/NativeAIDictation.js.map +1 -0
  139. package/lib/commonjs/ai-components/services/clipboard-service/expo.js +13 -0
  140. package/lib/commonjs/ai-components/services/clipboard-service/expo.js.map +1 -0
  141. package/lib/commonjs/ai-components/services/clipboard-service/index.js +8 -0
  142. package/lib/commonjs/ai-components/services/clipboard-service/index.js.map +1 -0
  143. package/lib/commonjs/ai-components/services/clipboard-service/rncli.js +10 -0
  144. package/lib/commonjs/ai-components/services/clipboard-service/rncli.js.map +1 -0
  145. package/lib/commonjs/ai-components/services/index.js +26 -0
  146. package/lib/commonjs/ai-components/services/index.js.map +1 -0
  147. package/lib/commonjs/ai-components/services/media-picker-service/AbstractMediaPickerService.js +31 -0
  148. package/lib/commonjs/ai-components/services/media-picker-service/AbstractMediaPickerService.js.map +1 -0
  149. package/lib/commonjs/ai-components/services/media-picker-service/expo.js +169 -0
  150. package/lib/commonjs/ai-components/services/media-picker-service/expo.js.map +1 -0
  151. package/lib/commonjs/ai-components/services/media-picker-service/hooks/useMediaPickerState.js +14 -0
  152. package/lib/commonjs/ai-components/services/media-picker-service/hooks/useMediaPickerState.js.map +1 -0
  153. package/lib/commonjs/ai-components/services/media-picker-service/index.js +8 -0
  154. package/lib/commonjs/ai-components/services/media-picker-service/index.js.map +1 -0
  155. package/lib/commonjs/ai-components/services/media-picker-service/optional-modules.d.js +2 -0
  156. package/lib/commonjs/ai-components/services/media-picker-service/optional-modules.d.js.map +1 -0
  157. package/lib/commonjs/ai-components/services/media-picker-service/rncli.js +162 -0
  158. package/lib/commonjs/ai-components/services/media-picker-service/rncli.js.map +1 -0
  159. package/lib/commonjs/ai-components/store/bottom-sheet/store.js +27 -0
  160. package/lib/commonjs/ai-components/store/bottom-sheet/store.js.map +1 -0
  161. package/lib/commonjs/ai-components/store/bottom-sheet/useBottomSheetState.js +16 -0
  162. package/lib/commonjs/ai-components/store/bottom-sheet/useBottomSheetState.js.map +1 -0
  163. package/lib/commonjs/ai-components/store/composer/store.js +11 -0
  164. package/lib/commonjs/ai-components/store/composer/store.js.map +1 -0
  165. package/lib/commonjs/ai-components/store/composer/useComposerHasText.js +18 -0
  166. package/lib/commonjs/ai-components/store/composer/useComposerHasText.js.map +1 -0
  167. package/lib/commonjs/ai-components/store/composer/useComposerText.js +18 -0
  168. package/lib/commonjs/ai-components/store/composer/useComposerText.js.map +1 -0
  169. package/lib/commonjs/ai-components/store/dictation/store.js +17 -0
  170. package/lib/commonjs/ai-components/store/dictation/store.js.map +1 -0
  171. package/lib/commonjs/ai-components/store/dictation/useDictationState.js +18 -0
  172. package/lib/commonjs/ai-components/store/dictation/useDictationState.js.map +1 -0
  173. package/lib/commonjs/ai-components/store/dictation/useDictationTranscript.js +14 -0
  174. package/lib/commonjs/ai-components/store/dictation/useDictationTranscript.js.map +1 -0
  175. package/lib/commonjs/ai-components/store/index.js +70 -0
  176. package/lib/commonjs/ai-components/store/index.js.map +1 -0
  177. package/lib/commonjs/ai-components/syntax-highlighting/SyntaxHighlighter.js +51 -0
  178. package/lib/commonjs/ai-components/syntax-highlighting/SyntaxHighlighter.js.map +1 -0
  179. package/lib/commonjs/ai-components/syntax-highlighting/components/AndroidNativeRenderer.js +35 -0
  180. package/lib/commonjs/ai-components/syntax-highlighting/components/AndroidNativeRenderer.js.map +1 -0
  181. package/lib/commonjs/ai-components/syntax-highlighting/components/index.js +15 -0
  182. package/lib/commonjs/ai-components/syntax-highlighting/components/index.js.map +1 -0
  183. package/lib/commonjs/ai-components/syntax-highlighting/index.js +48 -0
  184. package/lib/commonjs/ai-components/syntax-highlighting/index.js.map +1 -0
  185. package/lib/commonjs/ai-components/syntax-highlighting/prism-config.js +7 -0
  186. package/lib/commonjs/ai-components/syntax-highlighting/prism-config.js.map +1 -0
  187. package/lib/commonjs/ai-components/syntax-highlighting/types.js +4 -0
  188. package/lib/commonjs/ai-components/syntax-highlighting/types.js.map +1 -0
  189. package/lib/commonjs/ai-components/syntax-highlighting/utils/converter.js +107 -0
  190. package/lib/commonjs/ai-components/syntax-highlighting/utils/converter.js.map +1 -0
  191. package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js +139 -0
  192. package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -0
  193. package/lib/commonjs/ai-components/syntax-highlighting/utils/index.js +37 -0
  194. package/lib/commonjs/ai-components/syntax-highlighting/utils/index.js.map +1 -0
  195. package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js +117 -0
  196. package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js.map +1 -0
  197. package/lib/commonjs/ai-components/theme.js +99 -0
  198. package/lib/commonjs/ai-components/theme.js.map +1 -0
  199. package/lib/commonjs/ai-components/transcription/useDictation.js +114 -0
  200. package/lib/commonjs/ai-components/transcription/useDictation.js.map +1 -0
  201. package/lib/commonjs/native.js +4 -0
  202. package/lib/commonjs/native.js.map +1 -1
  203. package/lib/commonjs/version.json +1 -1
  204. package/lib/module/ai-components/AITypingIndicatorView.js +49 -0
  205. package/lib/module/ai-components/AITypingIndicatorView.js.map +1 -0
  206. package/lib/module/ai-components/README.md +279 -0
  207. package/lib/module/ai-components/StreamingMessageView.js +75 -0
  208. package/lib/module/ai-components/StreamingMessageView.js.map +1 -0
  209. package/lib/module/ai-components/charts/Chart.js +25 -0
  210. package/lib/module/ai-components/charts/Chart.js.map +1 -0
  211. package/lib/module/ai-components/charts/components/PieLegend.js +54 -0
  212. package/lib/module/ai-components/charts/components/PieLegend.js.map +1 -0
  213. package/lib/module/ai-components/charts/components/VictoryChart.js +183 -0
  214. package/lib/module/ai-components/charts/components/VictoryChart.js.map +1 -0
  215. package/lib/module/ai-components/charts/components/index.js +26 -0
  216. package/lib/module/ai-components/charts/components/index.js.map +1 -0
  217. package/lib/module/ai-components/charts/index.js +70 -0
  218. package/lib/module/ai-components/charts/index.js.map +1 -0
  219. package/lib/module/ai-components/charts/mermaid/index.js +15 -0
  220. package/lib/module/ai-components/charts/mermaid/index.js.map +1 -0
  221. package/lib/module/ai-components/charts/mermaid/parser.js +45 -0
  222. package/lib/module/ai-components/charts/mermaid/parser.js.map +1 -0
  223. package/lib/module/ai-components/charts/types.js +2 -0
  224. package/lib/module/ai-components/charts/types.js.map +1 -0
  225. package/lib/module/ai-components/charts/utils/generate-pie-colors.js +68 -0
  226. package/lib/module/ai-components/charts/utils/generate-pie-colors.js.map +1 -0
  227. package/lib/module/ai-components/charts/utils/index.js +26 -0
  228. package/lib/module/ai-components/charts/utils/index.js.map +1 -0
  229. package/lib/module/ai-components/charts/utils/parse-json-chart.js +15 -0
  230. package/lib/module/ai-components/charts/utils/parse-json-chart.js.map +1 -0
  231. package/lib/module/ai-components/charts/vega-lite/index.js +26 -0
  232. package/lib/module/ai-components/charts/vega-lite/index.js.map +1 -0
  233. package/lib/module/ai-components/charts/vega-lite/parser.js +54 -0
  234. package/lib/module/ai-components/charts/vega-lite/parser.js.map +1 -0
  235. package/lib/module/ai-components/charts/vega-lite/schema.js +82 -0
  236. package/lib/module/ai-components/charts/vega-lite/schema.js.map +1 -0
  237. package/lib/module/ai-components/components/BottomSheet.js +182 -0
  238. package/lib/module/ai-components/components/BottomSheet.js.map +1 -0
  239. package/lib/module/ai-components/components/MarkdownReactiveScrollView.js +81 -0
  240. package/lib/module/ai-components/components/MarkdownReactiveScrollView.js.map +1 -0
  241. package/lib/module/ai-components/components/index.js +26 -0
  242. package/lib/module/ai-components/components/index.js.map +1 -0
  243. package/lib/module/ai-components/contexts/composer-context.js +68 -0
  244. package/lib/module/ai-components/contexts/composer-context.js.map +1 -0
  245. package/lib/module/ai-components/contexts/index.js +26 -0
  246. package/lib/module/ai-components/contexts/index.js.map +1 -0
  247. package/lib/module/ai-components/contexts/theme-context.js +53 -0
  248. package/lib/module/ai-components/contexts/theme-context.js.map +1 -0
  249. package/lib/module/ai-components/index.js +166 -0
  250. package/lib/module/ai-components/index.js.map +1 -0
  251. package/lib/module/ai-components/internal/hooks/useStableCallback.js +14 -0
  252. package/lib/module/ai-components/internal/hooks/useStableCallback.js.map +1 -0
  253. package/lib/module/ai-components/internal/icons/Camera.js +18 -0
  254. package/lib/module/ai-components/internal/icons/Camera.js.map +1 -0
  255. package/lib/module/ai-components/internal/icons/CircleStop.js +24 -0
  256. package/lib/module/ai-components/internal/icons/CircleStop.js.map +1 -0
  257. package/lib/module/ai-components/internal/icons/Close.js +18 -0
  258. package/lib/module/ai-components/internal/icons/Close.js.map +1 -0
  259. package/lib/module/ai-components/internal/icons/Mic.js +27 -0
  260. package/lib/module/ai-components/internal/icons/Mic.js.map +1 -0
  261. package/lib/module/ai-components/internal/icons/Picture.js +21 -0
  262. package/lib/module/ai-components/internal/icons/Picture.js.map +1 -0
  263. package/lib/module/ai-components/internal/icons/SendUp.js +28 -0
  264. package/lib/module/ai-components/internal/icons/SendUp.js.map +1 -0
  265. package/lib/module/ai-components/internal/icons/utils/base.js +42 -0
  266. package/lib/module/ai-components/internal/icons/utils/base.js.map +1 -0
  267. package/lib/module/ai-components/markdown/components/Autolink.js +37 -0
  268. package/lib/module/ai-components/markdown/components/Autolink.js.map +1 -0
  269. package/lib/module/ai-components/markdown/components/BlockQuote.js +37 -0
  270. package/lib/module/ai-components/markdown/components/BlockQuote.js.map +1 -0
  271. package/lib/module/ai-components/markdown/components/Bold.js +32 -0
  272. package/lib/module/ai-components/markdown/components/Bold.js.map +1 -0
  273. package/lib/module/ai-components/markdown/components/CodeBlock.js +114 -0
  274. package/lib/module/ai-components/markdown/components/CodeBlock.js.map +1 -0
  275. package/lib/module/ai-components/markdown/components/Emphasis.js +32 -0
  276. package/lib/module/ai-components/markdown/components/Emphasis.js.map +1 -0
  277. package/lib/module/ai-components/markdown/components/Heading.js +41 -0
  278. package/lib/module/ai-components/markdown/components/Heading.js.map +1 -0
  279. package/lib/module/ai-components/markdown/components/HorizontalRule.js +26 -0
  280. package/lib/module/ai-components/markdown/components/HorizontalRule.js.map +1 -0
  281. package/lib/module/ai-components/markdown/components/InlineCode.js +32 -0
  282. package/lib/module/ai-components/markdown/components/InlineCode.js.map +1 -0
  283. package/lib/module/ai-components/markdown/components/LineBreak.js +27 -0
  284. package/lib/module/ai-components/markdown/components/LineBreak.js.map +1 -0
  285. package/lib/module/ai-components/markdown/components/Link.js +41 -0
  286. package/lib/module/ai-components/markdown/components/Link.js.map +1 -0
  287. package/lib/module/ai-components/markdown/components/List.js +85 -0
  288. package/lib/module/ai-components/markdown/components/List.js.map +1 -0
  289. package/lib/module/ai-components/markdown/components/Mailto.js +37 -0
  290. package/lib/module/ai-components/markdown/components/Mailto.js.map +1 -0
  291. package/lib/module/ai-components/markdown/components/Markdown.js +49 -0
  292. package/lib/module/ai-components/markdown/components/Markdown.js.map +1 -0
  293. package/lib/module/ai-components/markdown/components/NewLine.js +27 -0
  294. package/lib/module/ai-components/markdown/components/NewLine.js.map +1 -0
  295. package/lib/module/ai-components/markdown/components/Paragraph.js +72 -0
  296. package/lib/module/ai-components/markdown/components/Paragraph.js.map +1 -0
  297. package/lib/module/ai-components/markdown/components/Strikethrough.js +32 -0
  298. package/lib/module/ai-components/markdown/components/Strikethrough.js.map +1 -0
  299. package/lib/module/ai-components/markdown/components/Table.js +105 -0
  300. package/lib/module/ai-components/markdown/components/Table.js.map +1 -0
  301. package/lib/module/ai-components/markdown/components/Text.js +45 -0
  302. package/lib/module/ai-components/markdown/components/Text.js.map +1 -0
  303. package/lib/module/ai-components/markdown/components/Url.js +37 -0
  304. package/lib/module/ai-components/markdown/components/Url.js.map +1 -0
  305. package/lib/module/ai-components/markdown/components/index.js +213 -0
  306. package/lib/module/ai-components/markdown/components/index.js.map +1 -0
  307. package/lib/module/ai-components/markdown/index.js +59 -0
  308. package/lib/module/ai-components/markdown/index.js.map +1 -0
  309. package/lib/module/ai-components/markdown/rules.js +152 -0
  310. package/lib/module/ai-components/markdown/rules.js.map +1 -0
  311. package/lib/module/ai-components/markdown/styles.js +240 -0
  312. package/lib/module/ai-components/markdown/styles.js.map +1 -0
  313. package/lib/module/ai-components/markdown/types.js +4 -0
  314. package/lib/module/ai-components/markdown/types.js.map +1 -0
  315. package/lib/module/ai-components/markdown/utils/generate-markdown-text.js +73 -0
  316. package/lib/module/ai-components/markdown/utils/generate-markdown-text.js.map +1 -0
  317. package/lib/module/ai-components/markdown/utils/index.js +15 -0
  318. package/lib/module/ai-components/markdown/utils/index.js.map +1 -0
  319. package/lib/module/ai-components/message-composer/ActionButton.js +104 -0
  320. package/lib/module/ai-components/message-composer/ActionButton.js.map +1 -0
  321. package/lib/module/ai-components/message-composer/ActionSheet.js +197 -0
  322. package/lib/module/ai-components/message-composer/ActionSheet.js.map +1 -0
  323. package/lib/module/ai-components/message-composer/AttachmentButton.js +55 -0
  324. package/lib/module/ai-components/message-composer/AttachmentButton.js.map +1 -0
  325. package/lib/module/ai-components/message-composer/ComposerView.js +151 -0
  326. package/lib/module/ai-components/message-composer/ComposerView.js.map +1 -0
  327. package/lib/module/ai-components/message-composer/MediaPreviewList.js +84 -0
  328. package/lib/module/ai-components/message-composer/MediaPreviewList.js.map +1 -0
  329. package/lib/module/ai-components/message-composer/SpeechToTextButton.js +82 -0
  330. package/lib/module/ai-components/message-composer/SpeechToTextButton.js.map +1 -0
  331. package/lib/module/ai-components/message-composer/index.js +59 -0
  332. package/lib/module/ai-components/message-composer/index.js.map +1 -0
  333. package/lib/module/ai-components/message-composer/utils/withCloseSheet.js +16 -0
  334. package/lib/module/ai-components/message-composer/utils/withCloseSheet.js.map +1 -0
  335. package/lib/module/ai-components/native/AIDictation.js +60 -0
  336. package/lib/module/ai-components/native/AIDictation.js.map +1 -0
  337. package/lib/module/ai-components/native/PerfText.js +31 -0
  338. package/lib/module/ai-components/native/PerfText.js.map +1 -0
  339. package/lib/module/ai-components/native-specs/NativeAIDictation.js +7 -0
  340. package/lib/module/ai-components/native-specs/NativeAIDictation.js.map +1 -0
  341. package/lib/module/ai-components/services/clipboard-service/expo.js +13 -0
  342. package/lib/module/ai-components/services/clipboard-service/expo.js.map +1 -0
  343. package/lib/module/ai-components/services/clipboard-service/index.js +8 -0
  344. package/lib/module/ai-components/services/clipboard-service/index.js.map +1 -0
  345. package/lib/module/ai-components/services/clipboard-service/rncli.js +10 -0
  346. package/lib/module/ai-components/services/clipboard-service/rncli.js.map +1 -0
  347. package/lib/module/ai-components/services/index.js +26 -0
  348. package/lib/module/ai-components/services/index.js.map +1 -0
  349. package/lib/module/ai-components/services/media-picker-service/AbstractMediaPickerService.js +31 -0
  350. package/lib/module/ai-components/services/media-picker-service/AbstractMediaPickerService.js.map +1 -0
  351. package/lib/module/ai-components/services/media-picker-service/expo.js +169 -0
  352. package/lib/module/ai-components/services/media-picker-service/expo.js.map +1 -0
  353. package/lib/module/ai-components/services/media-picker-service/hooks/useMediaPickerState.js +14 -0
  354. package/lib/module/ai-components/services/media-picker-service/hooks/useMediaPickerState.js.map +1 -0
  355. package/lib/module/ai-components/services/media-picker-service/index.js +8 -0
  356. package/lib/module/ai-components/services/media-picker-service/index.js.map +1 -0
  357. package/lib/module/ai-components/services/media-picker-service/optional-modules.d.js +2 -0
  358. package/lib/module/ai-components/services/media-picker-service/optional-modules.d.js.map +1 -0
  359. package/lib/module/ai-components/services/media-picker-service/rncli.js +162 -0
  360. package/lib/module/ai-components/services/media-picker-service/rncli.js.map +1 -0
  361. package/lib/module/ai-components/store/bottom-sheet/store.js +27 -0
  362. package/lib/module/ai-components/store/bottom-sheet/store.js.map +1 -0
  363. package/lib/module/ai-components/store/bottom-sheet/useBottomSheetState.js +16 -0
  364. package/lib/module/ai-components/store/bottom-sheet/useBottomSheetState.js.map +1 -0
  365. package/lib/module/ai-components/store/composer/store.js +11 -0
  366. package/lib/module/ai-components/store/composer/store.js.map +1 -0
  367. package/lib/module/ai-components/store/composer/useComposerHasText.js +18 -0
  368. package/lib/module/ai-components/store/composer/useComposerHasText.js.map +1 -0
  369. package/lib/module/ai-components/store/composer/useComposerText.js +18 -0
  370. package/lib/module/ai-components/store/composer/useComposerText.js.map +1 -0
  371. package/lib/module/ai-components/store/dictation/store.js +17 -0
  372. package/lib/module/ai-components/store/dictation/store.js.map +1 -0
  373. package/lib/module/ai-components/store/dictation/useDictationState.js +18 -0
  374. package/lib/module/ai-components/store/dictation/useDictationState.js.map +1 -0
  375. package/lib/module/ai-components/store/dictation/useDictationTranscript.js +14 -0
  376. package/lib/module/ai-components/store/dictation/useDictationTranscript.js.map +1 -0
  377. package/lib/module/ai-components/store/index.js +70 -0
  378. package/lib/module/ai-components/store/index.js.map +1 -0
  379. package/lib/module/ai-components/syntax-highlighting/SyntaxHighlighter.js +51 -0
  380. package/lib/module/ai-components/syntax-highlighting/SyntaxHighlighter.js.map +1 -0
  381. package/lib/module/ai-components/syntax-highlighting/components/AndroidNativeRenderer.js +35 -0
  382. package/lib/module/ai-components/syntax-highlighting/components/AndroidNativeRenderer.js.map +1 -0
  383. package/lib/module/ai-components/syntax-highlighting/components/index.js +15 -0
  384. package/lib/module/ai-components/syntax-highlighting/components/index.js.map +1 -0
  385. package/lib/module/ai-components/syntax-highlighting/index.js +48 -0
  386. package/lib/module/ai-components/syntax-highlighting/index.js.map +1 -0
  387. package/lib/module/ai-components/syntax-highlighting/prism-config.js +7 -0
  388. package/lib/module/ai-components/syntax-highlighting/prism-config.js.map +1 -0
  389. package/lib/module/ai-components/syntax-highlighting/types.js +4 -0
  390. package/lib/module/ai-components/syntax-highlighting/types.js.map +1 -0
  391. package/lib/module/ai-components/syntax-highlighting/utils/converter.js +107 -0
  392. package/lib/module/ai-components/syntax-highlighting/utils/converter.js.map +1 -0
  393. package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js +139 -0
  394. package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -0
  395. package/lib/module/ai-components/syntax-highlighting/utils/index.js +37 -0
  396. package/lib/module/ai-components/syntax-highlighting/utils/index.js.map +1 -0
  397. package/lib/module/ai-components/syntax-highlighting/utils/renderer.js +117 -0
  398. package/lib/module/ai-components/syntax-highlighting/utils/renderer.js.map +1 -0
  399. package/lib/module/ai-components/theme.js +99 -0
  400. package/lib/module/ai-components/theme.js.map +1 -0
  401. package/lib/module/ai-components/transcription/useDictation.js +114 -0
  402. package/lib/module/ai-components/transcription/useDictation.js.map +1 -0
  403. package/lib/module/native.js +4 -0
  404. package/lib/module/native.js.map +1 -1
  405. package/lib/module/version.json +1 -1
  406. package/lib/typescript/ai-components/AITypingIndicatorView.d.ts +4 -0
  407. package/lib/typescript/ai-components/AITypingIndicatorView.d.ts.map +1 -0
  408. package/lib/typescript/ai-components/StreamingMessageView.d.ts +19 -0
  409. package/lib/typescript/ai-components/StreamingMessageView.d.ts.map +1 -0
  410. package/lib/typescript/ai-components/charts/Chart.d.ts +10 -0
  411. package/lib/typescript/ai-components/charts/Chart.d.ts.map +1 -0
  412. package/lib/typescript/ai-components/charts/components/PieLegend.d.ts +7 -0
  413. package/lib/typescript/ai-components/charts/components/PieLegend.d.ts.map +1 -0
  414. package/lib/typescript/ai-components/charts/components/VictoryChart.d.ts +9 -0
  415. package/lib/typescript/ai-components/charts/components/VictoryChart.d.ts.map +1 -0
  416. package/lib/typescript/ai-components/charts/components/index.d.ts +3 -0
  417. package/lib/typescript/ai-components/charts/components/index.d.ts.map +1 -0
  418. package/lib/typescript/ai-components/charts/index.d.ts +7 -0
  419. package/lib/typescript/ai-components/charts/index.d.ts.map +1 -0
  420. package/lib/typescript/ai-components/charts/mermaid/index.d.ts +2 -0
  421. package/lib/typescript/ai-components/charts/mermaid/index.d.ts.map +1 -0
  422. package/lib/typescript/ai-components/charts/mermaid/parser.d.ts +4 -0
  423. package/lib/typescript/ai-components/charts/mermaid/parser.d.ts.map +1 -0
  424. package/lib/typescript/ai-components/charts/types.d.ts +23 -0
  425. package/lib/typescript/ai-components/charts/types.d.ts.map +1 -0
  426. package/lib/typescript/ai-components/charts/utils/generate-pie-colors.d.ts +9 -0
  427. package/lib/typescript/ai-components/charts/utils/generate-pie-colors.d.ts.map +1 -0
  428. package/lib/typescript/ai-components/charts/utils/index.d.ts +3 -0
  429. package/lib/typescript/ai-components/charts/utils/index.d.ts.map +1 -0
  430. package/lib/typescript/ai-components/charts/utils/parse-json-chart.d.ts +3 -0
  431. package/lib/typescript/ai-components/charts/utils/parse-json-chart.d.ts.map +1 -0
  432. package/lib/typescript/ai-components/charts/vega-lite/index.d.ts +3 -0
  433. package/lib/typescript/ai-components/charts/vega-lite/index.d.ts.map +1 -0
  434. package/lib/typescript/ai-components/charts/vega-lite/parser.d.ts +4 -0
  435. package/lib/typescript/ai-components/charts/vega-lite/parser.d.ts.map +1 -0
  436. package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts +305 -0
  437. package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts.map +1 -0
  438. package/lib/typescript/ai-components/components/BottomSheet.d.ts +5 -0
  439. package/lib/typescript/ai-components/components/BottomSheet.d.ts.map +1 -0
  440. package/lib/typescript/ai-components/components/MarkdownReactiveScrollView.d.ts +3 -0
  441. package/lib/typescript/ai-components/components/MarkdownReactiveScrollView.d.ts.map +1 -0
  442. package/lib/typescript/ai-components/components/index.d.ts +3 -0
  443. package/lib/typescript/ai-components/components/index.d.ts.map +1 -0
  444. package/lib/typescript/ai-components/contexts/composer-context.d.ts +16 -0
  445. package/lib/typescript/ai-components/contexts/composer-context.d.ts.map +1 -0
  446. package/lib/typescript/ai-components/contexts/index.d.ts +3 -0
  447. package/lib/typescript/ai-components/contexts/index.d.ts.map +1 -0
  448. package/lib/typescript/ai-components/contexts/theme-context.d.ts +23 -0
  449. package/lib/typescript/ai-components/contexts/theme-context.d.ts.map +1 -0
  450. package/lib/typescript/ai-components/index.d.ts +15 -0
  451. package/lib/typescript/ai-components/index.d.ts.map +1 -0
  452. package/lib/typescript/ai-components/internal/hooks/useStableCallback.d.ts +26 -0
  453. package/lib/typescript/ai-components/internal/hooks/useStableCallback.d.ts.map +1 -0
  454. package/lib/typescript/ai-components/internal/icons/Camera.d.ts +4 -0
  455. package/lib/typescript/ai-components/internal/icons/Camera.d.ts.map +1 -0
  456. package/lib/typescript/ai-components/internal/icons/CircleStop.d.ts +8 -0
  457. package/lib/typescript/ai-components/internal/icons/CircleStop.d.ts.map +1 -0
  458. package/lib/typescript/ai-components/internal/icons/Close.d.ts +4 -0
  459. package/lib/typescript/ai-components/internal/icons/Close.d.ts.map +1 -0
  460. package/lib/typescript/ai-components/internal/icons/Mic.d.ts +8 -0
  461. package/lib/typescript/ai-components/internal/icons/Mic.d.ts.map +1 -0
  462. package/lib/typescript/ai-components/internal/icons/Picture.d.ts +4 -0
  463. package/lib/typescript/ai-components/internal/icons/Picture.d.ts.map +1 -0
  464. package/lib/typescript/ai-components/internal/icons/SendUp.d.ts +8 -0
  465. package/lib/typescript/ai-components/internal/icons/SendUp.d.ts.map +1 -0
  466. package/lib/typescript/ai-components/internal/icons/utils/base.d.ts +13 -0
  467. package/lib/typescript/ai-components/internal/icons/utils/base.d.ts.map +1 -0
  468. package/lib/typescript/ai-components/markdown/components/Autolink.d.ts +4 -0
  469. package/lib/typescript/ai-components/markdown/components/Autolink.d.ts.map +1 -0
  470. package/lib/typescript/ai-components/markdown/components/BlockQuote.d.ts +4 -0
  471. package/lib/typescript/ai-components/markdown/components/BlockQuote.d.ts.map +1 -0
  472. package/lib/typescript/ai-components/markdown/components/Bold.d.ts +4 -0
  473. package/lib/typescript/ai-components/markdown/components/Bold.d.ts.map +1 -0
  474. package/lib/typescript/ai-components/markdown/components/CodeBlock.d.ts +9 -0
  475. package/lib/typescript/ai-components/markdown/components/CodeBlock.d.ts.map +1 -0
  476. package/lib/typescript/ai-components/markdown/components/Emphasis.d.ts +4 -0
  477. package/lib/typescript/ai-components/markdown/components/Emphasis.d.ts.map +1 -0
  478. package/lib/typescript/ai-components/markdown/components/Heading.d.ts +4 -0
  479. package/lib/typescript/ai-components/markdown/components/Heading.d.ts.map +1 -0
  480. package/lib/typescript/ai-components/markdown/components/HorizontalRule.d.ts +4 -0
  481. package/lib/typescript/ai-components/markdown/components/HorizontalRule.d.ts.map +1 -0
  482. package/lib/typescript/ai-components/markdown/components/InlineCode.d.ts +4 -0
  483. package/lib/typescript/ai-components/markdown/components/InlineCode.d.ts.map +1 -0
  484. package/lib/typescript/ai-components/markdown/components/LineBreak.d.ts +4 -0
  485. package/lib/typescript/ai-components/markdown/components/LineBreak.d.ts.map +1 -0
  486. package/lib/typescript/ai-components/markdown/components/Link.d.ts +4 -0
  487. package/lib/typescript/ai-components/markdown/components/Link.d.ts.map +1 -0
  488. package/lib/typescript/ai-components/markdown/components/List.d.ts +4 -0
  489. package/lib/typescript/ai-components/markdown/components/List.d.ts.map +1 -0
  490. package/lib/typescript/ai-components/markdown/components/Mailto.d.ts +4 -0
  491. package/lib/typescript/ai-components/markdown/components/Mailto.d.ts.map +1 -0
  492. package/lib/typescript/ai-components/markdown/components/Markdown.d.ts +4 -0
  493. package/lib/typescript/ai-components/markdown/components/Markdown.d.ts.map +1 -0
  494. package/lib/typescript/ai-components/markdown/components/NewLine.d.ts +4 -0
  495. package/lib/typescript/ai-components/markdown/components/NewLine.d.ts.map +1 -0
  496. package/lib/typescript/ai-components/markdown/components/Paragraph.d.ts +5 -0
  497. package/lib/typescript/ai-components/markdown/components/Paragraph.d.ts.map +1 -0
  498. package/lib/typescript/ai-components/markdown/components/Strikethrough.d.ts +4 -0
  499. package/lib/typescript/ai-components/markdown/components/Strikethrough.d.ts.map +1 -0
  500. package/lib/typescript/ai-components/markdown/components/Table.d.ts +4 -0
  501. package/lib/typescript/ai-components/markdown/components/Table.d.ts.map +1 -0
  502. package/lib/typescript/ai-components/markdown/components/Text.d.ts +4 -0
  503. package/lib/typescript/ai-components/markdown/components/Text.d.ts.map +1 -0
  504. package/lib/typescript/ai-components/markdown/components/Url.d.ts +4 -0
  505. package/lib/typescript/ai-components/markdown/components/Url.d.ts.map +1 -0
  506. package/lib/typescript/ai-components/markdown/components/index.d.ts +20 -0
  507. package/lib/typescript/ai-components/markdown/components/index.d.ts.map +1 -0
  508. package/lib/typescript/ai-components/markdown/index.d.ts +6 -0
  509. package/lib/typescript/ai-components/markdown/index.d.ts.map +1 -0
  510. package/lib/typescript/ai-components/markdown/rules.d.ts +4 -0
  511. package/lib/typescript/ai-components/markdown/rules.d.ts.map +1 -0
  512. package/lib/typescript/ai-components/markdown/styles.d.ts +232 -0
  513. package/lib/typescript/ai-components/markdown/styles.d.ts.map +1 -0
  514. package/lib/typescript/ai-components/markdown/types.d.ts +137 -0
  515. package/lib/typescript/ai-components/markdown/types.d.ts.map +1 -0
  516. package/lib/typescript/ai-components/markdown/utils/generate-markdown-text.d.ts +5 -0
  517. package/lib/typescript/ai-components/markdown/utils/generate-markdown-text.d.ts.map +1 -0
  518. package/lib/typescript/ai-components/markdown/utils/index.d.ts +2 -0
  519. package/lib/typescript/ai-components/markdown/utils/index.d.ts.map +1 -0
  520. package/lib/typescript/ai-components/message-composer/ActionButton.d.ts +4 -0
  521. package/lib/typescript/ai-components/message-composer/ActionButton.d.ts.map +1 -0
  522. package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts +16 -0
  523. package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts.map +1 -0
  524. package/lib/typescript/ai-components/message-composer/AttachmentButton.d.ts +3 -0
  525. package/lib/typescript/ai-components/message-composer/AttachmentButton.d.ts.map +1 -0
  526. package/lib/typescript/ai-components/message-composer/ComposerView.d.ts +33 -0
  527. package/lib/typescript/ai-components/message-composer/ComposerView.d.ts.map +1 -0
  528. package/lib/typescript/ai-components/message-composer/MediaPreviewList.d.ts +3 -0
  529. package/lib/typescript/ai-components/message-composer/MediaPreviewList.d.ts.map +1 -0
  530. package/lib/typescript/ai-components/message-composer/SpeechToTextButton.d.ts +12 -0
  531. package/lib/typescript/ai-components/message-composer/SpeechToTextButton.d.ts.map +1 -0
  532. package/lib/typescript/ai-components/message-composer/index.d.ts +6 -0
  533. package/lib/typescript/ai-components/message-composer/index.d.ts.map +1 -0
  534. package/lib/typescript/ai-components/message-composer/utils/withCloseSheet.d.ts +2 -0
  535. package/lib/typescript/ai-components/message-composer/utils/withCloseSheet.d.ts.map +1 -0
  536. package/lib/typescript/ai-components/native/AIDictation.d.ts +18 -0
  537. package/lib/typescript/ai-components/native/AIDictation.d.ts.map +1 -0
  538. package/lib/typescript/ai-components/native/PerfText.d.ts +13 -0
  539. package/lib/typescript/ai-components/native/PerfText.d.ts.map +1 -0
  540. package/lib/typescript/ai-components/native-specs/NativeAIDictation.d.ts +40 -0
  541. package/lib/typescript/ai-components/native-specs/NativeAIDictation.d.ts.map +1 -0
  542. package/lib/typescript/ai-components/services/clipboard-service/expo.d.ts +2 -0
  543. package/lib/typescript/ai-components/services/clipboard-service/expo.d.ts.map +1 -0
  544. package/lib/typescript/ai-components/services/clipboard-service/index.d.ts +2 -0
  545. package/lib/typescript/ai-components/services/clipboard-service/index.d.ts.map +1 -0
  546. package/lib/typescript/ai-components/services/clipboard-service/rncli.d.ts +2 -0
  547. package/lib/typescript/ai-components/services/clipboard-service/rncli.d.ts.map +1 -0
  548. package/lib/typescript/ai-components/services/index.d.ts +3 -0
  549. package/lib/typescript/ai-components/services/index.d.ts.map +1 -0
  550. package/lib/typescript/ai-components/services/media-picker-service/AbstractMediaPickerService.d.ts +40 -0
  551. package/lib/typescript/ai-components/services/media-picker-service/AbstractMediaPickerService.d.ts.map +1 -0
  552. package/lib/typescript/ai-components/services/media-picker-service/expo.d.ts +34 -0
  553. package/lib/typescript/ai-components/services/media-picker-service/expo.d.ts.map +1 -0
  554. package/lib/typescript/ai-components/services/media-picker-service/hooks/useMediaPickerState.d.ts +11 -0
  555. package/lib/typescript/ai-components/services/media-picker-service/hooks/useMediaPickerState.d.ts.map +1 -0
  556. package/lib/typescript/ai-components/services/media-picker-service/index.d.ts +37 -0
  557. package/lib/typescript/ai-components/services/media-picker-service/index.d.ts.map +1 -0
  558. package/lib/typescript/ai-components/services/media-picker-service/rncli.d.ts +34 -0
  559. package/lib/typescript/ai-components/services/media-picker-service/rncli.d.ts.map +1 -0
  560. package/lib/typescript/ai-components/store/bottom-sheet/store.d.ts +12 -0
  561. package/lib/typescript/ai-components/store/bottom-sheet/store.d.ts.map +1 -0
  562. package/lib/typescript/ai-components/store/bottom-sheet/useBottomSheetState.d.ts +5 -0
  563. package/lib/typescript/ai-components/store/bottom-sheet/useBottomSheetState.d.ts.map +1 -0
  564. package/lib/typescript/ai-components/store/composer/store.d.ts +7 -0
  565. package/lib/typescript/ai-components/store/composer/store.d.ts.map +1 -0
  566. package/lib/typescript/ai-components/store/composer/useComposerHasText.d.ts +4 -0
  567. package/lib/typescript/ai-components/store/composer/useComposerHasText.d.ts.map +1 -0
  568. package/lib/typescript/ai-components/store/composer/useComposerText.d.ts +4 -0
  569. package/lib/typescript/ai-components/store/composer/useComposerText.d.ts.map +1 -0
  570. package/lib/typescript/ai-components/store/dictation/store.d.ts +13 -0
  571. package/lib/typescript/ai-components/store/dictation/store.d.ts.map +1 -0
  572. package/lib/typescript/ai-components/store/dictation/useDictationState.d.ts +6 -0
  573. package/lib/typescript/ai-components/store/dictation/useDictationState.d.ts.map +1 -0
  574. package/lib/typescript/ai-components/store/dictation/useDictationTranscript.d.ts +4 -0
  575. package/lib/typescript/ai-components/store/dictation/useDictationTranscript.d.ts.map +1 -0
  576. package/lib/typescript/ai-components/store/index.d.ts +7 -0
  577. package/lib/typescript/ai-components/store/index.d.ts.map +1 -0
  578. package/lib/typescript/ai-components/syntax-highlighting/SyntaxHighlighter.d.ts +11 -0
  579. package/lib/typescript/ai-components/syntax-highlighting/SyntaxHighlighter.d.ts.map +1 -0
  580. package/lib/typescript/ai-components/syntax-highlighting/components/AndroidNativeRenderer.d.ts +10 -0
  581. package/lib/typescript/ai-components/syntax-highlighting/components/AndroidNativeRenderer.d.ts.map +1 -0
  582. package/lib/typescript/ai-components/syntax-highlighting/components/index.d.ts +2 -0
  583. package/lib/typescript/ai-components/syntax-highlighting/components/index.d.ts.map +1 -0
  584. package/lib/typescript/ai-components/syntax-highlighting/index.d.ts +10 -0
  585. package/lib/typescript/ai-components/syntax-highlighting/index.d.ts.map +1 -0
  586. package/lib/typescript/ai-components/syntax-highlighting/prism-config.d.ts +2 -0
  587. package/lib/typescript/ai-components/syntax-highlighting/prism-config.d.ts.map +1 -0
  588. package/lib/typescript/ai-components/syntax-highlighting/types.d.ts +21 -0
  589. package/lib/typescript/ai-components/syntax-highlighting/types.d.ts.map +1 -0
  590. package/lib/typescript/ai-components/syntax-highlighting/utils/converter.d.ts +5 -0
  591. package/lib/typescript/ai-components/syntax-highlighting/utils/converter.d.ts.map +1 -0
  592. package/lib/typescript/ai-components/syntax-highlighting/utils/flatten-nodes.d.ts +19 -0
  593. package/lib/typescript/ai-components/syntax-highlighting/utils/flatten-nodes.d.ts.map +1 -0
  594. package/lib/typescript/ai-components/syntax-highlighting/utils/index.d.ts +4 -0
  595. package/lib/typescript/ai-components/syntax-highlighting/utils/index.d.ts.map +1 -0
  596. package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts +30 -0
  597. package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts.map +1 -0
  598. package/lib/typescript/ai-components/theme.d.ts +58 -0
  599. package/lib/typescript/ai-components/theme.d.ts.map +1 -0
  600. package/lib/typescript/ai-components/transcription/useDictation.d.ts +8 -0
  601. package/lib/typescript/ai-components/transcription/useDictation.d.ts.map +1 -0
  602. package/lib/typescript/native.d.ts +17 -1
  603. package/lib/typescript/native.d.ts.map +1 -1
  604. package/package.json +23 -5
  605. package/src/ai-components/AITypingIndicatorView.tsx +51 -0
  606. package/src/ai-components/README.md +279 -0
  607. package/src/ai-components/StreamingMessageView.tsx +85 -0
  608. package/src/ai-components/__tests__/ComposerView.test.tsx +113 -0
  609. package/src/ai-components/__tests__/Markdown.test.tsx +94 -0
  610. package/src/ai-components/__tests__/StreamingMessageView.test.tsx +126 -0
  611. package/src/ai-components/__tests__/SyntaxHighlighter.test.tsx +136 -0
  612. package/src/ai-components/__tests__/charts.test.ts +131 -0
  613. package/src/ai-components/__tests__/dictation.test.tsx +166 -0
  614. package/src/ai-components/__tests__/generateMarkdownText.test.ts +54 -0
  615. package/src/ai-components/__tests__/theme.test.tsx +41 -0
  616. package/src/ai-components/charts/Chart.tsx +20 -0
  617. package/src/ai-components/charts/components/PieLegend.tsx +50 -0
  618. package/src/ai-components/charts/components/VictoryChart.tsx +193 -0
  619. package/src/ai-components/charts/components/index.ts +2 -0
  620. package/src/ai-components/charts/index.ts +13 -0
  621. package/src/ai-components/charts/mermaid/index.ts +1 -0
  622. package/src/ai-components/charts/mermaid/parser.ts +33 -0
  623. package/src/ai-components/charts/types.ts +25 -0
  624. package/src/ai-components/charts/utils/generate-pie-colors.ts +82 -0
  625. package/src/ai-components/charts/utils/index.ts +2 -0
  626. package/src/ai-components/charts/utils/parse-json-chart.ts +15 -0
  627. package/src/ai-components/charts/vega-lite/index.ts +2 -0
  628. package/src/ai-components/charts/vega-lite/parser.ts +49 -0
  629. package/src/ai-components/charts/vega-lite/schema.ts +112 -0
  630. package/src/ai-components/components/BottomSheet.tsx +158 -0
  631. package/src/ai-components/components/MarkdownReactiveScrollView.tsx +92 -0
  632. package/src/ai-components/components/index.ts +2 -0
  633. package/src/ai-components/contexts/composer-context.tsx +73 -0
  634. package/src/ai-components/contexts/index.ts +2 -0
  635. package/src/ai-components/contexts/theme-context.tsx +68 -0
  636. package/src/ai-components/index.ts +29 -0
  637. package/src/ai-components/internal/hooks/useStableCallback.ts +37 -0
  638. package/src/ai-components/internal/icons/Camera.tsx +12 -0
  639. package/src/ai-components/internal/icons/CircleStop.tsx +18 -0
  640. package/src/ai-components/internal/icons/Close.tsx +12 -0
  641. package/src/ai-components/internal/icons/Mic.tsx +20 -0
  642. package/src/ai-components/internal/icons/Picture.tsx +16 -0
  643. package/src/ai-components/internal/icons/SendUp.tsx +21 -0
  644. package/src/ai-components/internal/icons/utils/base.tsx +44 -0
  645. package/src/ai-components/markdown/components/Autolink.tsx +26 -0
  646. package/src/ai-components/markdown/components/BlockQuote.tsx +19 -0
  647. package/src/ai-components/markdown/components/Bold.tsx +16 -0
  648. package/src/ai-components/markdown/components/CodeBlock.tsx +96 -0
  649. package/src/ai-components/markdown/components/Emphasis.tsx +16 -0
  650. package/src/ai-components/markdown/components/Heading.tsx +30 -0
  651. package/src/ai-components/markdown/components/HorizontalRule.tsx +9 -0
  652. package/src/ai-components/markdown/components/InlineCode.tsx +16 -0
  653. package/src/ai-components/markdown/components/LineBreak.tsx +11 -0
  654. package/src/ai-components/markdown/components/Link.tsx +28 -0
  655. package/src/ai-components/markdown/components/List.tsx +65 -0
  656. package/src/ai-components/markdown/components/Mailto.tsx +26 -0
  657. package/src/ai-components/markdown/components/Markdown.tsx +59 -0
  658. package/src/ai-components/markdown/components/NewLine.tsx +11 -0
  659. package/src/ai-components/markdown/components/Paragraph.tsx +69 -0
  660. package/src/ai-components/markdown/components/Strikethrough.tsx +16 -0
  661. package/src/ai-components/markdown/components/Table.tsx +81 -0
  662. package/src/ai-components/markdown/components/Text.tsx +37 -0
  663. package/src/ai-components/markdown/components/Url.tsx +26 -0
  664. package/src/ai-components/markdown/components/index.ts +20 -0
  665. package/src/ai-components/markdown/index.tsx +5 -0
  666. package/src/ai-components/markdown/rules.ts +216 -0
  667. package/src/ai-components/markdown/styles.ts +236 -0
  668. package/src/ai-components/markdown/types.ts +163 -0
  669. package/src/ai-components/markdown/utils/generate-markdown-text.ts +117 -0
  670. package/src/ai-components/markdown/utils/index.ts +1 -0
  671. package/src/ai-components/message-composer/ActionButton.tsx +99 -0
  672. package/src/ai-components/message-composer/ActionSheet.tsx +205 -0
  673. package/src/ai-components/message-composer/AttachmentButton.tsx +49 -0
  674. package/src/ai-components/message-composer/ComposerView.tsx +187 -0
  675. package/src/ai-components/message-composer/MediaPreviewList.tsx +84 -0
  676. package/src/ai-components/message-composer/SpeechToTextButton.tsx +79 -0
  677. package/src/ai-components/message-composer/index.ts +5 -0
  678. package/src/ai-components/message-composer/utils/withCloseSheet.ts +11 -0
  679. package/src/ai-components/native/AIDictation.ts +77 -0
  680. package/src/ai-components/native/PerfText.tsx +32 -0
  681. package/src/ai-components/native-specs/NativeAIDictation.ts +48 -0
  682. package/src/ai-components/services/clipboard-service/expo.ts +11 -0
  683. package/src/ai-components/services/clipboard-service/index.ts +4 -0
  684. package/src/ai-components/services/clipboard-service/rncli.ts +11 -0
  685. package/src/ai-components/services/index.ts +2 -0
  686. package/src/ai-components/services/media-picker-service/AbstractMediaPickerService.ts +62 -0
  687. package/src/ai-components/services/media-picker-service/expo.ts +148 -0
  688. package/src/ai-components/services/media-picker-service/hooks/useMediaPickerState.ts +14 -0
  689. package/src/ai-components/services/media-picker-service/index.ts +4 -0
  690. package/src/ai-components/services/media-picker-service/optional-modules.d.ts +25 -0
  691. package/src/ai-components/services/media-picker-service/rncli.ts +142 -0
  692. package/src/ai-components/store/bottom-sheet/store.ts +30 -0
  693. package/src/ai-components/store/bottom-sheet/useBottomSheetState.ts +10 -0
  694. package/src/ai-components/store/composer/store.ts +12 -0
  695. package/src/ai-components/store/composer/useComposerHasText.ts +14 -0
  696. package/src/ai-components/store/composer/useComposerText.ts +14 -0
  697. package/src/ai-components/store/dictation/store.ts +23 -0
  698. package/src/ai-components/store/dictation/useDictationState.ts +11 -0
  699. package/src/ai-components/store/dictation/useDictationTranscript.ts +9 -0
  700. package/src/ai-components/store/index.ts +11 -0
  701. package/src/ai-components/syntax-highlighting/SyntaxHighlighter.tsx +66 -0
  702. package/src/ai-components/syntax-highlighting/components/AndroidNativeRenderer.tsx +29 -0
  703. package/src/ai-components/syntax-highlighting/components/index.ts +1 -0
  704. package/src/ai-components/syntax-highlighting/index.ts +11 -0
  705. package/src/ai-components/syntax-highlighting/prism-config.ts +4 -0
  706. package/src/ai-components/syntax-highlighting/types.ts +26 -0
  707. package/src/ai-components/syntax-highlighting/utils/converter.ts +145 -0
  708. package/src/ai-components/syntax-highlighting/utils/flatten-nodes.ts +150 -0
  709. package/src/ai-components/syntax-highlighting/utils/index.ts +3 -0
  710. package/src/ai-components/syntax-highlighting/utils/renderer.tsx +151 -0
  711. package/src/ai-components/theme.ts +138 -0
  712. package/src/ai-components/transcription/useDictation.ts +106 -0
  713. package/src/native.ts +19 -1
  714. package/src/version.json +1 -1
@@ -0,0 +1,82 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.VegaLiteSchema = exports.VegaLiteCore = exports.VLType = void 0;
5
+ var _zod = require("zod");
6
+ var VLType = exports.VLType = _zod.z.enum(['quantitative', 'ordinal', 'nominal', 'temporal']);
7
+ var FieldRef = _zod.z.object({
8
+ field: _zod.z.string(),
9
+ type: VLType.optional()
10
+ });
11
+ var ColorXY = _zod.z.object({
12
+ field: _zod.z.string().optional(),
13
+ type: VLType.optional()
14
+ });
15
+ var ColorPie = _zod.z.object({
16
+ field: _zod.z.string(),
17
+ type: VLType.optional()
18
+ });
19
+ var MarkName = _zod.z.enum(['bar', 'line', 'area', 'point', 'arc']);
20
+ var MarkDef = _zod.z.looseObject({
21
+ type: _zod.z.union([MarkName, _zod.z.string()]).optional()
22
+ });
23
+ var XyEncoding = _zod.z.object({
24
+ x: FieldRef,
25
+ y: FieldRef,
26
+ color: ColorXY.optional()
27
+ });
28
+ var PieEncoding = _zod.z.object({
29
+ theta: FieldRef,
30
+ color: ColorPie.optional()
31
+ });
32
+ var BaseVL = _zod.z.object({
33
+ archetype: _zod.z.literal('vegalite'),
34
+ $schema: _zod.z.string().optional(),
35
+ data: _zod.z.object({
36
+ values: _zod.z.array(_zod.z.record(_zod.z.string(), _zod.z.unknown()))
37
+ }),
38
+ mark: _zod.z.union([MarkName, MarkDef, _zod.z.string()]).optional(),
39
+ layer: _zod.z.array(_zod.z.looseObject({
40
+ mark: MarkDef
41
+ })).optional(),
42
+ marks: _zod.z.array(MarkDef).optional(),
43
+ markName: MarkName
44
+ });
45
+ var VL_XY = BaseVL.extend({
46
+ type: _zod.z.literal('xy'),
47
+ encoding: XyEncoding
48
+ }).strip();
49
+ var VL_PIE = BaseVL.extend({
50
+ type: _zod.z.literal('pie'),
51
+ encoding: PieEncoding
52
+ }).strip();
53
+ var normalizeMarkName = m => {
54
+ if (typeof m === 'string') return m.toLowerCase();
55
+ if (m && typeof m === 'object' && typeof m.type === 'string') {
56
+ return String(m.type).toLowerCase();
57
+ }
58
+ return undefined;
59
+ };
60
+ var deriveMarkName = o => {
61
+ var _o$layer$;
62
+ var direct = normalizeMarkName(o == null ? void 0 : o.mark);
63
+ if (direct) return direct;
64
+ var firstLayerMark = Array.isArray(o == null ? void 0 : o.layer) && (_o$layer$ = o.layer[0]) != null && _o$layer$.mark ? normalizeMarkName(o.layer[0].mark) : undefined;
65
+ if (firstLayerMark) return firstLayerMark;
66
+ return Array.isArray(o == null ? void 0 : o.marks) && o.marks.length > 0 ? normalizeMarkName(o.marks[0]) : undefined;
67
+ };
68
+ var VegaLiteCore = exports.VegaLiteCore = _zod.z.discriminatedUnion('type', [VL_XY, VL_PIE]);
69
+ var VegaLiteSchema = exports.VegaLiteSchema = _zod.z.preprocess(raw => {
70
+ var _o$encoding;
71
+ var o = raw != null ? raw : {};
72
+ var markName = deriveMarkName(o);
73
+ var hasTheta = !!(o != null && (_o$encoding = o.encoding) != null && _o$encoding.theta);
74
+ var type = markName === 'arc' || hasTheta ? 'pie' : 'xy';
75
+ return {
76
+ ...o,
77
+ type,
78
+ archetype: 'vegalite',
79
+ markName
80
+ };
81
+ }, VegaLiteCore);
82
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_zod","require","VLType","exports","z","enum","FieldRef","object","field","string","type","optional","ColorXY","ColorPie","MarkName","MarkDef","looseObject","union","XyEncoding","x","y","color","PieEncoding","theta","BaseVL","archetype","literal","$schema","data","values","array","record","unknown","mark","layer","marks","markName","VL_XY","extend","encoding","strip","VL_PIE","normalizeMarkName","m","toLowerCase","String","undefined","deriveMarkName","o","_o$layer$","direct","firstLayerMark","Array","isArray","length","VegaLiteCore","discriminatedUnion","VegaLiteSchema","preprocess","raw","_o$encoding","hasTheta"],"sourceRoot":"../../../../../src","sources":["ai-components/charts/vega-lite/schema.ts"],"mappings":";;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAGO,IA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AA,GAAGrD,MAAC,CAACsD,UAAU,CAAEC,GAAG,IAAK;EAAA,IAAAC,WAAA;EAElD,IAAMZ,CAAM,GAAGW,GAAG,WAAHA,GAAG,GAAI,CAAC,CAAC;EACxB,IAAMvB,QAAQ,GAAGW,cAAc,CAACC,CAAC,CAAC;EAClC,IAAMa,QAAQ,GAAG,CAAC,EAACb,CAAC,aAAAY,WAAA,GAADZ,CAAC,CAAET,QAAQ,aAAXqB,WAAA,CAAarC,KAAK;EAErC,IAAMb,IAAI,GAAG0B,QAAQ,KAAK,KAAK,IAAIyB,QAAQ,GAAG,KAAK,GAAG,IAAI;EAE1D,OAAO;IAAE,GAAGb,CAAC;IAAEtC,IAAI;IAAEe,SAAS,EAAE,UAAU;IAAEW;EAAS,CAAC;AACxD,CAAC,EAAEmB,YAAY,CAAC","ignoreList":[]}
@@ -0,0 +1,182 @@
1
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ exports.BottomSheet = BottomSheet;
6
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeGestureHandler = require("react-native-gesture-handler");
10
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
11
+ var _store = require("../store");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/components/BottomSheet.tsx";
14
+ 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 (var _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); }
15
+ var _Dimensions$get = _reactNative.Dimensions.get('window'),
16
+ SCREEN_H = _Dimensions$get.height;
17
+ var SPRING = {
18
+ duration: 200
19
+ };
20
+ var MAX_BOTTOM_SHEET_HEIGHT = Math.round(SCREEN_H * 0.4);
21
+ var BACKDROP_OPACITY = 0.4;
22
+ function BottomSheet({
23
+ children
24
+ }) {
25
+ var _useBottomSheetState = (0, _store.useBottomSheetState)(),
26
+ open = _useBottomSheetState.open,
27
+ height = _useBottomSheetState.height;
28
+ var _useState = (0, _react.useState)(open),
29
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
30
+ bottomSheetModalOpen = _useState2[0],
31
+ setBottomSheetModalOpen = _useState2[1];
32
+ var maxTranslateY = SCREEN_H;
33
+ var translateY = (0, _reactNativeReanimated.useSharedValue)(maxTranslateY);
34
+ var bottomSheetHeight = (0, _react.useMemo)(() => Math.min(height, MAX_BOTTOM_SHEET_HEIGHT), [height]);
35
+ var bottomSheetY = SCREEN_H - bottomSheetHeight;
36
+ (0, _react.useEffect)(() => {
37
+ if (open) {
38
+ setBottomSheetModalOpen(true);
39
+ } else {
40
+ translateY.value = (0, _reactNativeReanimated.withTiming)(maxTranslateY, SPRING, finished => {
41
+ if (finished) {
42
+ (0, _reactNativeReanimated.runOnJS)(setBottomSheetModalOpen)(false);
43
+ }
44
+ });
45
+ }
46
+ }, [setBottomSheetModalOpen, maxTranslateY, open, translateY]);
47
+ (0, _react.useEffect)(() => {
48
+ if (bottomSheetModalOpen && open) {
49
+ translateY.value = (0, _reactNativeReanimated.withTiming)(bottomSheetY, SPRING);
50
+ }
51
+ }, [open, bottomSheetModalOpen, bottomSheetY, translateY]);
52
+ var dragStartY = (0, _react.useRef)(0);
53
+ var panRef = (0, _react.useRef)(undefined);
54
+ var scrollRef = (0, _react.useRef)(undefined);
55
+ var nativeScroll = (0, _react.useMemo)(() => _reactNativeGestureHandler.Gesture.Native().withRef(scrollRef), []);
56
+ var pan = _reactNativeGestureHandler.Gesture.Pan().withRef(panRef).requireExternalGestureToFail(scrollRef).onBegin(() => {
57
+ dragStartY.current = 0;
58
+ }).onUpdate(e => {
59
+ if (dragStartY.current === 0) dragStartY.current = translateY.value;
60
+ var next = dragStartY.current + e.translationY;
61
+ var minY = bottomSheetY;
62
+ var maxY = maxTranslateY;
63
+ var overTop = next < minY;
64
+ var overBottom = next > maxY;
65
+ translateY.value = overTop ? minY - (minY - next) * 0.2 : overBottom ? maxY + (next - maxY) * 0.2 : next;
66
+ }).onEnd(e => {
67
+ var projected = e.translationY + e.velocityY * 0.15;
68
+ var nearest = projected >= bottomSheetHeight * 0.5 ? maxTranslateY : bottomSheetY;
69
+ translateY.value = (0, _reactNativeReanimated.withTiming)(nearest, SPRING, finished => {
70
+ if (finished && nearest === maxTranslateY) (0, _reactNativeReanimated.runOnJS)(_store.sheetStoreApi.closeSheet)();
71
+ });
72
+ });
73
+ var backdropStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
74
+ var minY = bottomSheetY;
75
+ var t = 1 - Math.min(1, Math.max(0, (translateY.value - minY) / (maxTranslateY - minY)));
76
+ return {
77
+ opacity: t * BACKDROP_OPACITY,
78
+ pointerEvents: t > 0.02 ? 'auto' : 'none'
79
+ };
80
+ });
81
+ var sheetStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
82
+ transform: [{
83
+ translateY: translateY.value
84
+ }]
85
+ }));
86
+ var sheetContentStyle = (0, _react.useMemo)(() => ({
87
+ height: bottomSheetHeight
88
+ }), [bottomSheetHeight]);
89
+ return (0, _jsxRuntime.jsx)(_reactNative.Modal, {
90
+ visible: bottomSheetModalOpen,
91
+ transparent: true,
92
+ children: (0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, {
93
+ style: styles.gestureHandlerRootView,
94
+ children: (0, _jsxRuntime.jsxs)(_reactNative.View, {
95
+ style: _reactNative.StyleSheet.absoluteFill,
96
+ pointerEvents: 'box-none',
97
+ children: [(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
98
+ style: [_reactNative.StyleSheet.absoluteFill, styles.backdrop, backdropStyle],
99
+ children: (0, _jsxRuntime.jsx)(_reactNative.Pressable, {
100
+ style: _reactNative.StyleSheet.absoluteFill,
101
+ onPress: _store.sheetStoreApi.closeSheet
102
+ })
103
+ }), (0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
104
+ gesture: pan,
105
+ children: (0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
106
+ style: [styles.sheet, sheetStyle],
107
+ children: [(0, _jsxRuntime.jsx)(_reactNative.View, {
108
+ style: styles.handleContainer,
109
+ pointerEvents: 'none',
110
+ children: (0, _jsxRuntime.jsx)(_reactNative.View, {
111
+ style: styles.handle
112
+ })
113
+ }), (0, _jsxRuntime.jsx)(_reactNative.View, {
114
+ style: [styles.content, sheetContentStyle],
115
+ children: (0, _jsxRuntime.jsx)(_reactNative.View, {
116
+ style: styles.contentContainer,
117
+ children: open ? (0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
118
+ gesture: nativeScroll,
119
+ children: children
120
+ }) : null
121
+ })
122
+ })]
123
+ })
124
+ })]
125
+ })
126
+ })
127
+ });
128
+ }
129
+ var styles = _reactNative.StyleSheet.create({
130
+ gestureHandlerRootView: {
131
+ flex: 1
132
+ },
133
+ backdrop: {
134
+ backgroundColor: '#000'
135
+ },
136
+ sheet: {
137
+ position: 'absolute',
138
+ overflow: 'hidden',
139
+ left: 0,
140
+ right: 0,
141
+ top: 0,
142
+ height: SCREEN_H,
143
+ transform: [{
144
+ translateY: SCREEN_H
145
+ }],
146
+ borderTopLeftRadius: 20,
147
+ borderTopRightRadius: 20,
148
+ backgroundColor: 'white',
149
+ ..._reactNative.Platform.select({
150
+ ios: {
151
+ shadowColor: '#000',
152
+ shadowOpacity: 0.2,
153
+ shadowOffset: {
154
+ width: 0,
155
+ height: -4
156
+ },
157
+ shadowRadius: 12
158
+ },
159
+ android: {
160
+ elevation: 18
161
+ }
162
+ })
163
+ },
164
+ handleContainer: {
165
+ alignItems: 'center',
166
+ paddingVertical: 8
167
+ },
168
+ handle: {
169
+ width: 40,
170
+ height: 4,
171
+ borderRadius: 2,
172
+ backgroundColor: '#444'
173
+ },
174
+ content: {
175
+ flexGrow: 0
176
+ },
177
+ contentContainer: {
178
+ flex: 1,
179
+ minHeight: 0
180
+ }
181
+ });
182
+ //# sourceMappingURL=BottomSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_store","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_Dimensions$get","Dimensions","SCREEN_H","height","SPRING","duration","MAX_BOTTOM_SHEET_HEIGHT","Math","round","BACKDROP_OPACITY","BottomSheet","children","_useBottomSheetState","useBottomSheetState","open","_useState","useState","_useState2","_slicedToArray2","bottomSheetModalOpen","setBottomSheetModalOpen","maxTranslateY","translateY","useSharedValue","bottomSheetHeight","useMemo","min","bottomSheetY","useEffect","value","withTiming","finished","runOnJS","dragStartY","useRef","panRef","undefined","scrollRef","nativeScroll","Gesture","Native","withRef","pan","Pan","requireExternalGestureToFail","onBegin","current","onUpdate","next","translationY","minY","maxY","overTop","overBottom","onEnd","projected","velocityY","nearest","sheetStoreApi","closeSheet","backdropStyle","useAnimatedStyle","max","opacity","pointerEvents","sheetStyle","transform","sheetContentStyle","jsx","Modal","visible","transparent","GestureHandlerRootView","style","styles","gestureHandlerRootView","jsxs","View","StyleSheet","absoluteFill","backdrop","Pressable","onPress","GestureDetector","gesture","sheet","handleContainer","handle","content","contentContainer","create","flex","backgroundColor","position","overflow","left","right","top","borderTopLeftRadius","borderTopRightRadius","Platform","select","ios","shadowColor","shadowOpacity","shadowOffset","width","shadowRadius","android","elevation","alignItems","paddingVertical","borderRadius","flexGrow","minHeight"],"sourceRoot":"../../../../src","sources":["ai-components/components/BottomSheet.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AAMA,IAAAG,sBAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAOA,IAAAI,MAAA,GAAAJ,OAAA;AAA8D,IAAAK,WAAA,GAAAL,OAAA;AAAA,IAAAM,YAAA;AAAA,SAAAP,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,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,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,EAAAc,EAAA,OAAAP,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,C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,CAAC,CAAC;IACrCgG,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBP,eAAe,EAAE,OAAO;IACxB,GAAGQ,qBAAQ,CAACC,MAAM,CAAC;MACjBC,GAAG,EAAE;QACHC,WAAW,EAAE,MAAM;QACnBC,aAAa,EAAE,GAAG;QAClBC,YAAY,EAAE;UAAEC,KAAK,EAAE,CAAC;UAAEvG,MAAM,EAAE,CAAC;QAAE,CAAC;QACtCwG,YAAY,EAAE;MAChB,CAAC;MACDC,OAAO,EAAE;QAAEC,SAAS,EAAE;MAAG;IAC3B,CAAC;EACH,CAAC;EACDvB,eAAe,EAAE;IAAEwB,UAAU,EAAE,QAAQ;IAAEC,eAAe,EAAE;EAAE,CAAC;EAC7DxB,MAAM,EAAE;IAAEmB,KAAK,EAAE,EAAE;IAAEvG,MAAM,EAAE,CAAC;IAAE6G,YAAY,EAAE,CAAC;IAAEpB,eAAe,EAAE;EAAO,CAAC;EAC1EJ,OAAO,EAAE;IAAEyB,QAAQ,EAAE;EAAE,CAAC;EACxBxB,gBAAgB,EAAE;IAAEE,IAAI,EAAE,CAAC;IAAEuB,SAAS,EAAE;EAAE;AAC5C,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,81 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.MarkdownReactiveScrollView = void 0;
5
+ var _react = require("react");
6
+ var _reactNative = require("react-native");
7
+ var _reactNativeGestureHandler = require("react-native-gesture-handler");
8
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
9
+ var _useStableCallback = require("../internal/hooks/useStableCallback");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/components/MarkdownReactiveScrollView.tsx";
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 (var _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
+ var MarkdownReactiveScrollView = ({
14
+ children
15
+ }) => {
16
+ var scrollViewRef = (0, _reactNativeReanimated.useAnimatedRef)();
17
+ var contentWidth = (0, _reactNativeReanimated.useSharedValue)(0);
18
+ var visibleContentWidth = (0, _reactNativeReanimated.useSharedValue)(0);
19
+ var offsetBeforeScroll = (0, _reactNativeReanimated.useSharedValue)(0);
20
+ var touchStart = (0, _reactNativeReanimated.useSharedValue)(null);
21
+ var panGesture = (0, _react.useMemo)(() => _reactNativeGestureHandler.Gesture.Pan().onBegin(event => {
22
+ touchStart.value = {
23
+ x: event.x,
24
+ y: event.y
25
+ };
26
+ }).onTouchesMove((event, state) => {
27
+ if (!touchStart.value || !event.changedTouches.length) {
28
+ state.fail();
29
+ return;
30
+ }
31
+ var xDiff = Math.abs(event.changedTouches[0].x - touchStart.value.x);
32
+ var yDiff = Math.abs(event.changedTouches[0].y - touchStart.value.y);
33
+ var isHorizontalPanning = xDiff > yDiff;
34
+ if (isHorizontalPanning) {
35
+ state.activate();
36
+ } else {
37
+ state.fail();
38
+ }
39
+ }).onUpdate(event => {
40
+ var translationX = event.translationX;
41
+ (0, _reactNativeReanimated.scrollTo)(scrollViewRef, offsetBeforeScroll.value - translationX, 0, false);
42
+ }).onEnd(event => {
43
+ var translationX = event.translationX;
44
+ var velocityEffect = event.velocityX * 0.3;
45
+ var finalPosition = (0, _reactNativeReanimated.clamp)(offsetBeforeScroll.value - translationX - velocityEffect, 0, contentWidth.value - visibleContentWidth.value);
46
+ offsetBeforeScroll.value = finalPosition;
47
+ (0, _reactNativeReanimated.scrollTo)(scrollViewRef, finalPosition, 0, true);
48
+ }), [contentWidth, offsetBeforeScroll, scrollViewRef, touchStart, visibleContentWidth]);
49
+ var onContentSizeChange = (0, _useStableCallback.useStableCallback)(width => {
50
+ contentWidth.value = width;
51
+ });
52
+ var onLayout = (0, _useStableCallback.useStableCallback)(event => {
53
+ visibleContentWidth.value = event.nativeEvent.layout.width;
54
+ });
55
+ return (0, _jsxRuntime.jsx)(_reactNative.View, {
56
+ style: styles.wrapper,
57
+ children: (0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
58
+ gesture: panGesture,
59
+ children: (0, _jsxRuntime.jsx)(_reactNativeReanimated.default.ScrollView, {
60
+ contentContainerStyle: styles.contentContainer,
61
+ horizontal: true,
62
+ nestedScrollEnabled: true,
63
+ onContentSizeChange: onContentSizeChange,
64
+ onLayout: onLayout,
65
+ ref: scrollViewRef,
66
+ scrollEnabled: false,
67
+ children: children
68
+ })
69
+ })
70
+ });
71
+ };
72
+ exports.MarkdownReactiveScrollView = MarkdownReactiveScrollView;
73
+ var styles = _reactNative.StyleSheet.create({
74
+ wrapper: {
75
+ width: '100%'
76
+ },
77
+ contentContainer: {
78
+ flexGrow: 1
79
+ }
80
+ });
81
+ //# sourceMappingURL=MarkdownReactiveScrollView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_interopRequireWildcard","_useStableCallback","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MarkdownReactiveScrollView","children","scrollViewRef","useAnimatedRef","contentWidth","useSharedValue","visibleContentWidth","offsetBeforeScroll","touchStart","panGesture","useMemo","Gesture","Pan","onBegin","event","value","x","y","onTouchesMove","state","changedTouches","length","fail","xDiff","Math","abs","yDiff","isHorizontalPanning","activate","onUpdate","translationX","scrollTo","onEnd","velocityEffect","velocityX","finalPosition","clamp","onContentSizeChange","useStableCallback","width","onLayout","nativeEvent","layout","jsx","View","style","styles","wrapper","GestureDetector","gesture","ScrollView","contentContainerStyle","contentContainer","horizontal","nestedScrollEnabled","ref","scrollEnabled","exports","StyleSheet","create","flexGrow"],"sourceRoot":"../../../../src","sources":["ai-components/components/MarkdownReactiveScrollView.tsx"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAL,OAAA;AAAwE,IAAAM,WAAA,GAAAN,OAAA;AAAA,IAAAO,YAAA;AAAA,SAAAH,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,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,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,EAAAc,EAAA,OAAAP,CAAA,C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AACH,KAAK;EAC5D,CAAC,CAAC;EAEF,OACE,IAAA7D,WAAA,CAAAiE,GAAA,EAACtE,YAAA,CAAAuE,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,OAAQ;IAAA9C,QAAA,EAC1B,IAAAvB,WAAA,CAAAiE,GAAA,EAACrE,0BAAA,CAAA0E,eAAe;MAACC,OAAO,EAAExC,UAAW;MAAAR,QAAA,EACnC,IAAAvB,WAAA,CAAAiE,GAAA,EAACpE,sBAAA,CAAAe,OAAQ,CAAC4D,UAAU;QAClBC,qBAAqB,EAAEL,MAAM,CAACM,gBAAiB;QAC/CC,UAAU;QACVC,mBAAmB,EAAE,IAAK;QAC1BjB,mBAAmB,EAAEA,mBAAoB;QACzCG,QAAQ,EAAEA,QAAS;QACnBe,GAAG,EAAErD,aAAc;QACnBsD,aAAa,EAAE,KAAM;QAAAvD,QAAA,EAEpBA;MAAQ,CACU;IAAC,CACP;EAAC,CACd,CAAC;AAEX,CAAC;AAACwD,OAAA,CAAAzD,0BAAA,GAAAA,0BAAA;AAEF,IAAM8C,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BZ,OAAO,EAAE;IACPR,KAAK,EAAE;EACT,CAAC;EACDa,gBAAgB,EAAE;IAAEQ,QAAQ,EAAE;EAAE;AAClC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ var _MarkdownReactiveScrollView = require("./MarkdownReactiveScrollView");
5
+ Object.keys(_MarkdownReactiveScrollView).forEach(function (key) {
6
+ if (key === "default" || key === "__esModule") return;
7
+ if (key in exports && exports[key] === _MarkdownReactiveScrollView[key]) return;
8
+ Object.defineProperty(exports, key, {
9
+ enumerable: true,
10
+ get: function () {
11
+ return _MarkdownReactiveScrollView[key];
12
+ }
13
+ });
14
+ });
15
+ var _PerfText = require("../native/PerfText");
16
+ Object.keys(_PerfText).forEach(function (key) {
17
+ if (key === "default" || key === "__esModule") return;
18
+ if (key in exports && exports[key] === _PerfText[key]) return;
19
+ Object.defineProperty(exports, key, {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _PerfText[key];
23
+ }
24
+ });
25
+ });
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_MarkdownReactiveScrollView","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_PerfText"],"sourceRoot":"../../../../src","sources":["ai-components/components/index.ts"],"mappings":";;;AAAA,IAAAA,2BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,2BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,2BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,2BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,SAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,SAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,SAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,SAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ exports.useMessageComposerContext = exports.ComposerProvider = exports.ComposerContext = void 0;
6
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
7
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _useStableCallback = require("../internal/hooks/useStableCallback");
10
+ var _services = require("../services");
11
+ var _store = require("../store");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/contexts/composer-context.tsx";
14
+ 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 (var _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); }
15
+ var ComposerContext = exports.ComposerContext = _react.default.createContext(undefined);
16
+ var ComposerProvider = ({
17
+ onSendMessage,
18
+ mediaPickerService: mediaPickerServiceOverride,
19
+ state: stateOverride,
20
+ children
21
+ }) => {
22
+ var _useState = (0, _react.useState)(() => mediaPickerServiceOverride != null ? mediaPickerServiceOverride : _services.MediaPickerService ? new _services.MediaPickerService() : undefined),
23
+ _useState2 = (0, _slicedToArray2.default)(_useState, 1),
24
+ mediaPickerService = _useState2[0];
25
+ var _useState3 = (0, _react.useState)(() => stateOverride != null ? stateOverride : (0, _store.createNewComposerStore)()),
26
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 1),
27
+ state = _useState4[0];
28
+ var setText = (0, _useStableCallback.useStableCallback)(text => state.partialNext({
29
+ text
30
+ }));
31
+ var clearState = (0, _useStableCallback.useStableCallback)(() => {
32
+ setText('');
33
+ mediaPickerService == null || mediaPickerService.clearAssets();
34
+ });
35
+ var sendMessage = (0, _useStableCallback.useStableCallback)((0, _asyncToGenerator2.default)(function* () {
36
+ var _state$getLatestValue = state.getLatestValue(),
37
+ text = _state$getLatestValue.text,
38
+ custom = _state$getLatestValue.custom;
39
+ var data = {
40
+ text,
41
+ attachments: mediaPickerService == null ? void 0 : mediaPickerService.state.getLatestValue().assets,
42
+ custom
43
+ };
44
+ clearState();
45
+ yield onSendMessage(data);
46
+ }));
47
+ var contextValue = (0, _react.useMemo)(() => ({
48
+ mediaPickerService,
49
+ state,
50
+ setText,
51
+ sendMessage,
52
+ clearState
53
+ }), [state, mediaPickerService, setText, sendMessage, clearState]);
54
+ return (0, _jsxRuntime.jsx)(ComposerContext.Provider, {
55
+ value: contextValue,
56
+ children: children
57
+ });
58
+ };
59
+ exports.ComposerProvider = ComposerProvider;
60
+ var useMessageComposerContext = () => {
61
+ var value = _react.default.useContext(ComposerContext);
62
+ if (value === undefined) {
63
+ throw new Error('The useMessageComposerContext hook was called outside of the ComposerContext provider.');
64
+ }
65
+ return value;
66
+ };
67
+ exports.useMessageComposerContext = useMessageComposerContext;
68
+ //# sourceMappingURL=composer-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_useStableCallback","_services","_store","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ComposerContext","exports","React","createContext","undefined","ComposerProvider","onSendMessage","mediaPickerService","mediaPickerServiceOverride","state","stateOverride","children","_useState","useState","MediaPickerService","_useState2","_slicedToArray2","_useState3","createNewComposerStore","_useState4","setText","useStableCallback","text","partialNext","clearState","clearAssets","sendMessage","_asyncToGenerator2","_state$getLatestValue","getLatestValue","custom","data","attachments","assets","contextValue","useMemo","jsx","Provider","value","useMessageComposerContext","useContext","Error"],"sourceRoot":"../../../../src","sources":["ai-components/contexts/composer-context.tsx"],"mappings":";;;;;;;AA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AEDN,UAAU,CAAC,CAAC;IAEZ,MAAMlB,aAAa,CAACyB,IAAI,CAAC;EAC3B,CAAC,EAAC;EAEF,IAAMG,YAAY,GAAG,IAAAC,cAAO,EAC1B,OAAO;IAAE5B,kBAAkB;IAAEE,KAAK;IAAEW,OAAO;IAAEM,WAAW;IAAEF;EAAW,CAAC,CAAC,EACvE,CAACf,KAAK,EAAEF,kBAAkB,EAAEa,OAAO,EAAEM,WAAW,EAAEF,UAAU,CAC9D,CAAC;EAED,OAAO,IAAA9C,WAAA,CAAA0D,GAAA,EAACpC,eAAe,CAACqC,QAAQ;IAACC,KAAK,EAAEJ,YAAa;IAAAvB,QAAA,EAAEA;EAAQ,CAA2B,CAAC;AAC7F,CAAC;AAACV,OAAA,CAAAI,gBAAA,GAAAA,gBAAA;AAEK,IAAMkC,yBAAyB,GAAGA,CAAA,KAAM;EAC7C,IAAMD,KAAK,GAAGpC,cAAK,CAACsC,UAAU,CAACxC,eAAe,CAAC;EAC/C,IAAIsC,KAAK,KAAKlC,SAAS,EAAE;IACvB,MAAM,IAAIqC,KAAK,CACb,wFACF,CAAC;EACH;EAEA,OAAOH,KAAK;AACd,CAAC;AAACrC,OAAA,CAAAsC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ var _composerContext = require("./composer-context");
5
+ Object.keys(_composerContext).forEach(function (key) {
6
+ if (key === "default" || key === "__esModule") return;
7
+ if (key in exports && exports[key] === _composerContext[key]) return;
8
+ Object.defineProperty(exports, key, {
9
+ enumerable: true,
10
+ get: function () {
11
+ return _composerContext[key];
12
+ }
13
+ });
14
+ });
15
+ var _themeContext = require("./theme-context");
16
+ Object.keys(_themeContext).forEach(function (key) {
17
+ if (key === "default" || key === "__esModule") return;
18
+ if (key in exports && exports[key] === _themeContext[key]) return;
19
+ Object.defineProperty(exports, key, {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _themeContext[key];
23
+ }
24
+ });
25
+ });
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_composerContext","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_themeContext"],"sourceRoot":"../../../../src","sources":["ai-components/contexts/index.ts"],"mappings":";;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,aAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,aAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,aAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,aAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ exports.useTheme = exports.mergeThemes = exports.ThemeContext = exports.StreamTheme = void 0;
6
+ var _react = _interopRequireWildcard(require("react"));
7
+ var _merge = _interopRequireDefault(require("lodash/merge"));
8
+ var _theme = require("../theme");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/contexts/theme-context.tsx";
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 (var _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
+ var mergeThemes = params => {
13
+ var style = params.style,
14
+ theme = params.theme;
15
+ var finalTheme = !theme || Object.keys(theme).length === 0 ? JSON.parse(JSON.stringify(_theme.defaultTheme)) : JSON.parse(JSON.stringify(theme));
16
+ if (style) {
17
+ (0, _merge.default)(finalTheme, style);
18
+ }
19
+ return finalTheme;
20
+ };
21
+ exports.mergeThemes = mergeThemes;
22
+ var ThemeContext = exports.ThemeContext = (0, _react.createContext)(undefined);
23
+ var StreamTheme = props => {
24
+ var children = props.children,
25
+ mergedStyle = props.mergedStyle,
26
+ style = props.style,
27
+ theme = props.theme;
28
+ var modifiedTheme = (0, _react.useMemo)(() => {
29
+ if (mergedStyle) {
30
+ return mergedStyle;
31
+ }
32
+ return mergeThemes({
33
+ style,
34
+ theme
35
+ });
36
+ }, [mergedStyle, style, theme]);
37
+ return (0, _jsxRuntime.jsx)(ThemeContext.Provider, {
38
+ value: modifiedTheme,
39
+ children: children
40
+ });
41
+ };
42
+ exports.StreamTheme = StreamTheme;
43
+ var useTheme = () => {
44
+ var theme = (0, _react.useContext)(ThemeContext);
45
+ if (theme === undefined) {
46
+ throw new Error('The useTheme hook was called outside the StreamTheme Provider.');
47
+ }
48
+ return {
49
+ theme
50
+ };
51
+ };
52
+ exports.useTheme = useTheme;
53
+ //# sourceMappingURL=theme-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_merge","_interopRequireDefault","_theme","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","mergeThemes","params","style","theme","finalTheme","keys","length","JSON","parse","stringify","defaultTheme","merge","exports","ThemeContext","createContext","undefined","StreamTheme","props","children","mergedStyle","modifiedTheme","useMemo","jsx","Provider","value","useTheme","useContext","Error"],"sourceRoot":"../../../../src","sources":["ai-components/contexts/theme-context.tsx"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAAoD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,IAAAK,YAAA;AAAA,SAAAN,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,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,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAA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