@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
package/README.md ADDED
@@ -0,0 +1,477 @@
1
+ # @docyrus/rn-assistant
2
+
3
+ `@docyrus/rn-assistant` is a standalone React Native AI assistant package for Docyrus-compatible backends.
4
+
5
+ It is host-app independent:
6
+
7
+ - it does not import app-local aliases
8
+ - it does not read `.env` internally
9
+ - it does not require Tailwind, NativeWind, Uniwind, or `className`
10
+ - it supports embedded page, modal, and sheet presentations
11
+
12
+ ## What You Get
13
+
14
+ - `DocyrusRNAssistant` as the main entry component
15
+ - `DocyrusRNAssistantEmbedded` for page or tab usage
16
+ - `DocyrusRNAssistantModal` for full-screen modal usage
17
+ - `DocyrusRNAssistantSheet` for bottom-sheet or action-sheet usage
18
+ - built-in chat UI
19
+ - session and message management
20
+ - model and reasoning selection
21
+ - attachment picker
22
+ - voice recording and transcription UI
23
+ - internal light/dark aware theme tokens with overrides
24
+
25
+ ## Installation
26
+
27
+ Install the package:
28
+
29
+ ```bash
30
+ pnpm add @docyrus/rn-assistant
31
+ ```
32
+
33
+ Install required peer dependencies in the host app:
34
+
35
+ ```bash
36
+ pnpm add react react-native expo react-native-keyboard-controller react-native-safe-area-context react-native-svg
37
+ ```
38
+
39
+ Current peer requirements:
40
+
41
+ - `expo >= 55`
42
+ - `react >= 19`
43
+ - `react-native >= 0.83`
44
+ - `react-native-keyboard-controller >= 1.20.7`
45
+ - `react-native-safe-area-context >= 5.6.2`
46
+ - `react-native-svg >= 15.15.3`
47
+
48
+ ## Host App Responsibilities
49
+
50
+ The host app is responsible for:
51
+
52
+ - providing backend URLs from `.env` or any config source
53
+ - providing a valid user access token when authenticated requests are needed
54
+ - providing `agentId` and optionally `dataSourceId`
55
+ - deciding whether the assistant renders embedded, modal, or sheet
56
+ - storing and refreshing auth or session state
57
+
58
+ The package is responsible for:
59
+
60
+ - rendering the assistant UI
61
+ - fetching deployments and models
62
+ - managing sessions and messages
63
+ - chat streaming
64
+ - attachment and transcription flows
65
+ - filling the full host height in embedded, modal, and sheet modes
66
+
67
+ ## Environment Variables
68
+
69
+ The package does not read env values directly. The host app should read env variables and map them into `apiConfig` and assistant props.
70
+
71
+ Suggested Docyrus host env shape:
72
+
73
+ ```txt
74
+ EXPO_PUBLIC_API_BASE_URL=https://alpha-api.docyrus.com/v1
75
+ EXPO_PUBLIC_ASSISTANT_AGENT_ID=your-agent-id
76
+ EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID=your-thread-data-source-id
77
+ EXPO_PUBLIC_OAUTH2_BASE_URL=https://alpha-api.docyrus.com
78
+ EXPO_PUBLIC_OAUTH2_CLIENT_ID=your-oauth-client-id
79
+ EXPO_PUBLIC_OAUTH2_SCOPES=openid profile offline_access User.Read Users.Read.All DS.Read.All DS.ReadWrite.All AI.Read.All AI.ReadWrite.All
80
+ EXPO_PUBLIC_OAUTH2_REDIRECT_URI=your-app-scheme://auth/callback
81
+ ```
82
+
83
+ Recommended Docyrus scopes:
84
+
85
+ - `User.Read`
86
+ - `Users.Read.All`
87
+ - `DS.Read.All`
88
+ - `DS.ReadWrite.All`
89
+ - `AI.Read.All`
90
+ - `AI.ReadWrite.All`
91
+
92
+ Minimum deployment-read requirement:
93
+
94
+ - `AI.Read.All` or `AI.ReadWrite.All`
95
+
96
+ If OAuth scopes change, the user should sign out and sign in again so the host app receives a fresh token.
97
+
98
+ ## Native Permissions
99
+
100
+ If the host app enables voice recording or media attachments, the host app must define the required native permission strings.
101
+
102
+ For Expo apps, add these keys in `app.config.ts` or `app.json` under `ios.infoPlist`:
103
+
104
+ ```ts
105
+ ios: {
106
+ infoPlist: {
107
+ NSMicrophoneUsageDescription: 'Docyrus Assistant uses the microphone for voice prompts and transcription.',
108
+ NSCameraUsageDescription: 'Docyrus Assistant uses the camera so you can attach photos to prompts.',
109
+ NSPhotoLibraryUsageDescription: 'Docyrus Assistant uses your photo library so you can attach images to prompts.',
110
+ NSPhotoLibraryAddUsageDescription: 'Docyrus Assistant saves exported images and files to your photo library when requested.'
111
+ }
112
+ }
113
+ ```
114
+
115
+ Notes:
116
+
117
+ - these keys belong to the host app, not the package
118
+ - after changing native permission keys, rebuild the iOS app with a fresh native build such as `run:ios`
119
+ - microphone permission is requested only when the user starts recording
120
+
121
+ ## Quick Start
122
+
123
+ ```tsx
124
+ import {
125
+ DocyrusRNAssistant,
126
+ createDocyrusRNAssistantConfig
127
+ } from '@docyrus/rn-assistant';
128
+
129
+ const assistantConfig = createDocyrusRNAssistantConfig({
130
+ baseUrl: process.env.EXPO_PUBLIC_API_BASE_URL || ''
131
+ });
132
+
133
+ export function AssistantScreen() {
134
+ return (
135
+ <DocyrusRNAssistant
136
+ apiConfig={assistantConfig}
137
+ agentId={process.env.EXPO_PUBLIC_ASSISTANT_AGENT_ID || ''}
138
+ dataSourceId={process.env.EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID}
139
+ credentials={{
140
+ token: session.accessToken,
141
+ userId: session.userId
142
+ }}
143
+ userId={session.userId}
144
+ showHeader
145
+ />
146
+ );
147
+ }
148
+ ```
149
+
150
+ ## Embedded Usage
151
+
152
+ Use this when the assistant lives inside a screen, tab, or routed page.
153
+
154
+ ```tsx
155
+ import {
156
+ DocyrusRNAssistantEmbedded,
157
+ createDocyrusRNAssistantConfig
158
+ } from '@docyrus/rn-assistant';
159
+
160
+ const assistantConfig = createDocyrusRNAssistantConfig({
161
+ baseUrl: process.env.EXPO_PUBLIC_API_BASE_URL || ''
162
+ });
163
+
164
+ export function AssistantTab() {
165
+ return (
166
+ <DocyrusRNAssistantEmbedded
167
+ apiConfig={assistantConfig}
168
+ agentId={process.env.EXPO_PUBLIC_ASSISTANT_AGENT_ID || ''}
169
+ dataSourceId={process.env.EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID}
170
+ credentials={{
171
+ token: session.accessToken,
172
+ userId: session.userId
173
+ }}
174
+ userId={session.userId}
175
+ showHeader
176
+ />
177
+ );
178
+ }
179
+ ```
180
+
181
+ ## Modal Usage
182
+
183
+ Use this when the assistant opens from a dedicated trigger or overlay flow.
184
+
185
+ ```tsx
186
+ import { useState } from 'react';
187
+
188
+ import {
189
+ DocyrusRNAssistantModal,
190
+ createDocyrusRNAssistantConfig
191
+ } from '@docyrus/rn-assistant';
192
+
193
+ const assistantConfig = createDocyrusRNAssistantConfig({
194
+ baseUrl: process.env.EXPO_PUBLIC_API_BASE_URL || ''
195
+ });
196
+
197
+ export function AssistantLauncher() {
198
+ const [open, setOpen] = useState(false);
199
+
200
+ return (
201
+ <>
202
+ <Button title="Open Assistant" onPress={() => setOpen(true)} />
203
+
204
+ <DocyrusRNAssistantModal
205
+ visible={open}
206
+ onClose={() => setOpen(false)}
207
+ apiConfig={assistantConfig}
208
+ agentId={process.env.EXPO_PUBLIC_ASSISTANT_AGENT_ID || ''}
209
+ dataSourceId={process.env.EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID}
210
+ credentials={{
211
+ token: session.accessToken,
212
+ userId: session.userId
213
+ }}
214
+ userId={session.userId}
215
+ showHeader
216
+ modalAnimationType="slide"
217
+ />
218
+ </>
219
+ );
220
+ }
221
+ ```
222
+
223
+ ## Bottom Sheet Usage
224
+
225
+ Use this when the assistant should open from a bottom menu or action-sheet style trigger.
226
+
227
+ ```tsx
228
+ import { useState } from 'react';
229
+
230
+ import {
231
+ DocyrusRNAssistantSheet,
232
+ createDocyrusRNAssistantConfig
233
+ } from '@docyrus/rn-assistant';
234
+
235
+ const assistantConfig = createDocyrusRNAssistantConfig({
236
+ baseUrl: process.env.EXPO_PUBLIC_API_BASE_URL || ''
237
+ });
238
+
239
+ export function AssistantBottomSheet() {
240
+ const [open, setOpen] = useState(false);
241
+
242
+ return (
243
+ <>
244
+ <Button title="Open Assistant Sheet" onPress={() => setOpen(true)} />
245
+
246
+ <DocyrusRNAssistantSheet
247
+ visible={open}
248
+ onClose={() => setOpen(false)}
249
+ sheetDetent="large"
250
+ apiConfig={assistantConfig}
251
+ agentId={process.env.EXPO_PUBLIC_ASSISTANT_AGENT_ID || ''}
252
+ dataSourceId={process.env.EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID}
253
+ credentials={{
254
+ token: session.accessToken,
255
+ userId: session.userId
256
+ }}
257
+ userId={session.userId}
258
+ showHeader
259
+ />
260
+ </>
261
+ );
262
+ }
263
+ ```
264
+
265
+ ## One Component, Multiple Presentation Modes
266
+
267
+ If you want to switch presentation with a prop:
268
+
269
+ ```tsx
270
+ import { DocyrusRNAssistant } from '@docyrus/rn-assistant';
271
+
272
+ <DocyrusRNAssistant
273
+ presentation="embedded"
274
+ apiConfig={assistantConfig}
275
+ agentId={agentId}
276
+ dataSourceId={dataSourceId}
277
+ credentials={{ token, userId }}
278
+ />;
279
+ ```
280
+
281
+ ```tsx
282
+ import { DocyrusRNAssistant } from '@docyrus/rn-assistant';
283
+
284
+ <DocyrusRNAssistant
285
+ presentation="modal"
286
+ visible={isOpen}
287
+ onClose={() => setIsOpen(false)}
288
+ modalAnimationType="slide"
289
+ apiConfig={assistantConfig}
290
+ agentId={agentId}
291
+ dataSourceId={dataSourceId}
292
+ credentials={{ token, userId }}
293
+ />;
294
+ ```
295
+
296
+ ```tsx
297
+ import { DocyrusRNAssistant } from '@docyrus/rn-assistant';
298
+
299
+ <DocyrusRNAssistant
300
+ presentation="sheet"
301
+ visible={isOpen}
302
+ onClose={() => setIsOpen(false)}
303
+ sheetDetent="large"
304
+ apiConfig={assistantConfig}
305
+ agentId={agentId}
306
+ dataSourceId={dataSourceId}
307
+ credentials={{ token, userId }}
308
+ />;
309
+ ```
310
+
311
+ ## Authentication Model
312
+
313
+ The assistant package does not implement the host app login screen. Recommended flow:
314
+
315
+ 1. Host app signs the user in.
316
+ 2. Host app receives `accessToken` and `userId`.
317
+ 3. Host app passes them to the assistant through `credentials` and `userId`.
318
+
319
+ Example:
320
+
321
+ ```tsx
322
+ <DocyrusRNAssistantEmbedded
323
+ apiConfig={assistantConfig}
324
+ agentId={agentId}
325
+ dataSourceId={dataSourceId}
326
+ credentials={{
327
+ token: session.accessToken,
328
+ userId: session.userId
329
+ }}
330
+ userId={session.userId}
331
+ />
332
+ ```
333
+
334
+ If you do not pass a valid token:
335
+
336
+ - UI may still render
337
+ - authenticated chat and session requests may fail
338
+ - deployment loading may fail if the token does not include required AI scopes
339
+
340
+ ## API Config Helper
341
+
342
+ The default helper is for the Docyrus backend contract:
343
+
344
+ ```tsx
345
+ import { createDocyrusRNAssistantConfig } from '@docyrus/rn-assistant';
346
+
347
+ const assistantConfig = createDocyrusRNAssistantConfig({
348
+ baseUrl: 'https://alpha-api.docyrus.com/v1',
349
+ token: accessToken
350
+ });
351
+ ```
352
+
353
+ It prepares:
354
+
355
+ - Docyrus endpoint paths
356
+ - Docyrus response unwrapping with `transformResponse`
357
+ - optional `Authorization` header if `token` is provided
358
+
359
+ Default endpoints included by the helper:
360
+
361
+ - deployment: `/ai/agent-deployments/base/:agentId`
362
+ - chat: `/ai/agents/:agentId/chat`
363
+ - sessions: `/apps/base/data-sources/thread/items`
364
+ - messages: `/apps/base/data-sources/message/items`
365
+ - create thread: `/apps/base/data-sources/thread/items`
366
+ - delete session: `/apps/base/data-sources/thread/items/:sessionId`
367
+ - transcribe: `/ai/transcribe`
368
+
369
+ ## Custom Backend Config
370
+
371
+ If another app uses the same UI package with different endpoints, pass a custom `apiConfig` object:
372
+
373
+ ```tsx
374
+ import { type AIAPIConfig } from '@docyrus/rn-assistant';
375
+
376
+ const assistantConfig: AIAPIConfig = {
377
+ baseUrl: 'https://my-api.example.com',
378
+ transformResponse: (response) => response.result,
379
+ endpoints: {
380
+ deployment: '/assistant/deployments/:agentId',
381
+ chat: '/assistant/chat/:agentId',
382
+ sessions: '/assistant/sessions',
383
+ messages: '/assistant/messages',
384
+ createThread: '/assistant/sessions',
385
+ deleteSession: '/assistant/sessions/:sessionId',
386
+ transcribe: '/assistant/transcribe'
387
+ },
388
+ headers: {
389
+ Authorization: `Bearer ${accessToken}`,
390
+ 'x-app-name': 'my-rn-app'
391
+ }
392
+ };
393
+ ```
394
+
395
+ ## Main Props
396
+
397
+ Required:
398
+
399
+ - `apiConfig`
400
+ - `agentId`
401
+
402
+ Usually required in real usage:
403
+
404
+ - `dataSourceId`
405
+ - `credentials.token`
406
+ - `credentials.userId`
407
+ - `userId`
408
+
409
+ Common optional props:
410
+
411
+ - `deploymentId`
412
+ - `headers`
413
+ - `initialMode`
414
+ - `onError`
415
+ - `showHeader`
416
+ - `onClose`
417
+ - `enableVoice`
418
+ - `enableAttachment`
419
+ - `allowedAttachmentTypes`
420
+ - `maxAttachmentSize`
421
+ - `maxAttachments`
422
+ - `showModelSelectorInInput`
423
+ - `theme`
424
+ - `presentation`
425
+ - `visible`
426
+ - `modalAnimationType`
427
+ - `sheetDetent`
428
+ - `containerStyle`
429
+
430
+ ## Theming
431
+
432
+ The package includes its own theme layer. Override only the values you need:
433
+
434
+ ```tsx
435
+ <DocyrusRNAssistant
436
+ apiConfig={assistantConfig}
437
+ agentId={agentId}
438
+ credentials={{ token, userId }}
439
+ theme={{
440
+ colors: {
441
+ primary: '#0f766e',
442
+ primaryForeground: '#ffffff',
443
+ background: '#f8fafc'
444
+ }
445
+ }}
446
+ />
447
+ ```
448
+
449
+ The default theme follows device light and dark appearance automatically.
450
+
451
+ ## Public Exports
452
+
453
+ Components:
454
+
455
+ - `DocyrusRNAssistant`
456
+ - `DocyrusRNAssistantEmbedded`
457
+ - `DocyrusRNAssistantModal`
458
+ - `DocyrusRNAssistantSheet`
459
+ - `DocyrusRNAssistantProvider`
460
+
461
+ Config and types:
462
+
463
+ - `createDocyrusRNAssistantConfig`
464
+ - `createDocyrusAPIConfig`
465
+ - `AIAPIConfig`
466
+
467
+ Hooks:
468
+
469
+ - `useAssistant`
470
+ - `useAgentModels`
471
+ - `useVoiceRecorder`
472
+ - `useAttachmentPicker`
473
+
474
+ Compatibility aliases:
475
+
476
+ - `DocyAssistant`
477
+ - `DocyAssistantProps`