@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,337 @@
1
+ "use strict";
2
+
3
+ import { useState, useCallback, useMemo, useEffect, useRef } from 'react';
4
+ import { Animated, Dimensions, View, Text, TouchableOpacity, StyleSheet } from 'react-native';
5
+ import { ArrowRight, Camera, FileText, Image as ImageIcon, Paperclip, X } from 'lucide-react-native';
6
+ import { useI18n } from '@docyrus/i18n/rn';
7
+ import { useDocyrusRNAssistantTheme } from "../../theme/index.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ /**
10
+ * AttachmentPicker - Attachment selection component using anchored dropdown
11
+ *
12
+ * Provides UI for picking documents, images, or taking photos.
13
+ * Uses native action sheet pattern for better UX.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <AttachmentPicker
18
+ * onPickDocuments={pickDocuments}
19
+ * onPickImages={pickImages}
20
+ * onTakePhoto={takePhoto}
21
+ * attachmentCount={3}
22
+ * />
23
+ * ```
24
+ */
25
+ export function AttachmentPicker({
26
+ onPickDocuments,
27
+ onPickImages,
28
+ onTakePhoto,
29
+ isLoading = false,
30
+ disabled = false,
31
+ attachmentCount = 0,
32
+ showAsModal = true,
33
+ accentColor
34
+ }) {
35
+ const theme = useDocyrusRNAssistantTheme();
36
+ const {
37
+ t
38
+ } = useI18n();
39
+ const [isOpen, setIsOpen] = useState(false);
40
+ const [anchorFrame, setAnchorFrame] = useState(null);
41
+ const finalAccentColor = accentColor || theme.colors.primary;
42
+ const triggerRef = useRef(null);
43
+ const screen = Dimensions.get('window');
44
+ const measureAnchor = useCallback(() => {
45
+ triggerRef.current?.measureInWindow((x, y, width, height) => {
46
+ setAnchorFrame({
47
+ x,
48
+ y,
49
+ width,
50
+ height
51
+ });
52
+ });
53
+ }, []);
54
+ const handleToggle = useCallback(() => {
55
+ if (disabled || isLoading) {
56
+ return;
57
+ }
58
+ if (isOpen) {
59
+ setIsOpen(false);
60
+ return;
61
+ }
62
+ measureAnchor();
63
+ setIsOpen(true);
64
+ }, [disabled, isLoading, isOpen, measureAnchor]);
65
+ const handleClose = useCallback(() => {
66
+ setIsOpen(false);
67
+ }, []);
68
+ const dropdownAnim = useRef(new Animated.Value(0)).current;
69
+
70
+ // Build inline options for non-modal mode
71
+ const options = useMemo(() => {
72
+ const baseOptions = [{
73
+ type: 'document',
74
+ label: t('assistant.document', 'Document'),
75
+ onPress: () => {
76
+ setIsOpen(false);
77
+ setTimeout(() => {
78
+ onPickDocuments();
79
+ }, 120);
80
+ }
81
+ }, {
82
+ type: 'image',
83
+ label: t('assistant.photo-library', 'Photo Library'),
84
+ onPress: () => {
85
+ setIsOpen(false);
86
+ setTimeout(() => {
87
+ onPickImages();
88
+ }, 120);
89
+ }
90
+ }];
91
+ if (onTakePhoto) {
92
+ baseOptions.push({
93
+ type: 'camera',
94
+ label: t('assistant.take-photo', 'Take Photo'),
95
+ onPress: () => {
96
+ setIsOpen(false);
97
+ setTimeout(() => {
98
+ onTakePhoto();
99
+ }, 120);
100
+ }
101
+ });
102
+ }
103
+ return baseOptions;
104
+ }, [onPickDocuments, onPickImages, onTakePhoto, t]);
105
+ useEffect(() => {
106
+ if (isOpen) {
107
+ requestAnimationFrame(() => {
108
+ measureAnchor();
109
+ });
110
+ }
111
+ }, [isOpen, measureAnchor]);
112
+ useEffect(() => {
113
+ Animated.spring(dropdownAnim, {
114
+ toValue: isOpen ? 1 : 0,
115
+ damping: 22,
116
+ stiffness: 260,
117
+ mass: 0.9,
118
+ useNativeDriver: true
119
+ }).start();
120
+ }, [dropdownAnim, isOpen]);
121
+ const renderOption = option => /*#__PURE__*/_jsxs(TouchableOpacity, {
122
+ onPress: option.onPress,
123
+ disabled: isLoading,
124
+ activeOpacity: 0.7,
125
+ style: [styles.optionItem, {
126
+ paddingVertical: theme.spacing[3],
127
+ paddingHorizontal: theme.spacing[4],
128
+ opacity: isLoading ? 0.5 : 1
129
+ }],
130
+ children: [/*#__PURE__*/_jsxs(View, {
131
+ style: [styles.optionIconContainer, {
132
+ backgroundColor: `${finalAccentColor}15`,
133
+ borderRadius: theme.borderRadius.md,
134
+ padding: theme.spacing[2],
135
+ marginRight: theme.spacing[3]
136
+ }],
137
+ children: [option.type === 'document' ? /*#__PURE__*/_jsx(FileText, {
138
+ size: 20,
139
+ color: finalAccentColor,
140
+ strokeWidth: 2.2
141
+ }) : null, option.type === 'image' ? /*#__PURE__*/_jsx(ImageIcon, {
142
+ size: 20,
143
+ color: finalAccentColor,
144
+ strokeWidth: 2.2
145
+ }) : null, option.type === 'camera' ? /*#__PURE__*/_jsx(Camera, {
146
+ size: 20,
147
+ color: finalAccentColor,
148
+ strokeWidth: 2.2
149
+ }) : null]
150
+ }), /*#__PURE__*/_jsx(Text, {
151
+ style: [styles.optionLabel, {
152
+ color: theme.colors.foreground
153
+ }],
154
+ children: option.label
155
+ }), /*#__PURE__*/_jsx(ArrowRight, {
156
+ size: 16,
157
+ color: theme.colors.mutedForeground,
158
+ strokeWidth: 2.2
159
+ })]
160
+ }, option.type);
161
+
162
+ // Inline mode - show options directly
163
+ if (!showAsModal) {
164
+ return /*#__PURE__*/_jsx(View, {
165
+ style: styles.inlineContainer,
166
+ children: options.map(renderOption)
167
+ });
168
+ }
169
+
170
+ // Anchored dropdown mode
171
+ return /*#__PURE__*/_jsxs(View, {
172
+ style: styles.root,
173
+ collapsable: false,
174
+ children: [/*#__PURE__*/_jsxs(View, {
175
+ ref: triggerRef,
176
+ collapsable: false,
177
+ style: {
178
+ position: 'relative'
179
+ },
180
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
181
+ onPress: handleToggle,
182
+ disabled: disabled || isLoading,
183
+ activeOpacity: 0.7,
184
+ style: [styles.triggerButton, {
185
+ width: 40,
186
+ height: 40,
187
+ borderRadius: 20,
188
+ opacity: disabled ? 0.5 : 1
189
+ }],
190
+ children: /*#__PURE__*/_jsx(Paperclip, {
191
+ size: 18,
192
+ color: theme.colors.mutedForeground,
193
+ strokeWidth: 2.2
194
+ })
195
+ }), attachmentCount > 0 && /*#__PURE__*/_jsx(View, {
196
+ style: [styles.badge, {
197
+ backgroundColor: finalAccentColor,
198
+ borderRadius: theme.borderRadius.full
199
+ }],
200
+ children: /*#__PURE__*/_jsx(Text, {
201
+ style: styles.badgeText,
202
+ children: attachmentCount > 9 ? '9+' : attachmentCount
203
+ })
204
+ })]
205
+ }), isOpen && anchorFrame ? /*#__PURE__*/_jsxs(View, {
206
+ pointerEvents: "box-none",
207
+ style: [styles.portalLayer, {
208
+ left: -anchorFrame.x,
209
+ top: -anchorFrame.y,
210
+ width: screen.width,
211
+ height: screen.height
212
+ }],
213
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
214
+ activeOpacity: 1,
215
+ onPress: handleClose,
216
+ style: styles.portalBackdrop
217
+ }), /*#__PURE__*/_jsxs(Animated.View, {
218
+ pointerEvents: "auto",
219
+ style: [styles.dropdown, {
220
+ backgroundColor: theme.colors.card,
221
+ borderColor: theme.colors.border,
222
+ borderRadius: theme.borderRadius.xl,
223
+ left: Math.min(Math.max(anchorFrame.x - 8, 12), screen.width - 252),
224
+ bottom: screen.height - anchorFrame.y + 8,
225
+ opacity: dropdownAnim,
226
+ transform: [{
227
+ translateY: dropdownAnim.interpolate({
228
+ inputRange: [0, 1],
229
+ outputRange: [8, 0]
230
+ })
231
+ }, {
232
+ scale: dropdownAnim.interpolate({
233
+ inputRange: [0, 1],
234
+ outputRange: [0.96, 1]
235
+ })
236
+ }]
237
+ }],
238
+ children: [/*#__PURE__*/_jsxs(View, {
239
+ style: styles.dropdownHeader,
240
+ children: [/*#__PURE__*/_jsx(Text, {
241
+ style: [styles.dropdownTitle, {
242
+ color: theme.colors.foreground
243
+ }],
244
+ children: t('assistant.add-attachment', 'Add Attachment')
245
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
246
+ onPress: handleClose,
247
+ hitSlop: {
248
+ top: 8,
249
+ bottom: 8,
250
+ left: 8,
251
+ right: 8
252
+ },
253
+ children: /*#__PURE__*/_jsx(X, {
254
+ size: 16,
255
+ color: theme.colors.mutedForeground,
256
+ strokeWidth: 2.2
257
+ })
258
+ })]
259
+ }), /*#__PURE__*/_jsx(View, {
260
+ style: styles.dropdownContent,
261
+ children: options.map(renderOption)
262
+ })]
263
+ })]
264
+ }) : null]
265
+ });
266
+ }
267
+ const styles = StyleSheet.create({
268
+ inlineContainer: {},
269
+ root: {
270
+ position: 'relative',
271
+ zIndex: 40
272
+ },
273
+ portalLayer: {
274
+ position: 'absolute',
275
+ zIndex: 120
276
+ },
277
+ portalBackdrop: {
278
+ ...StyleSheet.absoluteFillObject
279
+ },
280
+ triggerButton: {
281
+ alignItems: 'center',
282
+ justifyContent: 'center'
283
+ },
284
+ badge: {
285
+ position: 'absolute',
286
+ top: -2,
287
+ right: -2,
288
+ minWidth: 18,
289
+ height: 18,
290
+ alignItems: 'center',
291
+ justifyContent: 'center',
292
+ paddingHorizontal: 4
293
+ },
294
+ badgeText: {
295
+ color: '#ffffff',
296
+ fontSize: 10,
297
+ fontWeight: '700'
298
+ },
299
+ optionItem: {
300
+ flexDirection: 'row',
301
+ alignItems: 'center'
302
+ },
303
+ optionIconContainer: {},
304
+ optionLabel: {
305
+ flex: 1,
306
+ fontSize: 15,
307
+ fontWeight: '500'
308
+ },
309
+ dropdown: {
310
+ borderWidth: 1,
311
+ minWidth: 240,
312
+ padding: 8,
313
+ position: 'absolute',
314
+ shadowColor: '#0f172a',
315
+ shadowOffset: {
316
+ width: 0,
317
+ height: 12
318
+ },
319
+ shadowOpacity: 0.18,
320
+ shadowRadius: 24
321
+ },
322
+ dropdownHeader: {
323
+ alignItems: 'center',
324
+ flexDirection: 'row',
325
+ justifyContent: 'space-between',
326
+ paddingBottom: 6,
327
+ paddingHorizontal: 8
328
+ },
329
+ dropdownTitle: {
330
+ fontSize: 13,
331
+ fontWeight: '700'
332
+ },
333
+ dropdownContent: {
334
+ gap: 2
335
+ }
336
+ });
337
+ //# sourceMappingURL=attachment-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useState","useCallback","useMemo","useEffect","useRef","Animated","Dimensions","View","Text","TouchableOpacity","StyleSheet","ArrowRight","Camera","FileText","Image","ImageIcon","Paperclip","X","useI18n","useDocyrusRNAssistantTheme","jsx","_jsx","jsxs","_jsxs","AttachmentPicker","onPickDocuments","onPickImages","onTakePhoto","isLoading","disabled","attachmentCount","showAsModal","accentColor","theme","t","isOpen","setIsOpen","anchorFrame","setAnchorFrame","finalAccentColor","colors","primary","triggerRef","screen","get","measureAnchor","current","measureInWindow","x","y","width","height","handleToggle","handleClose","dropdownAnim","Value","options","baseOptions","type","label","onPress","setTimeout","push","requestAnimationFrame","spring","toValue","damping","stiffness","mass","useNativeDriver","start","renderOption","option","activeOpacity","style","styles","optionItem","paddingVertical","spacing","paddingHorizontal","opacity","children","optionIconContainer","backgroundColor","borderRadius","md","padding","marginRight","size","color","strokeWidth","optionLabel","foreground","mutedForeground","inlineContainer","map","root","collapsable","ref","position","triggerButton","badge","full","badgeText","pointerEvents","portalLayer","left","top","portalBackdrop","dropdown","card","borderColor","border","xl","Math","min","max","bottom","transform","translateY","interpolate","inputRange","outputRange","scale","dropdownHeader","dropdownTitle","hitSlop","right","dropdownContent","create","zIndex","absoluteFillObject","alignItems","justifyContent","minWidth","fontSize","fontWeight","flexDirection","flex","borderWidth","shadowColor","shadowOffset","shadowOpacity","shadowRadius","paddingBottom","gap"],"sourceRoot":"../../../../src","sources":["components/prompt-input/attachment-picker.tsx"],"mappings":";;AAAA,SACEA,QAAQ,EAAEC,WAAW,EAAEC,OAAO,EAAEC,SAAS,EAAEC,MAAM,QAC5C,OAAO;AAEd,SACEC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,QACL,cAAc;AACrB,SACEC,UAAU,EACVC,MAAM,EACNC,QAAQ,EACRC,KAAK,IAAIC,SAAS,EAClBC,SAAS,EACTC,CAAC,QACI,qBAAqB;AAE5B,SAASC,OAAO,QAAQ,kBAAkB;AAG1C,SAASC,0BAA0B,QAAQ,sBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAmDzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAC;EAC/BC,eAAe;EACfC,YAAY;EACZC,WAAW;EACXC,SAAS,GAAG,KAAK;EACjBC,QAAQ,GAAG,KAAK;EAChBC,eAAe,GAAG,CAAC;EACnBC,WAAW,GAAG,IAAI;EAClBC;AACqB,CAAC,EAAE;EACxB,MAAMC,KAAK,GAAGd,0BAA0B,CAAC,CAAC;EAC1C,MAAM;IAAEe;EAAE,CAAC,GAAGhB,OAAO,CAAC,CAAC;EACvB,M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L,UAAU,EAAE;EACd,CAAC;EACDlD,mBAAmB,EAAE,CAAC,CAAC;EACvBS,WAAW,EAAE;IACX+C,IAAI,EAAE,CAAC;IACPH,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACD3B,QAAQ,EAAE;IACR8B,WAAW,EAAE,CAAC;IACdL,QAAQ,EAAE,GAAG;IACbhD,OAAO,EAAE,CAAC;IACVa,QAAQ,EAAE,UAAU;IACpByC,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;MAAE3F,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAG,CAAC;IACtC2F,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;EAChB,CAAC;EACDnB,cAAc,EAAE;IACdQ,UAAU,EAAE,QAAQ;IACpBK,aAAa,EAAE,KAAK;IACpBJ,cAAc,EAAE,eAAe;IAC/BW,aAAa,EAAE,CAAC;IAChBjE,iBAAiB,EAAE;EACrB,CAAC;EACD8C,aAAa,EAAE;IACbU,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDR,eAAe,EAAE;IACfiB,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,225 @@
1
+ "use strict";
2
+
3
+ import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
4
+ import { Image } from 'expo-image';
5
+ import { useDocyrusRNAssistantTheme } from "../../theme/index.js";
6
+ import { DocyrusIcon } from "../../ui/index.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ /**
9
+ * Get file icon based on MIME type
10
+ */
11
+ const getFileIcon = mimeType => {
12
+ if (mimeType.startsWith('image/')) return 'image-02';
13
+ if (mimeType.startsWith('video/')) return 'video-01';
14
+ if (mimeType.startsWith('audio/')) return 'music-note-01';
15
+ if (mimeType.includes('pdf')) return 'pdf-02';
16
+ if (mimeType.includes('word') || mimeType.includes('document')) return 'doc-01';
17
+ if (mimeType.includes('sheet') || mimeType.includes('excel')) return 'xls-01';
18
+ if (mimeType.includes('presentation') || mimeType.includes('powerpoint')) return 'ppt-01';
19
+ if (mimeType.includes('text')) return 'txt-01';
20
+ return 'file-02';
21
+ };
22
+
23
+ /**
24
+ * Format file size
25
+ */
26
+ const formatFileSize = bytes => {
27
+ if (!bytes) return '';
28
+ if (bytes < 1024) return `${bytes} B`;
29
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
30
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
31
+ };
32
+
33
+ /**
34
+ * Check if file is an image
35
+ */
36
+ const isImageFile = mimeType => mimeType.startsWith('image/');
37
+
38
+ /**
39
+ * AttachmentPreview - Preview attached files
40
+ *
41
+ * Displays attached files as removable chips/cards.
42
+ * Supports image thumbnails and file type icons.
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * <AttachmentPreview
47
+ * attachments={attachments}
48
+ * onRemove={(id) => removeAttachment(id)}
49
+ * onPress={(file) => previewFile(file)}
50
+ * />
51
+ * ```
52
+ */
53
+ export function AttachmentPreview({
54
+ attachments,
55
+ onRemove,
56
+ onPress,
57
+ maxVisible = 4,
58
+ horizontal = true
59
+ }) {
60
+ const theme = useDocyrusRNAssistantTheme();
61
+ if (attachments.length === 0) {
62
+ return null;
63
+ }
64
+ const visibleAttachments = attachments.slice(0, maxVisible);
65
+ const hiddenCount = attachments.length - maxVisible;
66
+ const renderAttachment = attachment => {
67
+ const isImage = isImageFile(attachment.type);
68
+ return /*#__PURE__*/_jsxs(View, {
69
+ style: [styles.attachmentItem, {
70
+ backgroundColor: theme.colors.muted,
71
+ borderRadius: theme.borderRadius.md,
72
+ marginRight: horizontal ? theme.spacing[2] : 0,
73
+ marginBottom: horizontal ? 0 : theme.spacing[2]
74
+ }],
75
+ children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
76
+ onPress: () => onPress?.(attachment),
77
+ disabled: !onPress,
78
+ style: styles.attachmentContent,
79
+ children: [isImage ? /*#__PURE__*/_jsx(Image, {
80
+ source: {
81
+ uri: attachment.uri
82
+ },
83
+ style: [styles.thumbnail, {
84
+ borderRadius: theme.borderRadius.sm
85
+ }],
86
+ contentFit: "cover"
87
+ }) : /*#__PURE__*/_jsx(View, {
88
+ style: [styles.iconContainer, {
89
+ backgroundColor: `${theme.colors.primary}15`,
90
+ borderRadius: theme.borderRadius.sm
91
+ }],
92
+ children: /*#__PURE__*/_jsx(DocyrusIcon, {
93
+ icon: getFileIcon(attachment.type),
94
+ size: 20,
95
+ color: theme.colors.primary
96
+ })
97
+ }), /*#__PURE__*/_jsxs(View, {
98
+ style: styles.fileInfo,
99
+ children: [/*#__PURE__*/_jsx(Text, {
100
+ style: [styles.fileName, {
101
+ color: theme.colors.foreground
102
+ }],
103
+ numberOfLines: 1,
104
+ children: attachment.name
105
+ }), attachment.size && /*#__PURE__*/_jsx(Text, {
106
+ style: [styles.fileSize, {
107
+ color: theme.colors.mutedForeground
108
+ }],
109
+ children: formatFileSize(attachment.size)
110
+ })]
111
+ })]
112
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
113
+ onPress: () => onRemove(attachment.id),
114
+ hitSlop: {
115
+ top: 8,
116
+ right: 8,
117
+ bottom: 8,
118
+ left: 8
119
+ },
120
+ style: [styles.removeButton, {
121
+ backgroundColor: theme.colors.background,
122
+ borderRadius: theme.borderRadius.full
123
+ }],
124
+ children: /*#__PURE__*/_jsx(DocyrusIcon, {
125
+ icon: "cancel-01",
126
+ size: 12,
127
+ color: theme.colors.mutedForeground
128
+ })
129
+ })]
130
+ }, attachment.id);
131
+ };
132
+
133
+ // Render "+X more" indicator
134
+ const renderHiddenIndicator = () => {
135
+ if (hiddenCount <= 0) return null;
136
+ return /*#__PURE__*/_jsx(View, {
137
+ style: [styles.hiddenIndicator, {
138
+ backgroundColor: theme.colors.muted,
139
+ borderRadius: theme.borderRadius.md
140
+ }],
141
+ children: /*#__PURE__*/_jsxs(Text, {
142
+ style: [styles.hiddenText, {
143
+ color: theme.colors.foreground
144
+ }],
145
+ children: ["+", hiddenCount]
146
+ })
147
+ });
148
+ };
149
+ if (horizontal) {
150
+ return /*#__PURE__*/_jsxs(ScrollView, {
151
+ horizontal: true,
152
+ showsHorizontalScrollIndicator: false,
153
+ contentContainerStyle: [styles.horizontalContainer, {
154
+ paddingVertical: theme.spacing[2]
155
+ }],
156
+ children: [visibleAttachments.map(renderAttachment), renderHiddenIndicator()]
157
+ });
158
+ }
159
+ return /*#__PURE__*/_jsxs(View, {
160
+ style: styles.verticalContainer,
161
+ children: [visibleAttachments.map(renderAttachment), renderHiddenIndicator()]
162
+ });
163
+ }
164
+ const styles = StyleSheet.create({
165
+ horizontalContainer: {
166
+ flexDirection: 'row',
167
+ alignItems: 'center'
168
+ },
169
+ verticalContainer: {},
170
+ attachmentItem: {
171
+ flexDirection: 'row',
172
+ alignItems: 'center',
173
+ padding: 8,
174
+ maxWidth: 200,
175
+ position: 'relative'
176
+ },
177
+ attachmentContent: {
178
+ flexDirection: 'row',
179
+ alignItems: 'center',
180
+ flex: 1,
181
+ marginRight: 20
182
+ },
183
+ thumbnail: {
184
+ width: 40,
185
+ height: 40
186
+ },
187
+ iconContainer: {
188
+ width: 40,
189
+ height: 40,
190
+ alignItems: 'center',
191
+ justifyContent: 'center'
192
+ },
193
+ fileInfo: {
194
+ flex: 1,
195
+ marginLeft: 10
196
+ },
197
+ fileName: {
198
+ fontSize: 13,
199
+ fontWeight: '500'
200
+ },
201
+ fileSize: {
202
+ fontSize: 11,
203
+ marginTop: 2
204
+ },
205
+ removeButton: {
206
+ position: 'absolute',
207
+ top: -4,
208
+ right: -4,
209
+ width: 20,
210
+ height: 20,
211
+ alignItems: 'center',
212
+ justifyContent: 'center'
213
+ },
214
+ hiddenIndicator: {
215
+ paddingHorizontal: 12,
216
+ paddingVertical: 8,
217
+ alignItems: 'center',
218
+ justifyContent: 'center'
219
+ },
220
+ hiddenText: {
221
+ fontSize: 13,
222
+ fontWeight: '600'
223
+ }
224
+ });
225
+ //# sourceMappingURL=attachment-preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","Text","TouchableOpacity","ScrollView","StyleSheet","Image","useDocyrusRNAssistantTheme","DocyrusIcon","jsx","_jsx","jsxs","_jsxs","getFileIcon","mimeType","startsWith","includes","formatFileSize","bytes","toFixed","isImageFile","AttachmentPreview","attachments","onRemove","onPress","maxVisible","horizontal","theme","length","visibleAttachments","slice","hiddenCount","renderAttachment","attachment","isImage","type","style","styles","attachmentItem","backgroundColor","colors","muted","borderRadius","md","marginRight","spacing","marginBottom","children","disabled","attachmentContent","source","uri","thumbnail","sm","contentFit","iconContainer","primary","icon","size","color","fileInfo","fileName","foreground","numberOfLines","name","fileSize","mutedForeground","id","hitSlop","top","right","bottom","left","removeButton","background","full","renderHiddenIndicator","hiddenIndicator","hiddenText","showsHorizontalScrollIndicator","contentContainerStyle","horizontalContainer","paddingVertical","map","verticalContainer","create","flexDirection","alignItems","padding","maxWidth","position","flex","width","height","justifyContent","marginLeft","fontSize","fontWeight","marginTop","paddingHorizontal"],"sourceRoot":"../../../../src","sources":["components/prompt-input/attachment-preview.tsx"],"mappings":";;AAAA,SACEA,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,UAAU,QACL,cAAc;AACrB,SAASC,KAAK,QAAQ,YAAY;AAGlC,SAASC,0BAA0B,QAAQ,sBAAa;AACxD,SAASC,WAAW,QAAQ,mBAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA+BvC;AACA;AACA;AACA,MAAMC,WAAW,GAAIC,QAAgB,IAAa;EAChD,IAAIA,QAAQ,CAACC,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,UAAU;EACpD,IAAID,QAAQ,CAACC,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,UAAU;EACpD,IAAID,QAAQ,CAACC,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,eAAe;EACzD,IAAID,QAA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IACfsB,iBAAiB,EAAE,EAAE;IACrBjB,eAAe,EAAE,CAAC;IAClBK,UAAU,EAAE,QAAQ;IACpBO,cAAc,EAAE;EAClB,CAAC;EACDhB,UAAU,EAAE;IACVkB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * PromptInput Components
5
+ */
6
+
7
+ // Main Component
8
+ export { PromptInput } from "./prompt-input.js";
9
+
10
+ // Sub-Components
11
+ export { ProviderSelector } from "./provider-selector.js";
12
+ export { VoiceRecorder } from "./voice-recorder.js";
13
+ export { AttachmentPicker } from "./attachment-picker.js";
14
+ export { AttachmentPreview } from "./attachment-preview.js";
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PromptInput","ProviderSelector","VoiceRecorder","AttachmentPicker","AttachmentPreview"],"sourceRoot":"../../../../src","sources":["components/prompt-input/index.ts"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA,SAASA,WAAW,QAA+B,mBAAgB;;AAEnE;AACA,SAASC,gBAAgB,QAAoC,wBAAqB;AAClF,SAASC,aAAa,QAAiC,qBAAkB;AACzE,SAASC,gBAAgB,QAAoC,wBAAqB;AAClF,SAASC,iBAAiB,QAAqC,yBAAsB","ignoreList":[]}