@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,100 @@
1
+ "use strict";
2
+
3
+ import { createContext, useContext, useMemo } from 'react';
4
+ import { useColorScheme } from 'react-native';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ const ThemeContext = /*#__PURE__*/createContext(undefined);
7
+ const baseSpacing = {
8
+ 0: 0,
9
+ 0.5: 2,
10
+ 1: 4,
11
+ 1.5: 6,
12
+ 2: 8,
13
+ 2.5: 10,
14
+ 3: 12,
15
+ 3.5: 14,
16
+ 4: 16,
17
+ 5: 20,
18
+ 6: 24,
19
+ 7: 28,
20
+ 8: 32
21
+ };
22
+ const baseRadius = {
23
+ sm: 8,
24
+ md: 12,
25
+ lg: 16,
26
+ xl: 20,
27
+ full: 999
28
+ };
29
+ const lightColors = {
30
+ background: '#ffffff',
31
+ foreground: '#111827',
32
+ card: '#f8fafc',
33
+ cardForeground: '#111827',
34
+ muted: '#eef2f7',
35
+ mutedForeground: '#667085',
36
+ border: '#dbe3ee',
37
+ primary: '#dc2626',
38
+ primaryForeground: '#ffffff',
39
+ destructive: '#dc2626',
40
+ destructiveForeground: '#ffffff',
41
+ success: '#16a34a',
42
+ successForeground: '#ffffff',
43
+ warning: '#d97706',
44
+ warningForeground: '#ffffff'
45
+ };
46
+ const darkColors = {
47
+ background: '#0b1220',
48
+ foreground: '#f8fafc',
49
+ card: '#111827',
50
+ cardForeground: '#f8fafc',
51
+ muted: '#1f2937',
52
+ mutedForeground: '#94a3b8',
53
+ border: '#243041',
54
+ primary: '#ef4444',
55
+ primaryForeground: '#ffffff',
56
+ destructive: '#ef4444',
57
+ destructiveForeground: '#ffffff',
58
+ success: '#22c55e',
59
+ successForeground: '#052e16',
60
+ warning: '#f59e0b',
61
+ warningForeground: '#111827'
62
+ };
63
+ function buildTheme(isDark, overrides) {
64
+ return {
65
+ colors: {
66
+ ...(isDark ? darkColors : lightColors),
67
+ ...overrides?.colors
68
+ },
69
+ spacing: {
70
+ ...baseSpacing,
71
+ ...overrides?.spacing
72
+ },
73
+ borderRadius: {
74
+ ...baseRadius,
75
+ ...overrides?.borderRadius
76
+ },
77
+ isDark
78
+ };
79
+ }
80
+ export function DocyrusRNAssistantProvider({
81
+ children,
82
+ mode = 'system',
83
+ theme
84
+ }) {
85
+ const value = useMemo(() => ({
86
+ mode,
87
+ overrides: theme
88
+ }), [mode, theme]);
89
+ return /*#__PURE__*/_jsx(ThemeContext.Provider, {
90
+ value: value,
91
+ children: children
92
+ });
93
+ }
94
+ export function useDocyrusRNAssistantTheme() {
95
+ const systemColorScheme = useColorScheme();
96
+ const context = useContext(ThemeContext);
97
+ const isDark = context?.mode === 'dark' || context?.mode !== 'light' && systemColorScheme === 'dark';
98
+ return useMemo(() => buildTheme(isDark, context?.overrides), [context?.overrides, isDark]);
99
+ }
100
+ //# sourceMappingURL=assistant-theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","useMemo","useColorScheme","jsx","_jsx","ThemeContext","undefined","baseSpacing","baseRadius","sm","md","lg","xl","full","lightColors","background","foreground","card","cardForeground","muted","mutedForeground","border","primary","primaryForeground","destructive","destructiveForeground","success","successForeground","warning","warningForeground","darkColors","buildTheme","isDark","overrides","colors","spacing","borderRadius","DocyrusRNAssistantProvider","children","mode","theme","value","Provider","useDocyrusRNAssistantTheme","systemColorScheme","context"],"sourceRoot":"../../../src","sources":["theme/assistant-theme.tsx"],"mappings":";;AAAA,SAEEA,aAAa,EACbC,UAAU,EACVC,OAAO,QACF,OAAO;AAEd,SAASC,cAAc,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAuD9C,MAAMC,YAAY,gBAAGN,aAAa,CAAgCO,SAAS,CAAC;AAE5E,MAAMC,WAAkC,GAAG;EACzC,CAAC,EAAE,CAAC;EACJ,GAAG,EAAE,CAAC;EACN,CAAC,EAAE,CAAC;EACJ,GAAG,EAAE,CAAC;EACN,CAAC,EAAE,CAAC;EACJ,GAAG,EAAE,EAAE;EACP,CAAC,EAAE,EAAE;EACL,GAAG,EAAE,EAAE;EACP,CAAC,EAAE,EAAE;EACL,CAAC,EAAE,EAAE;EACL,CAAC,EAAE,EAAE;EACL,CAAC,EAAE,EAAE;EACL,CAAC,EAAE;AACL,CAAC;AAED,MAAMC,UAAgC,GAAG;EACvCC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,IAAI,EAAE;AACR,CAAC;AAED,MAAMC,WAAiC,GAAG;EACxCC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,cAAc,EAAE,SAAS;EACzBC,KAAK,EAAE,SAAS;EAChBC,eAAe,EAAE,SAAS;E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AAI,EAAEC,KAAK,CAAC,CAAC;EAExE,oBACEpC,IAAA,CAACC,YAAY,CAACqC,QAAQ;IAACD,KAAK,EAAEA,KAAM;IAAAH,QAAA,EACjCA;EAAQ,CACY,CAAC;AAE5B;AAEA,OAAO,SAASK,0BAA0BA,CAAA,EAA4B;EACpE,MAAMC,iBAAiB,GAAG1C,cAAc,CAAC,CAAC;EAC1C,MAAM2C,OAAO,GAAG7C,UAAU,CAACK,YAAY,CAAC;EAExC,MAAM2B,MAAM,GAAGa,OAAO,EAAEN,IAAI,KAAK,MAAM,IACjCM,OAAO,EAAEN,IAAI,KAAK,OAAO,IAAIK,iBAAiB,KAAK,MAAO;EAEhE,OAAO3C,OAAO,CAAC,MAAM8B,UAAU,CAACC,MAAM,EAAEa,OAAO,EAAEZ,SAAS,CAAC,EAAE,CAACY,OAAO,EAAEZ,SAAS,EAAED,MAAM,CAAC,CAAC;AAC5F","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { DocyrusRNAssistantProvider, useDocyrusRNAssistantTheme } from "./assistant-theme.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DocyrusRNAssistantProvider","useDocyrusRNAssistantTheme"],"sourceRoot":"../../../src","sources":["theme/index.ts"],"mappings":";;AAAA,SACEA,0BAA0B,EAI1BC,0BAA0B,QACrB,sBAAmB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,344 @@
1
+ "use strict";
2
+
3
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4
+ import { Animated, Dimensions, Easing, PanResponder, Pressable, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
5
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
+ import { useDocyrusRNAssistantTheme } from "../theme/index.js";
7
+ import { DocyrusIcon } from "./docyrus-icon.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ const ratioMap = {
10
+ small: 0.42,
11
+ medium: 0.72,
12
+ large: 1
13
+ };
14
+ function resolveMaxHeight(detent, topInset) {
15
+ const screenHeight = Dimensions.get('window').height;
16
+ const availableHeight = Math.max(screenHeight - Math.max(topInset - 8, 0), 320);
17
+ if (detent === 'fit') {
18
+ return undefined;
19
+ }
20
+ if (detent === 'large') {
21
+ return availableHeight;
22
+ }
23
+ return Math.round(availableHeight * ratioMap[detent]);
24
+ }
25
+ export function ActionSheet({
26
+ actions = [],
27
+ cancelLabel,
28
+ children,
29
+ closeOnBackdrop = true,
30
+ contentContainerStyle,
31
+ detent = 'fit',
32
+ detents,
33
+ fixedContent,
34
+ message,
35
+ onClose,
36
+ scrollable = true,
37
+ showCancel = false,
38
+ title,
39
+ visible
40
+ }) {
41
+ const theme = useDocyrusRNAssistantTheme();
42
+ const insets = useSafeAreaInsets();
43
+ const resolvedDetent = useMemo(() => detents?.[0] ?? detent, [detent, detents]);
44
+ const maxHeight = resolveMaxHeight(resolvedDetent, insets.top);
45
+ const [isMounted, setIsMounted] = useState(visible);
46
+ const progress = useRef(new Animated.Value(visible ? 1 : 0)).current;
47
+ const dragY = useRef(new Animated.Value(0)).current;
48
+ const sheetTravel = maxHeight ?? Math.round(Dimensions.get('window').height * 0.9);
49
+ const closeThreshold = Math.min(140, Math.max(64, sheetTravel * 0.18));
50
+ const finishClose = useCallback(() => {
51
+ dragY.setValue(0);
52
+ onClose();
53
+ }, [dragY, onClose]);
54
+ useEffect(() => {
55
+ if (visible) {
56
+ setIsMounted(true);
57
+ dragY.setValue(0);
58
+ Animated.spring(progress, {
59
+ toValue: 1,
60
+ damping: 24,
61
+ stiffness: 260,
62
+ mass: 0.9,
63
+ useNativeDriver: true
64
+ }).start();
65
+ return;
66
+ }
67
+ Animated.timing(progress, {
68
+ toValue: 0,
69
+ duration: 220,
70
+ easing: Easing.out(Easing.cubic),
71
+ useNativeDriver: true
72
+ }).start(({
73
+ finished
74
+ }) => {
75
+ if (finished) {
76
+ setIsMounted(false);
77
+ dragY.setValue(0);
78
+ }
79
+ });
80
+ }, [dragY, progress, visible]);
81
+ const requestClose = useCallback(() => {
82
+ Animated.parallel([Animated.timing(progress, {
83
+ toValue: 0,
84
+ duration: 180,
85
+ easing: Easing.out(Easing.cubic),
86
+ useNativeDriver: true
87
+ }), Animated.timing(dragY, {
88
+ toValue: Math.min(closeThreshold, 72),
89
+ duration: 180,
90
+ easing: Easing.out(Easing.cubic),
91
+ useNativeDriver: true
92
+ })]).start(({
93
+ finished
94
+ }) => {
95
+ if (finished) {
96
+ finishClose();
97
+ }
98
+ });
99
+ }, [closeThreshold, dragY, finishClose, progress]);
100
+ const panResponder = useMemo(() => PanResponder.create({
101
+ onMoveShouldSetPanResponder: (_, gestureState) => gestureState.dy > 6 && Math.abs(gestureState.dy) > Math.abs(gestureState.dx),
102
+ onPanResponderGrant: () => {
103
+ dragY.stopAnimation();
104
+ },
105
+ onPanResponderMove: (_, gestureState) => {
106
+ dragY.setValue(Math.max(0, gestureState.dy));
107
+ },
108
+ onPanResponderRelease: (_, gestureState) => {
109
+ if (gestureState.dy > closeThreshold || gestureState.vy > 1.15) {
110
+ requestClose();
111
+ return;
112
+ }
113
+ Animated.spring(dragY, {
114
+ toValue: 0,
115
+ damping: 22,
116
+ stiffness: 240,
117
+ mass: 0.9,
118
+ useNativeDriver: true
119
+ }).start();
120
+ },
121
+ onPanResponderTerminate: () => {
122
+ Animated.spring(dragY, {
123
+ toValue: 0,
124
+ damping: 22,
125
+ stiffness: 240,
126
+ mass: 0.9,
127
+ useNativeDriver: true
128
+ }).start();
129
+ }
130
+ }), [closeThreshold, dragY, requestClose]);
131
+ const backdropOpacity = progress.interpolate({
132
+ inputRange: [0, 1],
133
+ outputRange: [0, 1]
134
+ });
135
+ const translateY = Animated.add(dragY, progress.interpolate({
136
+ inputRange: [0, 1],
137
+ outputRange: [sheetTravel, 0]
138
+ }));
139
+ if (!isMounted) {
140
+ return null;
141
+ }
142
+ return /*#__PURE__*/_jsx(View, {
143
+ pointerEvents: "box-none",
144
+ style: styles.root,
145
+ children: /*#__PURE__*/_jsx(AnimatedPressable, {
146
+ onPress: closeOnBackdrop ? requestClose : undefined,
147
+ style: [styles.backdrop, {
148
+ opacity: backdropOpacity
149
+ }],
150
+ children: /*#__PURE__*/_jsx(Animated.View, {
151
+ style: [styles.sheetFrame, {
152
+ transform: [{
153
+ translateY
154
+ }]
155
+ }],
156
+ children: /*#__PURE__*/_jsxs(Pressable, {
157
+ onPress: event => event.stopPropagation(),
158
+ style: [styles.sheet, {
159
+ backgroundColor: theme.colors.card,
160
+ borderColor: theme.colors.border,
161
+ borderTopLeftRadius: theme.borderRadius.xl,
162
+ borderTopRightRadius: theme.borderRadius.xl,
163
+ borderBottomLeftRadius: 0,
164
+ borderBottomRightRadius: 0,
165
+ height: maxHeight,
166
+ maxHeight,
167
+ paddingBottom: insets.bottom
168
+ }],
169
+ children: [/*#__PURE__*/_jsx(View, {
170
+ ...panResponder.panHandlers,
171
+ style: styles.handleTouchArea,
172
+ children: /*#__PURE__*/_jsx(View, {
173
+ style: [styles.handle, {
174
+ backgroundColor: theme.colors.border
175
+ }]
176
+ })
177
+ }), (title || message) && /*#__PURE__*/_jsxs(View, {
178
+ ...panResponder.panHandlers,
179
+ style: styles.header,
180
+ children: [title && /*#__PURE__*/_jsx(Text, {
181
+ style: [styles.title, {
182
+ color: theme.colors.foreground
183
+ }],
184
+ children: title
185
+ }), message && /*#__PURE__*/_jsx(Text, {
186
+ style: [styles.message, {
187
+ color: theme.colors.mutedForeground
188
+ }],
189
+ children: message
190
+ })]
191
+ }), fixedContent, (children || actions.length > 0) && (scrollable ? /*#__PURE__*/_jsxs(ScrollView, {
192
+ bounces: false,
193
+ contentContainerStyle: [styles.content, contentContainerStyle],
194
+ showsVerticalScrollIndicator: false,
195
+ children: [children, actions.map(action => /*#__PURE__*/_jsxs(TouchableOpacity, {
196
+ activeOpacity: 0.8,
197
+ disabled: action.disabled,
198
+ onPress: () => {
199
+ action.onPress();
200
+ onClose();
201
+ },
202
+ style: [styles.actionRow, {
203
+ backgroundColor: theme.colors.muted,
204
+ borderRadius: theme.borderRadius.lg,
205
+ opacity: action.disabled ? 0.5 : 1
206
+ }],
207
+ children: [action.icon && /*#__PURE__*/_jsx(DocyrusIcon, {
208
+ color: action.destructive ? theme.colors.destructive : theme.colors.primary,
209
+ icon: action.icon,
210
+ size: 18
211
+ }), /*#__PURE__*/_jsx(Text, {
212
+ style: [styles.actionLabel, {
213
+ color: action.destructive ? theme.colors.destructive : theme.colors.foreground
214
+ }],
215
+ children: action.label
216
+ })]
217
+ }, action.key))]
218
+ }) : /*#__PURE__*/_jsxs(View, {
219
+ style: [styles.body, contentContainerStyle],
220
+ children: [children, actions.map(action => /*#__PURE__*/_jsxs(TouchableOpacity, {
221
+ activeOpacity: 0.8,
222
+ disabled: action.disabled,
223
+ onPress: () => {
224
+ action.onPress();
225
+ onClose();
226
+ },
227
+ style: [styles.actionRow, {
228
+ backgroundColor: theme.colors.muted,
229
+ borderRadius: theme.borderRadius.lg,
230
+ opacity: action.disabled ? 0.5 : 1
231
+ }],
232
+ children: [action.icon && /*#__PURE__*/_jsx(DocyrusIcon, {
233
+ color: action.destructive ? theme.colors.destructive : theme.colors.primary,
234
+ icon: action.icon,
235
+ size: 18
236
+ }), /*#__PURE__*/_jsx(Text, {
237
+ style: [styles.actionLabel, {
238
+ color: action.destructive ? theme.colors.destructive : theme.colors.foreground
239
+ }],
240
+ children: action.label
241
+ })]
242
+ }, action.key))]
243
+ })), showCancel && /*#__PURE__*/_jsx(TouchableOpacity, {
244
+ activeOpacity: 0.8,
245
+ onPress: requestClose,
246
+ style: [styles.cancelButton, {
247
+ backgroundColor: theme.colors.muted,
248
+ borderRadius: theme.borderRadius.lg
249
+ }],
250
+ children: /*#__PURE__*/_jsx(Text, {
251
+ style: [styles.cancelText, {
252
+ color: theme.colors.foreground
253
+ }],
254
+ children: cancelLabel ?? 'Cancel'
255
+ })
256
+ })]
257
+ })
258
+ })
259
+ })
260
+ });
261
+ }
262
+ const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
263
+ const styles = StyleSheet.create({
264
+ actionLabel: {
265
+ fontSize: 15,
266
+ fontWeight: '600'
267
+ },
268
+ actionRow: {
269
+ alignItems: 'center',
270
+ flexDirection: 'row',
271
+ gap: 10,
272
+ paddingHorizontal: 16,
273
+ paddingVertical: 14
274
+ },
275
+ root: {
276
+ ...StyleSheet.absoluteFillObject,
277
+ elevation: 1000,
278
+ zIndex: 1000
279
+ },
280
+ backdrop: {
281
+ backgroundColor: 'rgba(15, 23, 42, 0.35)',
282
+ flex: 1,
283
+ justifyContent: 'flex-end',
284
+ paddingHorizontal: 0,
285
+ paddingTop: 0
286
+ },
287
+ sheetFrame: {
288
+ alignSelf: 'stretch'
289
+ },
290
+ body: {
291
+ alignSelf: 'stretch',
292
+ flex: 1,
293
+ gap: 8,
294
+ minHeight: 0
295
+ },
296
+ cancelButton: {
297
+ alignItems: 'center',
298
+ justifyContent: 'center',
299
+ marginTop: 12,
300
+ paddingHorizontal: 16,
301
+ paddingVertical: 14
302
+ },
303
+ cancelText: {
304
+ fontSize: 15,
305
+ fontWeight: '600'
306
+ },
307
+ content: {
308
+ flexGrow: 1,
309
+ gap: 8
310
+ },
311
+ handle: {
312
+ alignSelf: 'center',
313
+ borderRadius: 999,
314
+ height: 5,
315
+ marginBottom: 12,
316
+ width: 40
317
+ },
318
+ handleTouchArea: {
319
+ alignItems: 'center',
320
+ paddingBottom: 6,
321
+ paddingTop: 6
322
+ },
323
+ header: {
324
+ gap: 6,
325
+ marginBottom: 12,
326
+ paddingHorizontal: 16
327
+ },
328
+ message: {
329
+ fontSize: 13,
330
+ lineHeight: 18
331
+ },
332
+ sheet: {
333
+ alignSelf: 'stretch',
334
+ borderWidth: 1,
335
+ flexShrink: 1,
336
+ minHeight: 0,
337
+ overflow: 'hidden'
338
+ },
339
+ title: {
340
+ fontSize: 16,
341
+ fontWeight: '700'
342
+ }
343
+ });
344
+ //# sourceMappingURL=action-sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","Animated","Dimensions","Easing","PanResponder","Pressable","ScrollView","StyleSheet","Text","TouchableOpacity","View","useSafeAreaInsets","useDocyrusRNAssistantTheme","DocyrusIcon","jsx","_jsx","jsxs","_jsxs","ratioMap","small","medium","large","resolveMaxHeight","detent","topInset","screenHeight","get","height","availableHeight","Math","max","undefined","round","ActionSheet","actions","cancelLabel","children","closeOnBackdrop","contentContainerStyle","detents","fixedContent","message","onClose","scrollable","showCancel","title","visible","theme","insets","resolvedDetent","maxHeight","top","isMounted","setIsMounted","progress","Value","current","dragY","sheetTravel","closeThreshold","min","finishClose","setValue","spring","toValue","damping","stiffness","mass","useNativeDriver","start","timing","duration","easing","out","cubic","finished","requestClose","parallel","panResponder","create","onMoveShouldSetPanResponder","_","gestureState","dy","abs","dx","onPanResponderGrant","stopAnimation","onPanResponderMove","onPanResponderRelease","vy","onPanResponderTerminate","backdropOpacity","interpolate","inputRange","outputRange","translateY","add","pointerEvents","style","styles","root","AnimatedPressable","onPress","backdrop","opacity","sheetFrame","transform","event","stopPropagation","sheet","backgroundColor","colors","card","borderColor","border","borderTopLeftRadius","borderRadius","xl","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","paddingBottom","bottom","panHandlers","handleTouchArea","handle","header","color","foreground","mutedForeground","length","bounces","content","showsVerticalScrollIndicator","map","action","activeOpacity","disabled","actionRow","muted","lg","icon","destructive","primary","size","actionLabel","label","key","body","cancelButton","cancelText","createAnimatedComponent","fontSize","fontWeight","alignItems","flexDirection","gap","paddingHorizontal","paddingVertical","absoluteFillObject","elevation","zIndex","flex","justifyContent","paddingTop","alignSelf","minHeight","marginTop","flexGrow","marginBottom","width","lineHeight","bor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AAE;IACL4G,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+
3
+ import { Modal, Pressable, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
4
+ import { useDocyrusRNAssistantTheme } from "../theme/index.js";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ export function AlertDialog({
7
+ cancelText,
8
+ confirmText,
9
+ description,
10
+ onCancel,
11
+ onConfirm,
12
+ title,
13
+ variant = 'default',
14
+ visible = false
15
+ }) {
16
+ const theme = useDocyrusRNAssistantTheme();
17
+ const confirmBackground = variant === 'destructive' ? theme.colors.destructive : variant === 'success' ? theme.colors.success : variant === 'warning' ? theme.colors.warning : theme.colors.primary;
18
+ const confirmForeground = variant === 'success' ? theme.colors.successForeground : variant === 'warning' ? theme.colors.warningForeground : theme.colors.primaryForeground;
19
+ return /*#__PURE__*/_jsx(Modal, {
20
+ animationType: "fade",
21
+ onRequestClose: onCancel,
22
+ statusBarTranslucent: true,
23
+ transparent: true,
24
+ visible: visible,
25
+ children: /*#__PURE__*/_jsx(Pressable, {
26
+ onPress: onCancel,
27
+ style: styles.backdrop,
28
+ children: /*#__PURE__*/_jsxs(Pressable, {
29
+ onPress: event => event.stopPropagation(),
30
+ style: [styles.dialog, {
31
+ backgroundColor: theme.colors.card,
32
+ borderColor: theme.colors.border,
33
+ borderRadius: theme.borderRadius.xl
34
+ }],
35
+ children: [/*#__PURE__*/_jsx(Text, {
36
+ style: [styles.title, {
37
+ color: theme.colors.foreground
38
+ }],
39
+ children: title ?? 'Are you sure?'
40
+ }), description && /*#__PURE__*/_jsx(Text, {
41
+ style: [styles.description, {
42
+ color: theme.colors.mutedForeground
43
+ }],
44
+ children: description
45
+ }), /*#__PURE__*/_jsxs(View, {
46
+ style: styles.footer,
47
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
48
+ activeOpacity: 0.8,
49
+ onPress: onCancel,
50
+ style: [styles.secondaryButton, {
51
+ backgroundColor: theme.colors.muted,
52
+ borderRadius: theme.borderRadius.lg
53
+ }],
54
+ children: /*#__PURE__*/_jsx(Text, {
55
+ style: [styles.secondaryText, {
56
+ color: theme.colors.foreground
57
+ }],
58
+ children: cancelText ?? 'Cancel'
59
+ })
60
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
61
+ activeOpacity: 0.8,
62
+ onPress: onConfirm,
63
+ style: [styles.primaryButton, {
64
+ backgroundColor: confirmBackground,
65
+ borderRadius: theme.borderRadius.lg
66
+ }],
67
+ children: /*#__PURE__*/_jsx(Text, {
68
+ style: [styles.primaryText, {
69
+ color: confirmForeground
70
+ }],
71
+ children: confirmText ?? 'Confirm'
72
+ })
73
+ })]
74
+ })]
75
+ })
76
+ })
77
+ });
78
+ }
79
+ const styles = StyleSheet.create({
80
+ backdrop: {
81
+ alignItems: 'center',
82
+ backgroundColor: 'rgba(15, 23, 42, 0.45)',
83
+ flex: 1,
84
+ justifyContent: 'center',
85
+ padding: 24
86
+ },
87
+ description: {
88
+ fontSize: 14,
89
+ lineHeight: 20,
90
+ marginTop: 8
91
+ },
92
+ dialog: {
93
+ borderWidth: 1,
94
+ padding: 20,
95
+ width: '100%'
96
+ },
97
+ footer: {
98
+ flexDirection: 'row',
99
+ gap: 12,
100
+ justifyContent: 'flex-end',
101
+ marginTop: 20
102
+ },
103
+ primaryButton: {
104
+ alignItems: 'center',
105
+ justifyContent: 'center',
106
+ minWidth: 96,
107
+ paddingHorizontal: 16,
108
+ paddingVertical: 12
109
+ },
110
+ primaryText: {
111
+ fontSize: 14,
112
+ fontWeight: '700'
113
+ },
114
+ secondaryButton: {
115
+ alignItems: 'center',
116
+ justifyContent: 'center',
117
+ minWidth: 96,
118
+ paddingHorizontal: 16,
119
+ paddingVertical: 12
120
+ },
121
+ secondaryText: {
122
+ fontSize: 14,
123
+ fontWeight: '600'
124
+ },
125
+ title: {
126
+ fontSize: 17,
127
+ fontWeight: '700'
128
+ }
129
+ });
130
+ //# sourceMappingURL=alert-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Modal","Pressable","StyleSheet","Text","TouchableOpacity","View","useDocyrusRNAssistantTheme","jsx","_jsx","jsxs","_jsxs","AlertDialog","cancelText","confirmText","description","onCancel","onConfirm","title","variant","visible","theme","confirmBackground","colors","destructive","success","warning","primary","confirmForeground","successForeground","warningForeground","primaryForeground","animationType","onRequestClose","statusBarTranslucent","transparent","children","onPress","style","styles","backdrop","event","stopPropagation","dialog","backgroundColor","card","borderColor","border","borderRadius","xl","color","foreground","mutedForeground","footer","activeOpacity","secondaryButton","muted","lg","secondaryText","primaryButton","primaryText","create","alignItems","flex","justifyContent","padding","fontSize","lineHeight","marginTop","borderWidth","width","flexDirection","gap","minWidth","paddingHorizontal","paddingVertical","fontWeight"],"sourceRoot":"../../../src","sources":["ui/alert-dialog.tsx"],"mappings":";;AAAA,SACEA,KAAK,EACLC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,QACC,cAAc;AAErB,SAASC,0BAA0B,QAAQ,mBAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAatD,OAAO,SAASC,WAAWA,CAAC;EAC1BC,UAAU;EACVC,WAAW;EACXC,WAAW;EACXC,QAAQ;EACRC,SAAS;EACTC,KAAK;EACLC,OAAO,GAAG,SAAS;EACnBC,OAAO,GAAG;AACM,CAAC,EAAE;EACnB,MAAMC,KAAK,GAAGd,0BAA0B,CAAC,CAAC;EAE1C,MAAMe,iBAAiB,GAAGH,OAAO,KAAK,aAAa,GAAGE,KAAK,CAACE,MAAM,CAACC,WAAW,GAAGL,OAAO,KAAK,SAAS,GAAGE,KAAK,CAACE,MAAM,CAACE,OAAO,GAAGN,OAAO,KAAK,SAAS,GAAGE,KAAK,CAACE,MAAM,CAACG,OAAO,GAAGL,KAAK,CAACE,MAAM,CAACI,OAAO;EAEnM,M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