@docyrus/rn-assistant 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/README.md +477 -0
  2. package/dist/commonjs/components/agent-selector/agent-selector.js +300 -0
  3. package/dist/commonjs/components/agent-selector/agent-selector.js.map +1 -0
  4. package/dist/commonjs/components/agent-selector/index.js +17 -0
  5. package/dist/commonjs/components/agent-selector/index.js.map +1 -0
  6. package/dist/commonjs/components/assistant-animations/assistant-animations.js +169 -0
  7. package/dist/commonjs/components/assistant-animations/assistant-animations.js.map +1 -0
  8. package/dist/commonjs/components/assistant-animations/index.js +17 -0
  9. package/dist/commonjs/components/assistant-animations/index.js.map +1 -0
  10. package/dist/commonjs/components/assistant-screen/assistant-screen.js +809 -0
  11. package/dist/commonjs/components/assistant-screen/assistant-screen.js.map +1 -0
  12. package/dist/commonjs/components/assistant-screen/index.js +17 -0
  13. package/dist/commonjs/components/assistant-screen/index.js.map +1 -0
  14. package/dist/commonjs/components/index.js +116 -0
  15. package/dist/commonjs/components/index.js.map +1 -0
  16. package/dist/commonjs/components/message-parts/index.js +13 -0
  17. package/dist/commonjs/components/message-parts/index.js.map +1 -0
  18. package/dist/commonjs/components/message-parts/message-parts.js +209 -0
  19. package/dist/commonjs/components/message-parts/message-parts.js.map +1 -0
  20. package/dist/commonjs/components/new-chat/index.js +17 -0
  21. package/dist/commonjs/components/new-chat/index.js.map +1 -0
  22. package/dist/commonjs/components/new-chat/new-chat.js +100 -0
  23. package/dist/commonjs/components/new-chat/new-chat.js.map +1 -0
  24. package/dist/commonjs/components/prompt-input/attachment-picker.js +341 -0
  25. package/dist/commonjs/components/prompt-input/attachment-picker.js.map +1 -0
  26. package/dist/commonjs/components/prompt-input/attachment-preview.js +229 -0
  27. package/dist/commonjs/components/prompt-input/attachment-preview.js.map +1 -0
  28. package/dist/commonjs/components/prompt-input/index.js +41 -0
  29. package/dist/commonjs/components/prompt-input/index.js.map +1 -0
  30. package/dist/commonjs/components/prompt-input/prompt-input.js +288 -0
  31. package/dist/commonjs/components/prompt-input/prompt-input.js.map +1 -0
  32. package/dist/commonjs/components/prompt-input/provider-selector.js +542 -0
  33. package/dist/commonjs/components/prompt-input/provider-selector.js.map +1 -0
  34. package/dist/commonjs/components/prompt-input/reasoning-level-selector.js +350 -0
  35. package/dist/commonjs/components/prompt-input/reasoning-level-selector.js.map +1 -0
  36. package/dist/commonjs/components/prompt-input/voice-recorder.js +260 -0
  37. package/dist/commonjs/components/prompt-input/voice-recorder.js.map +1 -0
  38. package/dist/commonjs/components/sessions-list/index.js +17 -0
  39. package/dist/commonjs/components/sessions-list/index.js.map +1 -0
  40. package/dist/commonjs/components/sessions-list/sessions-list.js +820 -0
  41. package/dist/commonjs/components/sessions-list/sessions-list.js.map +1 -0
  42. package/dist/commonjs/hooks/index.js +34 -0
  43. package/dist/commonjs/hooks/index.js.map +1 -0
  44. package/dist/commonjs/hooks/use-agent-models.js +104 -0
  45. package/dist/commonjs/hooks/use-agent-models.js.map +1 -0
  46. package/dist/commonjs/hooks/use-assistant.js +402 -0
  47. package/dist/commonjs/hooks/use-assistant.js.map +1 -0
  48. package/dist/commonjs/hooks/use-attachment-picker.js +308 -0
  49. package/dist/commonjs/hooks/use-attachment-picker.js.map +1 -0
  50. package/dist/commonjs/hooks/use-voice-recorder.js +217 -0
  51. package/dist/commonjs/hooks/use-voice-recorder.js.map +1 -0
  52. package/dist/commonjs/index.js +112 -0
  53. package/dist/commonjs/index.js.map +1 -0
  54. package/dist/commonjs/package.json +1 -0
  55. package/dist/commonjs/theme/assistant-theme.js +105 -0
  56. package/dist/commonjs/theme/assistant-theme.js.map +1 -0
  57. package/dist/commonjs/theme/index.js +19 -0
  58. package/dist/commonjs/theme/index.js.map +1 -0
  59. package/dist/commonjs/types/index.js +2 -0
  60. package/dist/commonjs/types/index.js.map +1 -0
  61. package/dist/commonjs/ui/action-sheet.js +348 -0
  62. package/dist/commonjs/ui/action-sheet.js.map +1 -0
  63. package/dist/commonjs/ui/alert-dialog.js +134 -0
  64. package/dist/commonjs/ui/alert-dialog.js.map +1 -0
  65. package/dist/commonjs/ui/docyrus-brand-mark.js +52 -0
  66. package/dist/commonjs/ui/docyrus-brand-mark.js.map +1 -0
  67. package/dist/commonjs/ui/docyrus-icon.js +298 -0
  68. package/dist/commonjs/ui/docyrus-icon.js.map +1 -0
  69. package/dist/commonjs/ui/index.js +34 -0
  70. package/dist/commonjs/ui/index.js.map +1 -0
  71. package/dist/commonjs/utils/api-client.js +99 -0
  72. package/dist/commonjs/utils/api-client.js.map +1 -0
  73. package/dist/commonjs/utils/default-api-config.js +195 -0
  74. package/dist/commonjs/utils/default-api-config.js.map +1 -0
  75. package/dist/commonjs/utils/index.js +39 -0
  76. package/dist/commonjs/utils/index.js.map +1 -0
  77. package/dist/commonjs/utils/resolve-api-headers.js +16 -0
  78. package/dist/commonjs/utils/resolve-api-headers.js.map +1 -0
  79. package/dist/module/components/agent-selector/agent-selector.js +296 -0
  80. package/dist/module/components/agent-selector/agent-selector.js.map +1 -0
  81. package/dist/module/components/agent-selector/index.js +4 -0
  82. package/dist/module/components/agent-selector/index.js.map +1 -0
  83. package/dist/module/components/assistant-animations/assistant-animations.js +164 -0
  84. package/dist/module/components/assistant-animations/assistant-animations.js.map +1 -0
  85. package/dist/module/components/assistant-animations/index.js +4 -0
  86. package/dist/module/components/assistant-animations/index.js.map +1 -0
  87. package/dist/module/components/assistant-screen/assistant-screen.js +801 -0
  88. package/dist/module/components/assistant-screen/assistant-screen.js.map +1 -0
  89. package/dist/module/components/assistant-screen/index.js +4 -0
  90. package/dist/module/components/assistant-screen/index.js.map +1 -0
  91. package/dist/module/components/index.js +23 -0
  92. package/dist/module/components/index.js.map +1 -0
  93. package/dist/module/components/message-parts/index.js +4 -0
  94. package/dist/module/components/message-parts/index.js.map +1 -0
  95. package/dist/module/components/message-parts/message-parts.js +205 -0
  96. package/dist/module/components/message-parts/message-parts.js.map +1 -0
  97. package/dist/module/components/new-chat/index.js +4 -0
  98. package/dist/module/components/new-chat/index.js.map +1 -0
  99. package/dist/module/components/new-chat/new-chat.js +96 -0
  100. package/dist/module/components/new-chat/new-chat.js.map +1 -0
  101. package/dist/module/components/prompt-input/attachment-picker.js +337 -0
  102. package/dist/module/components/prompt-input/attachment-picker.js.map +1 -0
  103. package/dist/module/components/prompt-input/attachment-preview.js +225 -0
  104. package/dist/module/components/prompt-input/attachment-preview.js.map +1 -0
  105. package/dist/module/components/prompt-input/index.js +15 -0
  106. package/dist/module/components/prompt-input/index.js.map +1 -0
  107. package/dist/module/components/prompt-input/prompt-input.js +284 -0
  108. package/dist/module/components/prompt-input/prompt-input.js.map +1 -0
  109. package/dist/module/components/prompt-input/provider-selector.js +538 -0
  110. package/dist/module/components/prompt-input/provider-selector.js.map +1 -0
  111. package/dist/module/components/prompt-input/reasoning-level-selector.js +346 -0
  112. package/dist/module/components/prompt-input/reasoning-level-selector.js.map +1 -0
  113. package/dist/module/components/prompt-input/voice-recorder.js +256 -0
  114. package/dist/module/components/prompt-input/voice-recorder.js.map +1 -0
  115. package/dist/module/components/sessions-list/index.js +4 -0
  116. package/dist/module/components/sessions-list/index.js.map +1 -0
  117. package/dist/module/components/sessions-list/sessions-list.js +816 -0
  118. package/dist/module/components/sessions-list/sessions-list.js.map +1 -0
  119. package/dist/module/hooks/index.js +18 -0
  120. package/dist/module/hooks/index.js.map +1 -0
  121. package/dist/module/hooks/use-agent-models.js +100 -0
  122. package/dist/module/hooks/use-agent-models.js.map +1 -0
  123. package/dist/module/hooks/use-assistant.js +398 -0
  124. package/dist/module/hooks/use-assistant.js.map +1 -0
  125. package/dist/module/hooks/use-attachment-picker.js +303 -0
  126. package/dist/module/hooks/use-attachment-picker.js.map +1 -0
  127. package/dist/module/hooks/use-voice-recorder.js +214 -0
  128. package/dist/module/hooks/use-voice-recorder.js.map +1 -0
  129. package/dist/module/index.js +59 -0
  130. package/dist/module/index.js.map +1 -0
  131. package/dist/module/package.json +1 -0
  132. package/dist/module/theme/assistant-theme.js +100 -0
  133. package/dist/module/theme/assistant-theme.js.map +1 -0
  134. package/dist/module/theme/index.js +4 -0
  135. package/dist/module/theme/index.js.map +1 -0
  136. package/dist/module/types/index.js +2 -0
  137. package/dist/module/types/index.js.map +1 -0
  138. package/dist/module/ui/action-sheet.js +344 -0
  139. package/dist/module/ui/action-sheet.js.map +1 -0
  140. package/dist/module/ui/alert-dialog.js +130 -0
  141. package/dist/module/ui/alert-dialog.js.map +1 -0
  142. package/dist/module/ui/docyrus-brand-mark.js +48 -0
  143. package/dist/module/ui/docyrus-brand-mark.js.map +1 -0
  144. package/dist/module/ui/docyrus-icon.js +294 -0
  145. package/dist/module/ui/docyrus-icon.js.map +1 -0
  146. package/dist/module/ui/index.js +7 -0
  147. package/dist/module/ui/index.js.map +1 -0
  148. package/dist/module/utils/api-client.js +95 -0
  149. package/dist/module/utils/api-client.js.map +1 -0
  150. package/dist/module/utils/default-api-config.js +190 -0
  151. package/dist/module/utils/default-api-config.js.map +1 -0
  152. package/dist/module/utils/index.js +12 -0
  153. package/dist/module/utils/index.js.map +1 -0
  154. package/dist/module/utils/resolve-api-headers.js +12 -0
  155. package/dist/module/utils/resolve-api-headers.js.map +1 -0
  156. package/dist/typescript/commonjs/eslint.config.d.mts +4 -0
  157. package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
  158. package/dist/typescript/commonjs/package.json +1 -0
  159. package/dist/typescript/commonjs/src/components/agent-selector/agent-selector.d.ts +49 -0
  160. package/dist/typescript/commonjs/src/components/agent-selector/agent-selector.d.ts.map +1 -0
  161. package/dist/typescript/commonjs/src/components/agent-selector/index.d.ts +2 -0
  162. package/dist/typescript/commonjs/src/components/agent-selector/index.d.ts.map +1 -0
  163. package/dist/typescript/commonjs/src/components/assistant-animations/assistant-animations.d.ts +8 -0
  164. package/dist/typescript/commonjs/src/components/assistant-animations/assistant-animations.d.ts.map +1 -0
  165. package/dist/typescript/commonjs/src/components/assistant-animations/index.d.ts +2 -0
  166. package/dist/typescript/commonjs/src/components/assistant-animations/index.d.ts.map +1 -0
  167. package/dist/typescript/commonjs/src/components/assistant-screen/assistant-screen.d.ts +122 -0
  168. package/dist/typescript/commonjs/src/components/assistant-screen/assistant-screen.d.ts.map +1 -0
  169. package/dist/typescript/commonjs/src/components/assistant-screen/index.d.ts +2 -0
  170. package/dist/typescript/commonjs/src/components/assistant-screen/index.d.ts.map +1 -0
  171. package/dist/typescript/commonjs/src/components/index.d.ts +11 -0
  172. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
  173. package/dist/typescript/commonjs/src/components/message-parts/index.d.ts +2 -0
  174. package/dist/typescript/commonjs/src/components/message-parts/index.d.ts.map +1 -0
  175. package/dist/typescript/commonjs/src/components/message-parts/message-parts.d.ts +22 -0
  176. package/dist/typescript/commonjs/src/components/message-parts/message-parts.d.ts.map +1 -0
  177. package/dist/typescript/commonjs/src/components/new-chat/index.d.ts +2 -0
  178. package/dist/typescript/commonjs/src/components/new-chat/index.d.ts.map +1 -0
  179. package/dist/typescript/commonjs/src/components/new-chat/new-chat.d.ts +34 -0
  180. package/dist/typescript/commonjs/src/components/new-chat/new-chat.d.ts.map +1 -0
  181. package/dist/typescript/commonjs/src/components/prompt-input/attachment-picker.d.ts +53 -0
  182. package/dist/typescript/commonjs/src/components/prompt-input/attachment-picker.d.ts.map +1 -0
  183. package/dist/typescript/commonjs/src/components/prompt-input/attachment-preview.d.ts +42 -0
  184. package/dist/typescript/commonjs/src/components/prompt-input/attachment-preview.d.ts.map +1 -0
  185. package/dist/typescript/commonjs/src/components/prompt-input/index.d.ts +9 -0
  186. package/dist/typescript/commonjs/src/components/prompt-input/index.d.ts.map +1 -0
  187. package/dist/typescript/commonjs/src/components/prompt-input/prompt-input.d.ts +139 -0
  188. package/dist/typescript/commonjs/src/components/prompt-input/prompt-input.d.ts.map +1 -0
  189. package/dist/typescript/commonjs/src/components/prompt-input/provider-selector.d.ts +11 -0
  190. package/dist/typescript/commonjs/src/components/prompt-input/provider-selector.d.ts.map +1 -0
  191. package/dist/typescript/commonjs/src/components/prompt-input/reasoning-level-selector.d.ts +35 -0
  192. package/dist/typescript/commonjs/src/components/prompt-input/reasoning-level-selector.d.ts.map +1 -0
  193. package/dist/typescript/commonjs/src/components/prompt-input/voice-recorder.d.ts +48 -0
  194. package/dist/typescript/commonjs/src/components/prompt-input/voice-recorder.d.ts.map +1 -0
  195. package/dist/typescript/commonjs/src/components/sessions-list/index.d.ts +2 -0
  196. package/dist/typescript/commonjs/src/components/sessions-list/index.d.ts.map +1 -0
  197. package/dist/typescript/commonjs/src/components/sessions-list/sessions-list.d.ts +59 -0
  198. package/dist/typescript/commonjs/src/components/sessions-list/sessions-list.d.ts.map +1 -0
  199. package/dist/typescript/commonjs/src/hooks/index.d.ts +8 -0
  200. package/dist/typescript/commonjs/src/hooks/index.d.ts.map +1 -0
  201. package/dist/typescript/commonjs/src/hooks/use-agent-models.d.ts +68 -0
  202. package/dist/typescript/commonjs/src/hooks/use-agent-models.d.ts.map +1 -0
  203. package/dist/typescript/commonjs/src/hooks/use-assistant.d.ts +55 -0
  204. package/dist/typescript/commonjs/src/hooks/use-assistant.d.ts.map +1 -0
  205. package/dist/typescript/commonjs/src/hooks/use-attachment-picker.d.ts +99 -0
  206. package/dist/typescript/commonjs/src/hooks/use-attachment-picker.d.ts.map +1 -0
  207. package/dist/typescript/commonjs/src/hooks/use-voice-recorder.d.ts +101 -0
  208. package/dist/typescript/commonjs/src/hooks/use-voice-recorder.d.ts.map +1 -0
  209. package/dist/typescript/commonjs/src/index.d.ts +47 -0
  210. package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
  211. package/dist/typescript/commonjs/src/theme/assistant-theme.d.ts +51 -0
  212. package/dist/typescript/commonjs/src/theme/assistant-theme.d.ts.map +1 -0
  213. package/dist/typescript/commonjs/src/theme/index.d.ts +2 -0
  214. package/dist/typescript/commonjs/src/theme/index.d.ts.map +1 -0
  215. package/dist/typescript/commonjs/src/types/index.d.ts +167 -0
  216. package/dist/typescript/commonjs/src/types/index.d.ts.map +1 -0
  217. package/dist/typescript/commonjs/src/ui/action-sheet.d.ts +29 -0
  218. package/dist/typescript/commonjs/src/ui/action-sheet.d.ts.map +1 -0
  219. package/dist/typescript/commonjs/src/ui/alert-dialog.d.ts +12 -0
  220. package/dist/typescript/commonjs/src/ui/alert-dialog.d.ts.map +1 -0
  221. package/dist/typescript/commonjs/src/ui/docyrus-brand-mark.d.ts +5 -0
  222. package/dist/typescript/commonjs/src/ui/docyrus-brand-mark.d.ts.map +1 -0
  223. package/dist/typescript/commonjs/src/ui/docyrus-icon.d.ts +11 -0
  224. package/dist/typescript/commonjs/src/ui/docyrus-icon.d.ts.map +1 -0
  225. package/dist/typescript/commonjs/src/ui/index.d.ts +5 -0
  226. package/dist/typescript/commonjs/src/ui/index.d.ts.map +1 -0
  227. package/dist/typescript/commonjs/src/utils/api-client.d.ts +35 -0
  228. package/dist/typescript/commonjs/src/utils/api-client.d.ts.map +1 -0
  229. package/dist/typescript/commonjs/src/utils/default-api-config.d.ts +38 -0
  230. package/dist/typescript/commonjs/src/utils/default-api-config.d.ts.map +1 -0
  231. package/dist/typescript/commonjs/src/utils/index.d.ts +9 -0
  232. package/dist/typescript/commonjs/src/utils/index.d.ts.map +1 -0
  233. package/dist/typescript/commonjs/src/utils/resolve-api-headers.d.ts +3 -0
  234. package/dist/typescript/commonjs/src/utils/resolve-api-headers.d.ts.map +1 -0
  235. package/dist/typescript/module/eslint.config.d.mts +4 -0
  236. package/dist/typescript/module/eslint.config.d.mts.map +1 -0
  237. package/dist/typescript/module/package.json +1 -0
  238. package/dist/typescript/module/src/components/agent-selector/agent-selector.d.ts +49 -0
  239. package/dist/typescript/module/src/components/agent-selector/agent-selector.d.ts.map +1 -0
  240. package/dist/typescript/module/src/components/agent-selector/index.d.ts +2 -0
  241. package/dist/typescript/module/src/components/agent-selector/index.d.ts.map +1 -0
  242. package/dist/typescript/module/src/components/assistant-animations/assistant-animations.d.ts +8 -0
  243. package/dist/typescript/module/src/components/assistant-animations/assistant-animations.d.ts.map +1 -0
  244. package/dist/typescript/module/src/components/assistant-animations/index.d.ts +2 -0
  245. package/dist/typescript/module/src/components/assistant-animations/index.d.ts.map +1 -0
  246. package/dist/typescript/module/src/components/assistant-screen/assistant-screen.d.ts +122 -0
  247. package/dist/typescript/module/src/components/assistant-screen/assistant-screen.d.ts.map +1 -0
  248. package/dist/typescript/module/src/components/assistant-screen/index.d.ts +2 -0
  249. package/dist/typescript/module/src/components/assistant-screen/index.d.ts.map +1 -0
  250. package/dist/typescript/module/src/components/index.d.ts +11 -0
  251. package/dist/typescript/module/src/components/index.d.ts.map +1 -0
  252. package/dist/typescript/module/src/components/message-parts/index.d.ts +2 -0
  253. package/dist/typescript/module/src/components/message-parts/index.d.ts.map +1 -0
  254. package/dist/typescript/module/src/components/message-parts/message-parts.d.ts +22 -0
  255. package/dist/typescript/module/src/components/message-parts/message-parts.d.ts.map +1 -0
  256. package/dist/typescript/module/src/components/new-chat/index.d.ts +2 -0
  257. package/dist/typescript/module/src/components/new-chat/index.d.ts.map +1 -0
  258. package/dist/typescript/module/src/components/new-chat/new-chat.d.ts +34 -0
  259. package/dist/typescript/module/src/components/new-chat/new-chat.d.ts.map +1 -0
  260. package/dist/typescript/module/src/components/prompt-input/attachment-picker.d.ts +53 -0
  261. package/dist/typescript/module/src/components/prompt-input/attachment-picker.d.ts.map +1 -0
  262. package/dist/typescript/module/src/components/prompt-input/attachment-preview.d.ts +42 -0
  263. package/dist/typescript/module/src/components/prompt-input/attachment-preview.d.ts.map +1 -0
  264. package/dist/typescript/module/src/components/prompt-input/index.d.ts +9 -0
  265. package/dist/typescript/module/src/components/prompt-input/index.d.ts.map +1 -0
  266. package/dist/typescript/module/src/components/prompt-input/prompt-input.d.ts +139 -0
  267. package/dist/typescript/module/src/components/prompt-input/prompt-input.d.ts.map +1 -0
  268. package/dist/typescript/module/src/components/prompt-input/provider-selector.d.ts +11 -0
  269. package/dist/typescript/module/src/components/prompt-input/provider-selector.d.ts.map +1 -0
  270. package/dist/typescript/module/src/components/prompt-input/reasoning-level-selector.d.ts +35 -0
  271. package/dist/typescript/module/src/components/prompt-input/reasoning-level-selector.d.ts.map +1 -0
  272. package/dist/typescript/module/src/components/prompt-input/voice-recorder.d.ts +48 -0
  273. package/dist/typescript/module/src/components/prompt-input/voice-recorder.d.ts.map +1 -0
  274. package/dist/typescript/module/src/components/sessions-list/index.d.ts +2 -0
  275. package/dist/typescript/module/src/components/sessions-list/index.d.ts.map +1 -0
  276. package/dist/typescript/module/src/components/sessions-list/sessions-list.d.ts +59 -0
  277. package/dist/typescript/module/src/components/sessions-list/sessions-list.d.ts.map +1 -0
  278. package/dist/typescript/module/src/hooks/index.d.ts +8 -0
  279. package/dist/typescript/module/src/hooks/index.d.ts.map +1 -0
  280. package/dist/typescript/module/src/hooks/use-agent-models.d.ts +68 -0
  281. package/dist/typescript/module/src/hooks/use-agent-models.d.ts.map +1 -0
  282. package/dist/typescript/module/src/hooks/use-assistant.d.ts +55 -0
  283. package/dist/typescript/module/src/hooks/use-assistant.d.ts.map +1 -0
  284. package/dist/typescript/module/src/hooks/use-attachment-picker.d.ts +99 -0
  285. package/dist/typescript/module/src/hooks/use-attachment-picker.d.ts.map +1 -0
  286. package/dist/typescript/module/src/hooks/use-voice-recorder.d.ts +101 -0
  287. package/dist/typescript/module/src/hooks/use-voice-recorder.d.ts.map +1 -0
  288. package/dist/typescript/module/src/index.d.ts +47 -0
  289. package/dist/typescript/module/src/index.d.ts.map +1 -0
  290. package/dist/typescript/module/src/theme/assistant-theme.d.ts +51 -0
  291. package/dist/typescript/module/src/theme/assistant-theme.d.ts.map +1 -0
  292. package/dist/typescript/module/src/theme/index.d.ts +2 -0
  293. package/dist/typescript/module/src/theme/index.d.ts.map +1 -0
  294. package/dist/typescript/module/src/types/index.d.ts +167 -0
  295. package/dist/typescript/module/src/types/index.d.ts.map +1 -0
  296. package/dist/typescript/module/src/ui/action-sheet.d.ts +29 -0
  297. package/dist/typescript/module/src/ui/action-sheet.d.ts.map +1 -0
  298. package/dist/typescript/module/src/ui/alert-dialog.d.ts +12 -0
  299. package/dist/typescript/module/src/ui/alert-dialog.d.ts.map +1 -0
  300. package/dist/typescript/module/src/ui/docyrus-brand-mark.d.ts +5 -0
  301. package/dist/typescript/module/src/ui/docyrus-brand-mark.d.ts.map +1 -0
  302. package/dist/typescript/module/src/ui/docyrus-icon.d.ts +11 -0
  303. package/dist/typescript/module/src/ui/docyrus-icon.d.ts.map +1 -0
  304. package/dist/typescript/module/src/ui/index.d.ts +5 -0
  305. package/dist/typescript/module/src/ui/index.d.ts.map +1 -0
  306. package/dist/typescript/module/src/utils/api-client.d.ts +35 -0
  307. package/dist/typescript/module/src/utils/api-client.d.ts.map +1 -0
  308. package/dist/typescript/module/src/utils/default-api-config.d.ts +38 -0
  309. package/dist/typescript/module/src/utils/default-api-config.d.ts.map +1 -0
  310. package/dist/typescript/module/src/utils/index.d.ts +9 -0
  311. package/dist/typescript/module/src/utils/index.d.ts.map +1 -0
  312. package/dist/typescript/module/src/utils/resolve-api-headers.d.ts +3 -0
  313. package/dist/typescript/module/src/utils/resolve-api-headers.d.ts.map +1 -0
  314. package/package.json +176 -0
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Docyrus RN Assistant Type Definitions
3
+ * @module @docyrus/rn-assistant/types
4
+ */
5
+ /**
6
+ * API Configuration for AI services
7
+ */
8
+ export type AIAPIConfig = {
9
+ /**
10
+ * Base URL for API requests
11
+ */
12
+ baseUrl: string;
13
+ /**
14
+ * Transform API response (e.g., unwrap { success: true, data: {...} })
15
+ */
16
+ transformResponse?: <T = any>(response: any) => T;
17
+ /**
18
+ * API endpoints configuration
19
+ */
20
+ endpoints: {
21
+ /**
22
+ * Agent deployment endpoint
23
+ * Use :agentId and :deploymentId as placeholders
24
+ */
25
+ deployment: string;
26
+ /**
27
+ * Chat endpoint
28
+ * Use :agentId and :deploymentId as placeholders
29
+ */
30
+ chat: string;
31
+ /**
32
+ * Sessions list endpoint
33
+ */
34
+ sessions: string;
35
+ /**
36
+ * Messages list endpoint
37
+ */
38
+ messages: string;
39
+ /**
40
+ * Thread detail endpoint (with child messages)
41
+ * Use :threadId as placeholder
42
+ */
43
+ threadDetail: string;
44
+ /**
45
+ * Thread creation endpoint
46
+ */
47
+ createThread: string;
48
+ /**
49
+ * Session deletion endpoint
50
+ * Use :sessionId as placeholder
51
+ */
52
+ deleteSession: string;
53
+ /**
54
+ * Voice transcription endpoint (optional)
55
+ */
56
+ transcribe?: string;
57
+ };
58
+ /**
59
+ * Default headers for all requests
60
+ */
61
+ headers?: Record<string, string> | (() => Promise<Record<string, string> | undefined> | Record<string, string> | undefined);
62
+ };
63
+ export type AIProvider = {
64
+ id: string;
65
+ name: string;
66
+ icon?: string;
67
+ type: 'openai' | 'anthropic' | 'google' | 'cerebras' | 'groq' | 'other';
68
+ };
69
+ export type AIReasoningLevel = {
70
+ id: string;
71
+ name: string;
72
+ default?: boolean;
73
+ };
74
+ export type AIModel = {
75
+ id: string;
76
+ key: string;
77
+ name: string;
78
+ description?: string;
79
+ providerId: string;
80
+ providerName: string;
81
+ providerLogoUrl?: string;
82
+ icon?: string;
83
+ connectionId?: string;
84
+ connectionName?: string;
85
+ /**
86
+ * Available reasoning levels for this model (e.g., low, medium, high)
87
+ * If undefined or empty, reasoning level selector should be hidden
88
+ */
89
+ reasoningLevels?: AIReasoningLevel[];
90
+ };
91
+ export type AIAgent = {
92
+ id: string;
93
+ name: string;
94
+ description?: string;
95
+ icon?: string;
96
+ avatar?: {
97
+ signed_url: string;
98
+ };
99
+ welcomeMessage?: string;
100
+ models?: AIModel[];
101
+ defaultModelId?: string;
102
+ backupModelId?: string;
103
+ };
104
+ export type AgentDeployment = {
105
+ id: string;
106
+ name: string;
107
+ agentId: string;
108
+ agent: AIAgent;
109
+ avatar?: {
110
+ signed_url: string;
111
+ };
112
+ welcomeMessage?: string;
113
+ defaultAiModelId?: string;
114
+ backupAiModelId?: string;
115
+ configured: boolean;
116
+ };
117
+ export type AIMessage = {
118
+ id: string;
119
+ role: 'user' | 'assistant' | 'system';
120
+ content: string;
121
+ createdAt?: Date;
122
+ files?: AIMessageFile[];
123
+ toolCalls?: AIToolCall[];
124
+ modelId?: string;
125
+ modelName?: string;
126
+ /**
127
+ * Raw message parts from AI SDK for custom rendering
128
+ * Includes text, tool-call, tool-result, and other part types
129
+ */
130
+ parts?: any[];
131
+ };
132
+ export type AIMessageFile = {
133
+ id: string;
134
+ name: string;
135
+ type: string;
136
+ uri: string;
137
+ size?: number;
138
+ };
139
+ export type AIToolCall = {
140
+ id: string;
141
+ name: string;
142
+ status: 'pending' | 'running' | 'completed' | 'failed';
143
+ args?: Record<string, any>;
144
+ result?: any;
145
+ };
146
+ export type AISession = {
147
+ id: string;
148
+ subject: string;
149
+ description?: string;
150
+ agentId: string;
151
+ agentDeploymentId?: string;
152
+ createdOn: Date;
153
+ lastModifiedOn: Date;
154
+ messageCount?: number;
155
+ preview?: string;
156
+ };
157
+ export type DocyAssistantMode = 'chat' | 'sessions';
158
+ export type DocyrusRNAssistantConfig = AIAPIConfig;
159
+ export type QuickAction = {
160
+ id: string;
161
+ title: string;
162
+ description: string;
163
+ icon: string;
164
+ prompt: string;
165
+ color?: string;
166
+ };
167
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC;IAElD;;OAEG;IACH,SAAS,EAAE;QACT;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;;WAGG;QACH,IAAI,EA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ActionSheetAction = {
4
+ destructive?: boolean;
5
+ disabled?: boolean;
6
+ icon?: string;
7
+ key: string;
8
+ label: string;
9
+ onPress: () => void;
10
+ };
11
+ export type ActionSheetDetent = 'small' | 'medium' | 'large' | 'fit';
12
+ export type ActionSheetProps = {
13
+ actions?: ActionSheetAction[];
14
+ cancelLabel?: string;
15
+ children?: ReactNode;
16
+ closeOnBackdrop?: boolean;
17
+ contentContainerStyle?: StyleProp<ViewStyle>;
18
+ detent?: ActionSheetDetent;
19
+ detents?: ActionSheetDetent[];
20
+ fixedContent?: ReactNode;
21
+ message?: string;
22
+ onClose: () => void;
23
+ scrollable?: boolean;
24
+ showCancel?: boolean;
25
+ title?: string;
26
+ visible: boolean;
27
+ };
28
+ export declare function ActionSheet({ actions, cancelLabel, children, closeOnBackdrop, contentContainerStyle, detent, detents, fixedContent, message, onClose, scrollable, showCancel, title, visible }: ActionSheetProps): import("react").JSX.Element | null;
29
+ //# sourceMappingURL=action-sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-sheet.d.ts","sourceRoot":"","sources":["../../../../../src/ui/action-sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAWL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAMtB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAErE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAuBF,wBAAgB,WAAW,CAAC,EAC1B,OAAY,EACZ,WAAW,EACX,QAAQ,EACR,eAAsB,EACtB,qBAAqB,EACrB,MAAc,EACd,OAAO,EACP,YAAY,EACZ,OAAO,EACP,OAAO,EACP,UAAiB,EACjB,UAAkB,EAClB,KAAK,EACL,OAAO,EACR,EAAE,gBAAgB,sCA2RlB"}
@@ -0,0 +1,12 @@
1
+ export type AlertDialogProps = {
2
+ cancelText?: string;
3
+ confirmText?: string;
4
+ description?: string;
5
+ onCancel?: () => void;
6
+ onConfirm?: () => void;
7
+ title?: string;
8
+ variant?: 'default' | 'destructive' | 'success' | 'warning';
9
+ visible?: boolean;
10
+ };
11
+ export declare function AlertDialog({ cancelText, confirmText, description, onCancel, onConfirm, title, variant, visible }: AlertDialogProps): import("react").JSX.Element;
12
+ //# sourceMappingURL=alert-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/alert-dialog.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,KAAK,EACL,OAAmB,EACnB,OAAe,EAChB,EAAE,gBAAgB,+BAqElB"}
@@ -0,0 +1,5 @@
1
+ export type DocyrusBrandMarkProps = {
2
+ size?: number;
3
+ };
4
+ export declare const DocyrusBrandMark: import("react").MemoExoticComponent<({ size }: DocyrusBrandMarkProps) => import("react").JSX.Element | null>;
5
+ //# sourceMappingURL=docyrus-brand-mark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docyrus-brand-mark.d.ts","sourceRoot":"","sources":["../../../../../src/ui/docyrus-brand-mark.tsx"],"names":[],"mappings":"AA0CA,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,gBAAgB,iDAAwB,qBAAqB,wCAexE,CAAC"}
@@ -0,0 +1,11 @@
1
+ export type DocyrusIconProps = {
2
+ color?: string;
3
+ disabled?: boolean;
4
+ group?: string | null;
5
+ icon: string;
6
+ lib?: string;
7
+ onPress?: () => void;
8
+ size?: number | 'xs' | 'sm' | 'default' | 'lg' | 'xl';
9
+ };
10
+ export declare const DocyrusIcon: import("react").MemoExoticComponent<({ color, disabled, group, icon, lib, onPress, size }: DocyrusIconProps) => import("react").JSX.Element>;
11
+ //# sourceMappingURL=docyrus-icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docyrus-icon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/docyrus-icon.tsx"],"names":[],"mappings":"AA4PA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;CACvD,CAAC;AAEF,eAAO,MAAM,WAAW,6FAQrB,gBAAgB,iCAkHjB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { ActionSheet, type ActionSheetAction, type ActionSheetDetent, type ActionSheetProps } from './action-sheet';
2
+ export { AlertDialog, type AlertDialogProps } from './alert-dialog';
3
+ export { DocyrusBrandMark, type DocyrusBrandMarkProps } from './docyrus-brand-mark';
4
+ export { DocyrusIcon, type DocyrusIconProps } from './docyrus-icon';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Centralized API client for all Docyrus RN Assistant fetch requests
3
+ * Provides consistent logging and error handling
4
+ */
5
+ export type APIClientOptions = {
6
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
7
+ headers?: Record<string, string>;
8
+ body?: any;
9
+ /**
10
+ * Set to true for FormData/multipart requests (e.g., file uploads)
11
+ * When true, Content-Type header is NOT set (fetch handles it automatically)
12
+ */
13
+ isFormData?: boolean;
14
+ transformResponse?<T = any>(response: any): T;
15
+ };
16
+ /**
17
+ * Centralized API client
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * // GET request
22
+ * const data = await apiClient('https://api.example.com/users', {
23
+ * headers: { Authorization: 'Bearer token' }
24
+ * });
25
+ *
26
+ * // POST request
27
+ * const result = await apiClient('https://api.example.com/users', {
28
+ * method: 'POST',
29
+ * body: { name: 'John' },
30
+ * headers: { Authorization: 'Bearer token' }
31
+ * });
32
+ * ```
33
+ */
34
+ export declare function apiClient(url: string, options?: APIClientOptions): Promise<any>;
35
+ //# sourceMappingURL=api-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../../../../src/utils/api-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,GAAG,CAAC;IACX;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,CAAC;CAC/C,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC,CAsEzF"}
@@ -0,0 +1,38 @@
1
+ import { type AIAPIConfig } from '../types';
2
+ /**
3
+ * Default API configuration for Docyrus AI API
4
+ *
5
+ * This configuration handles the Docyrus API format:
6
+ * - Response wrapper: { success: boolean, data: T }
7
+ * - Endpoints follow the pattern: /ai/... or /apps/base/...
8
+ * - Authentication via Bearer token
9
+ *
10
+ * ## API Endpoints Overview:
11
+ *
12
+ * ### AI Agent APIs
13
+ * 1. **deployment**: Fetches agent deployment info and available models
14
+ * 2. **chat**: Streams chat messages with AI using Vercel AI SDK
15
+ *
16
+ * ### Data Source APIs (Thread & Message Management)
17
+ * 3. **sessions**: Lists all chat threads/sessions for an agent
18
+ * 4. **messages**: Retrieves messages for a specific thread
19
+ * 5. **createThread**: Creates a new chat thread/session
20
+ * 6. **deleteSession**: Deletes a chat thread/session
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * import { createDocyrusRNAssistantConfig } from '@docyrus/rn-assistant';
25
+ *
26
+ * const apiConfig = createDocyrusRNAssistantConfig({
27
+ * baseUrl: 'https://api.docyrus.com',
28
+ * token: userToken
29
+ * });
30
+ * ```
31
+ */
32
+ export declare function createDocyrusAPIConfig(options: {
33
+ baseUrl: string;
34
+ token?: string;
35
+ getToken?: () => Promise<string | null | undefined> | string | null | undefined;
36
+ }): AIAPIConfig;
37
+ export declare const createDocyrusRNAssistantConfig: typeof createDocyrusAPIConfig;
38
+ //# sourceMappingURL=default-api-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-api-config.d.ts","sourceRoot":"","sources":["../../../../../src/utils/default-api-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACjF,GAAG,WAAW,CAiKd;AAED,eAAO,MAAM,8BAA8B,+BAAyB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Docy Assistant - Utilities
3
+ *
4
+ * @module @docyrus/rn-assistant/utils
5
+ */
6
+ export * from './default-api-config';
7
+ export * from './api-client';
8
+ export * from './resolve-api-headers';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AIAPIConfig } from '../types';
2
+ export declare function resolveAPIHeaders(headers?: AIAPIConfig['headers']): Promise<Record<string, string>>;
3
+ //# sourceMappingURL=resolve-api-headers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-api-headers.d.ts","sourceRoot":"","sources":["../../../../../src/utils/resolve-api-headers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,wBAAsB,iBAAiB,CACrC,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAC/B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAUjC"}
package/package.json ADDED
@@ -0,0 +1,176 @@
1
+ {
2
+ "name": "@docyrus/rn-assistant",
3
+ "version": "0.0.1",
4
+ "description": "Standalone React Native AI assistant package for Docyrus-compatible backends.",
5
+ "license": "MIT",
6
+ "main": "dist/commonjs/index.js",
7
+ "module": "dist/module/index.js",
8
+ "types": "dist/typescript/commonjs/src/index.d.ts",
9
+ "react-native": "dist/module/index.js",
10
+ "source": "src/index.ts",
11
+ "sideEffects": false,
12
+ "keywords": [
13
+ "docyrus",
14
+ "react-native",
15
+ "expo",
16
+ "assistant",
17
+ "ai",
18
+ "chat"
19
+ ],
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/Docyrus/docyrus-rn-assistant.git",
23
+ "directory": "packages/rn-assistant"
24
+ },
25
+ "exports": {
26
+ ".": {
27
+ "react-native": "./dist/module/index.js",
28
+ "import": {
29
+ "types": "./dist/typescript/module/src/index.d.ts",
30
+ "default": "./dist/module/index.js"
31
+ },
32
+ "require": {
33
+ "types": "./dist/typescript/commonjs/src/index.d.ts",
34
+ "default": "./dist/commonjs/index.js"
35
+ },
36
+ "default": "./dist/module/index.js"
37
+ },
38
+ "./components": {
39
+ "react-native": "./dist/module/components/index.js",
40
+ "import": {
41
+ "types": "./dist/typescript/module/src/components/index.d.ts",
42
+ "default": "./dist/module/components/index.js"
43
+ },
44
+ "require": {
45
+ "types": "./dist/typescript/commonjs/src/components/index.d.ts",
46
+ "default": "./dist/commonjs/components/index.js"
47
+ },
48
+ "default": "./dist/module/components/index.js"
49
+ },
50
+ "./hooks": {
51
+ "react-native": "./dist/module/hooks/index.js",
52
+ "import": {
53
+ "types": "./dist/typescript/module/src/hooks/index.d.ts",
54
+ "default": "./dist/module/hooks/index.js"
55
+ },
56
+ "require": {
57
+ "types": "./dist/typescript/commonjs/src/hooks/index.d.ts",
58
+ "default": "./dist/commonjs/hooks/index.js"
59
+ },
60
+ "default": "./dist/module/hooks/index.js"
61
+ },
62
+ "./theme": {
63
+ "react-native": "./dist/module/theme/index.js",
64
+ "import": {
65
+ "types": "./dist/typescript/module/src/theme/index.d.ts",
66
+ "default": "./dist/module/theme/index.js"
67
+ },
68
+ "require": {
69
+ "types": "./dist/typescript/commonjs/src/theme/index.d.ts",
70
+ "default": "./dist/commonjs/theme/index.js"
71
+ },
72
+ "default": "./dist/module/theme/index.js"
73
+ },
74
+ "./types": {
75
+ "react-native": "./dist/module/types/index.js",
76
+ "import": {
77
+ "types": "./dist/typescript/module/src/types/index.d.ts",
78
+ "default": "./dist/module/types/index.js"
79
+ },
80
+ "require": {
81
+ "types": "./dist/typescript/commonjs/src/types/index.d.ts",
82
+ "default": "./dist/commonjs/types/index.js"
83
+ },
84
+ "default": "./dist/module/types/index.js"
85
+ },
86
+ "./utils": {
87
+ "react-native": "./dist/module/utils/index.js",
88
+ "import": {
89
+ "types": "./dist/typescript/module/src/utils/index.d.ts",
90
+ "default": "./dist/module/utils/index.js"
91
+ },
92
+ "require": {
93
+ "types": "./dist/typescript/commonjs/src/utils/index.d.ts",
94
+ "default": "./dist/commonjs/utils/index.js"
95
+ },
96
+ "default": "./dist/module/utils/index.js"
97
+ },
98
+ "./package.json": "./package.json"
99
+ },
100
+ "files": [
101
+ "dist",
102
+ "README.md",
103
+ "!**/__tests__",
104
+ "!**/__fixtures__",
105
+ "!**/__mocks__"
106
+ ],
107
+ "dependencies": {
108
+ "@ai-sdk/react": "3.0.144",
109
+ "@docren/react-native-markdown": "0.8.5",
110
+ "@docyrus/i18n": "latest",
111
+ "@types/turndown": "5.0.6",
112
+ "ai": "6.0.142",
113
+ "expo-audio": "55.0.9",
114
+ "expo-constants": "55.0.9",
115
+ "expo-document-picker": "55.0.9",
116
+ "expo-image": "55.0.6",
117
+ "expo-file-system": "55.0.12",
118
+ "expo-image-picker": "55.0.14",
119
+ "lucide-react-native": "1.7.0",
120
+ "turndown": "7.2.2"
121
+ },
122
+ "devDependencies": {
123
+ "@docyrus/rules": "latest",
124
+ "react": "19.2.0",
125
+ "react-native": "0.83.4",
126
+ "react-native-safe-area-context": "5.6.2",
127
+ "typescript": "5.9.3"
128
+ },
129
+ "peerDependencies": {
130
+ "expo": ">=55.0.0",
131
+ "react": ">=19.0.0",
132
+ "react-native": ">=0.83.0",
133
+ "react-native-keyboard-controller": ">=1.20.7",
134
+ "react-native-safe-area-context": ">=5.6.2",
135
+ "react-native-svg": ">=15.15.3"
136
+ },
137
+ "peerDependenciesMeta": {
138
+ "react-native-keyboard-controller": {
139
+ "optional": false
140
+ },
141
+ "react-native-safe-area-context": {
142
+ "optional": false
143
+ },
144
+ "react-native-svg": {
145
+ "optional": false
146
+ }
147
+ },
148
+ "react-native-builder-bob": {
149
+ "source": "src",
150
+ "output": "dist",
151
+ "targets": [
152
+ [
153
+ "commonjs",
154
+ {
155
+ "esm": true
156
+ }
157
+ ],
158
+ [
159
+ "module",
160
+ {
161
+ "esm": true
162
+ }
163
+ ],
164
+ "typescript"
165
+ ]
166
+ },
167
+ "publishConfig": {
168
+ "access": "public"
169
+ },
170
+ "scripts": {
171
+ "build": "bob build",
172
+ "format": "eslint src . --fix",
173
+ "typecheck": "eslint . && tsc --noEmit",
174
+ "deploy": "pnpm run build && pnpm publish --access public"
175
+ }
176
+ }