@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,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DocyrusBrandMark = void 0;
7
+ var _react = require("react");
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ const RED_MARK_SVG = `
10
+ <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024">
11
+ <defs>
12
+ <style>
13
+ .st0 { fill: none; }
14
+ .st1 { fill: #dc2626; }
15
+ </style>
16
+ </defs>
17
+ <line class="st0" x1="497.1" y1="590.5" x2="496.9" y2="590.8"/>
18
+ <path class="st1" d="M768.11,531.68l-.24.21v101.17c0,26.8-21.79,48.63-48.59,48.63h-101.17c-8.72,0-16.82-2.33-23.88-6.35l-113.69,113.73c7.41,11.02,11.77,24.33,11.77,38.47,0,18.98-7.62,36.17-20.04,48.63-12.42,12.42-29.65,20.04-48.63,20.04s-36.2-7.62-48.63-20.04c-12.42-12.46-20.04-29.65-20.04-48.63,0-37.96,30.75-68.91,68.87-68.91,14.48,0,27.76,4.43,38.78,11.94l113.62-113.62c-4.19-7.1-6.55-15.31-6.55-24.09v-101.17c0-11.12,3.81-21.48,10.19-29.68l-93.72-127.52h-229.96V127.7h246.57v225.88l97.6,132.84c5.56-2.23,11.63-3.36,17.95-3.36h101.17c26.8,0,48.63,21.83,48.63,48.63Z"/>
19
+ </svg>
20
+ `.trim();
21
+ let svgModule = null;
22
+ let svgModuleLoaded = false;
23
+ function getSvgModule() {
24
+ if (svgModuleLoaded) {
25
+ return svgModule;
26
+ }
27
+ svgModuleLoaded = true;
28
+ try {
29
+ svgModule = require('react-native-svg');
30
+ } catch {
31
+ svgModule = null;
32
+ }
33
+ return svgModule;
34
+ }
35
+ const DocyrusBrandMark = exports.DocyrusBrandMark = /*#__PURE__*/(0, _react.memo)(({
36
+ size = 24
37
+ }) => {
38
+ const svg = (0, _react.useMemo)(() => getSvgModule(), []);
39
+ if (!svg?.SvgXml) {
40
+ return null;
41
+ }
42
+ const {
43
+ SvgXml
44
+ } = svg;
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(SvgXml, {
46
+ xml: RED_MARK_SVG,
47
+ width: size,
48
+ height: size
49
+ });
50
+ });
51
+ DocyrusBrandMark.displayName = 'DocyrusBrandMark';
52
+ //# sourceMappingURL=docyrus-brand-mark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_jsxRuntime","RED_MARK_SVG","trim","svgModule","svgModuleLoaded","getSvgModule","DocyrusBrandMark","exports","memo","size","svg","useMemo","SvgXml","jsx","xml","width","height","displayName"],"sourceRoot":"../../../src","sources":["ui/docyrus-brand-mark.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAA0D,IAAAC,WAAA,GAAAD,OAAA;AAU1D,MAAME,YAAY,GAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAACC,IAAI,CAAC,CAAC;AAER,IAAIC,SAA2B,GAAG,IAAI;AACtC,IAAIC,eAAe,GAAG,KAAK;AAE3B,SAASC,YAAYA,CAAA,EAAqB;EACxC,IAAID,eAAe,EAAE;IACnB,OAAOD,SAAS;EAClB;EAEAC,eAAe,GAAG,IAAI;EAEtB,IAAI;IACFD,SAAS,GAAGJ,OAAO,CAAC,kBAAkB,CAAc;EACtD,CAAC,CAAC,MAAM;IACNI,SAAS,GAAG,IAAI;EAClB;EAEA,OAAOA,SAAS;AAClB;AAMO,MAAMG,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,gBAAG,IAAAE,WAAI,EAAC,CAAC;EAAEC,IAAI,GAAG;AAA0B,CAAC,KAAK;EAC7E,MAAMC,GAAG,GAAG,IAAAC,cAAO,EAAC,MAAMN,YAAY,CAAC,CAAC,EAAE,EAAE,CAAC;EAE7C,IAAI,CAACK,GAAG,EAAEE,MAAM,EAAE;IAChB,OAAO,IAAI;EACb;EAEA,MAAM;IAAEA;EAAO,CAAC,GAAGF,GAAG;EAEtB,oBACE,IAAAV,WAAA,CAAAa,GAAA,EAACD,MAAM;IACLE,GAAG,EAAEb,YAAa;IAClBc,KAAK,EAAEN,IAAK;IACZO,MAAM,EAAEP;EAAK,CAAE,CAAC;AAEtB,CAAC,CAAC;AAEFH,gBAAgB,CAACW,WAAW,GAAG,kBAAkB","ignoreList":[]}
@@ -0,0 +1,298 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DocyrusIcon = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ const LOCAL_SVG_ICONS = {
11
+ 'ai-brain-01': '<path d="M9 7.5a3 3 0 0 1 6 0c1.8.2 3 1.5 3 3.3 0 1.3-.7 2.4-1.8 3 .1.3.2.7.2 1.1a2.6 2.6 0 0 1-2.6 2.6c-.6 0-1.1-.2-1.6-.5-.5.9-1.4 1.5-2.5 1.5A2.7 2.7 0 0 1 7 15.8c-.8-.4-1.4-1.3-1.4-2.3 0-.4.1-.8.2-1.1a3.4 3.4 0 0 1-1.8-3C4 7.8 5.2 6.5 7 6.3A3 3 0 0 1 9 7.5Z" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/><path d="M9.5 10.2h.01M14.5 10.2h.01M10 13c.6.5 1.3.8 2 .8s1.4-.3 2-.8" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/>',
12
+ 'ai-brain-02': '<path d="M8.5 5.5c-1.7.4-3 2-3 4v1c0 1.3.5 2.4 1.4 3.2A3.2 3.2 0 0 0 10 18.5h4a3.3 3.3 0 0 0 3.1-4.8c.9-.8 1.4-2 1.4-3.2v-1c0-2-1.3-3.6-3-4" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 5.5c0-1.1.9-2 2-2h2c1.1 0 2 .9 2 2v3.2c0 .8-.5 1.6-1.3 1.9l-1.2.5a1.8 1.8 0 0 1-1.4 0l-1.2-.5A2 2 0 0 1 9 8.7V5.5Z" fill="__COLOR__" opacity="0.15" stroke="__COLOR__" stroke-width="1.7"/>',
13
+ 'ai-brain-03': '<path d="M7.5 9.5a4.5 4.5 0 0 1 9 0v5a4.5 4.5 0 0 1-9 0v-5Z" stroke="__COLOR__" stroke-width="1.7"/><path d="M9.5 8V6.7a2.5 2.5 0 1 1 5 0V8M9 12h6M12 9.5v5" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/>',
14
+ 'ai-brain-04': '<circle cx="12" cy="12" r="8.5" stroke="__COLOR__" stroke-width="1.7"/><path d="M9.2 10a2.8 2.8 0 0 1 5.6 0c0 1.2-.7 1.9-1.5 2.6-.7.5-1.3 1.1-1.3 2" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/><circle cx="12" cy="16.8" r="1" fill="__COLOR__"/>',
15
+ 'ai-brain-05': '<path d="M8.5 7.5A2.5 2.5 0 0 1 11 5h2a2.5 2.5 0 0 1 2.5 2.5v1A2.5 2.5 0 0 1 13 11h-2a2.5 2.5 0 0 1-2.5-2.5v-1Z" stroke="__COLOR__" stroke-width="1.7"/><path d="M7 13.5A2.5 2.5 0 0 1 9.5 11H10a2.5 2.5 0 0 1 2.5 2.5V14A2.5 2.5 0 0 1 10 16.5h-.5A2.5 2.5 0 0 1 7 14v-.5ZM13.5 13.5A2.5 2.5 0 0 1 16 11h.5a2.5 2.5 0 0 1 2.5 2.5V14a2.5 2.5 0 0 1-2.5 2.5H16a2.5 2.5 0 0 1-2.5-2.5v-.5Z" stroke="__COLOR__" stroke-width="1.7"/>',
16
+ 'ai-chip-02': '<rect x="7.5" y="7.5" width="9" height="9" rx="2" stroke="__COLOR__" stroke-width="1.7"/><path d="M10 10h4v4h-4z" fill="__COLOR__" opacity="0.18"/><path d="M9 4.5v2M12 4.5v2M15 4.5v2M9 17.5v2M12 17.5v2M15 17.5v2M4.5 9h2M4.5 12h2M4.5 15h2M17.5 9h2M17.5 12h2M17.5 15h2" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/>',
17
+ 'ai-generative-01': '<path d="m12 3.8 1.9 4.8 4.8 1.9-4.8 1.9-1.9 4.8-1.9-4.8-4.8-1.9 4.8-1.9L12 3.8Z" fill="__COLOR__" opacity="0.14" stroke="__COLOR__" stroke-width="1.7" stroke-linejoin="round"/><path d="M18.5 5.5v2.8M19.9 6.9h-2.8M5.5 15.7v3.2M7.1 17.3H3.9" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/>',
18
+ 'ai-magic-01': '<path d="M6.5 17.5 17.5 6.5M9 6.5l1 2.5L12.5 10 10 11 9 13.5 8 11 5.5 10 8 9l1-2.5ZM16 12.5l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8.8-2Z" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>',
19
+ 'ai-mic': '<path d="M12 4.5a2.5 2.5 0 0 1 2.5 2.5v4a2.5 2.5 0 0 1-5 0V7A2.5 2.5 0 0 1 12 4.5Z" stroke="__COLOR__" stroke-width="1.7"/><path d="M7.5 10.5a4.5 4.5 0 1 0 9 0M12 15v4M9 19h6" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/>',
20
+ 'ai-network': '<circle cx="12" cy="6.5" r="2" stroke="__COLOR__" stroke-width="1.7"/><circle cx="7" cy="15.5" r="2" stroke="__COLOR__" stroke-width="1.7"/><circle cx="17" cy="15.5" r="2" stroke="__COLOR__" stroke-width="1.7"/><path d="M10.8 8.2 8.2 13.6M13.2 8.2l2.6 5.4M9 15.5h6" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/>',
21
+ 'ai-scan': '<rect x="5.5" y="5.5" width="13" height="13" rx="3" stroke="__COLOR__" stroke-width="1.7"/><path d="M9 9h6M9 12h4M9 15h6" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/><path d="M5.5 9V7.5A2 2 0 0 1 7.5 5.5H9M18.5 9V7.5a2 2 0 0 0-2-2H15M5.5 15v1.5a2 2 0 0 0 2 2H9M18.5 15v1.5a2 2 0 0 1-2 2H15" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/>',
22
+ 'ai-voice': '<path d="M12 4.5a2.5 2.5 0 0 1 2.5 2.5v4a2.5 2.5 0 0 1-5 0V7A2.5 2.5 0 0 1 12 4.5Z" fill="__COLOR__" opacity="0.18" stroke="__COLOR__" stroke-width="1.7"/><path d="M7.5 11.2a4.5 4.5 0 0 0 9 0M6.5 14.5a7 7 0 0 0 11 0M12 15v4" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/>',
23
+ 'alert-circle': '<circle cx="12" cy="12" r="8.5" stroke="__COLOR__" stroke-width="1.8"/><path d="M12 7.5v5" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/><circle cx="12" cy="15.8" r="1" fill="__COLOR__"/>',
24
+ 'alert-02': '<path d="M12 4.5 4.8 17a1 1 0 0 0 .9 1.5h12.6a1 1 0 0 0 .9-1.5L12 4.5Z" stroke="__COLOR__" stroke-width="1.8" stroke-linejoin="round"/><path d="M12 9.2v4.1" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/><circle cx="12" cy="15.9" r="1" fill="__COLOR__"/>',
25
+ 'arrow-down-01': '<path d="M12 5v12m0 0-5-5m5 5 5-5" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
26
+ 'arrow-right-01': '<path d="M5 12h12m0 0-5-5m5 5-5 5" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
27
+ 'arrow-turn-down-left': '<path d="M18 7v7a3 3 0 0 1-3 3H7m0 0 4-4m-4 4 4 4" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
28
+ 'arrow-up-01': '<path d="M12 19V7m0 0-5 5m5-5 5 5" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
29
+ 'attachment-02': '<path d="m14.5 6.5-7.8 7.8a3.2 3.2 0 1 0 4.5 4.5l7.1-7.1a4.8 4.8 0 1 0-6.8-6.8l-7.8 7.8a6.8 6.8 0 1 0 9.6 9.6l5.8-5.8" stroke="__COLOR__" stroke-width="1.85" stroke-linecap="round" stroke-linejoin="round"/>',
30
+ 'camera-01': '<path d="M4 8.5h3l1.3-2h7.4l1.3 2H20v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-9Z" stroke="__COLOR__" stroke-width="1.8" stroke-linejoin="round"/><circle cx="12" cy="13" r="3.2" stroke="__COLOR__" stroke-width="1.8"/>',
31
+ 'cancel-01': '<path d="m7 7 10 10M17 7 7 17" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/>',
32
+ 'cancel-circle': '<circle cx="12" cy="12" r="8.5" stroke="__COLOR__" stroke-width="1.8"/><path d="m9 9 6 6m0-6-6 6" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/>',
33
+ check: '<path d="m6.5 12.5 3.2 3.2 7.8-7.8" stroke="__COLOR__" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/>',
34
+ 'check-circle': '<circle cx="12" cy="12" r="8.5" stroke="__COLOR__" stroke-width="1.8"/><path d="m8.6 12.2 2.1 2.1 4.7-4.8" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
35
+ 'chevron-down': '<path d="m6 9 6 6 6-6" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
36
+ 'chevron-up': '<path d="m6 15 6-6 6 6" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
37
+ 'delete-02': '<path d="M8 7h8m-7 0 .6-1.8A1.5 1.5 0 0 1 11 4h2a1.5 1.5 0 0 1 1.4 1.2L15 7m-7 0-.5 10A2 2 0 0 0 9.5 19h5a2 2 0 0 0 2-2L16 7M10 10v5m4-5v5" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
38
+ 'file-02': '<path d="M8 4.5h5l4 4V18a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 7 18V6A1.5 1.5 0 0 1 8.5 4.5Z" stroke="__COLOR__" stroke-width="1.8" stroke-linejoin="round"/><path d="M13 4.5V9h4" stroke="__COLOR__" stroke-width="1.8" stroke-linejoin="round"/>',
39
+ 'image-02': '<rect x="4.5" y="5.5" width="15" height="13" rx="2" stroke="__COLOR__" stroke-width="1.8"/><circle cx="9" cy="10" r="1.5" fill="__COLOR__"/><path d="m6.5 16 3.5-3.5 2.5 2.5 2-2L17.5 16" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
40
+ 'info-circle': '<circle cx="12" cy="12" r="8.5" stroke="__COLOR__" stroke-width="1.8"/><path d="M12 10v5" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/><circle cx="12" cy="7.5" r="1" fill="__COLOR__"/>',
41
+ 'link-01': '<path d="M10 14 8.5 15.5a3 3 0 0 1-4.2-4.2L7 8.6a3 3 0 0 1 4.2 0m-1.2 6.8 1.5-1.5m1.5-3 1.5-1.5a3 3 0 1 1 4.2 4.2L17 15.4a3 3 0 0 1-4.2 0" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
42
+ 'loading-03': '<circle cx="12" cy="12" r="7.5" stroke="__COLOR__" stroke-width="1.8" opacity="0.25"/><path d="M12 4.5a7.5 7.5 0 0 1 7.5 7.5" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/>',
43
+ 'message-02': '<path d="M7.2 6.5h9.6A2.7 2.7 0 0 1 19.5 9.2v5.1A2.7 2.7 0 0 1 16.8 17H11l-4.5 3V17H7.2a2.7 2.7 0 0 1-2.7-2.7V9.2A2.7 2.7 0 0 1 7.2 6.5Z" stroke="__COLOR__" stroke-width="1.8" stroke-linejoin="round"/><circle cx="9.2" cy="11.8" r="1" fill="__COLOR__"/><circle cx="12" cy="11.8" r="1" fill="__COLOR__"/><circle cx="14.8" cy="11.8" r="1" fill="__COLOR__"/>',
44
+ 'message-stack-01': '<path d="M8.2 5.5h8.6a2.2 2.2 0 0 1 2.2 2.2v4.1" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/><path d="M6.8 8h8.9A2.8 2.8 0 0 1 18.5 10.8v4a2.8 2.8 0 0 1-2.8 2.7h-3.8l-4.4 2.8v-2.8h-.7A2.8 2.8 0 0 1 4 14.8v-4A2.8 2.8 0 0 1 6.8 8Z" stroke="__COLOR__" stroke-width="1.8" stroke-linejoin="round"/><circle cx="8.8" cy="12.5" r="0.95" fill="__COLOR__"/><circle cx="11.8" cy="12.5" r="0.95" fill="__COLOR__"/><circle cx="14.8" cy="12.5" r="0.95" fill="__COLOR__"/>',
45
+ 'pencil-edit-02': '<path d="m14.5 5.5 4 4M6 18l3.1-.6 8.8-8.8a1.7 1.7 0 0 0 0-2.4l-1.1-1.1a1.7 1.7 0 0 0-2.4 0l-8.8 8.8L6 18Z" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
46
+ plus: '<path d="M12 6v12M6 12h12" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/>',
47
+ 'remove-circle': '<circle cx="12" cy="12" r="8.5" stroke="__COLOR__" stroke-width="1.8"/><path d="M8 12h8" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/>',
48
+ 'search-01': '<circle cx="11" cy="11" r="5.5" stroke="__COLOR__" stroke-width="1.8"/><path d="m16 16 3 3" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round"/>',
49
+ 'sliders-horizontal-01': '<path d="M4 7h5m6 0h5M9 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm10 10h-7m-6 0H4m10 0a2 2 0 1 0 4 0 2 2 0 0 0-4 0Z" stroke="__COLOR__" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>',
50
+ sparkles: '<path d="m12 4.5 1.6 3.9 3.9 1.6-3.9 1.6-1.6 3.9-1.6-3.9-3.9-1.6 3.9-1.6L12 4.5ZM18.5 4.5l.6 1.4 1.4.6-1.4.6-.6 1.4-.6-1.4-1.4-.6 1.4-.6.6-1.4ZM5.5 14.5l.8 1.8 1.8.8-1.8.8-.8 1.8-.8-1.8-1.8-.8 1.8-.8.8-1.8Z" fill="__COLOR__"/>',
51
+ brain: '<path d="M9 7.5a3 3 0 0 1 6 0c1.8.2 3 1.5 3 3.3 0 1.3-.7 2.4-1.8 3 .1.3.2.7.2 1.1a2.6 2.6 0 0 1-2.6 2.6c-.6 0-1.1-.2-1.6-.5-.5.9-1.4 1.5-2.5 1.5A2.7 2.7 0 0 1 7 15.8c-.8-.4-1.4-1.3-1.4-2.3 0-.4.1-.8.2-1.1a3.4 3.4 0 0 1-1.8-3C4 7.8 5.2 6.5 7 6.3A3 3 0 0 1 9 7.5Z" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/><path d="M10 9.5v5M14 9.5v5M10 12h4" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round"/>',
52
+ square: '<rect x="6.5" y="6.5" width="11" height="11" rx="1.5" fill="__COLOR__"/>',
53
+ 'tick-02': '<path d="m6.5 12.5 3.2 3.2 7.8-7.8" stroke="__COLOR__" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/>',
54
+ tool: '<rect x="5.5" y="5.5" width="13" height="13" rx="3" stroke="__COLOR__" stroke-width="1.7"/><path d="m9 14.5 6-6M10 8.5h4v4" stroke="__COLOR__" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>',
55
+ zap: '<path d="M13.5 3.5 6.5 12h4L9.5 20.5 17.5 11h-4l0-7.5Z" fill="__COLOR__"/>'
56
+ };
57
+ const LOCAL_GLYPHS = {};
58
+ const CDN_BASE = 'https://static.docyrus.app/assets/icons';
59
+ const FA_LIBS = ['far', 'fal', 'fab', 'fas', 'fac'];
60
+ const SIZE_MAP = {
61
+ xs: 12,
62
+ sm: 16,
63
+ default: 20,
64
+ lg: 24,
65
+ xl: 32
66
+ };
67
+ const emojiRegex = /^(?:\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{Emoji}\uFE0F)(?:\u200D(?:\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{Emoji}\uFE0F))*$/u;
68
+ let svgModule = null;
69
+ let svgModuleLoaded = false;
70
+ function getSvgModule() {
71
+ if (svgModuleLoaded) {
72
+ return svgModule;
73
+ }
74
+ svgModuleLoaded = true;
75
+ try {
76
+ svgModule = require('react-native-svg');
77
+ } catch {
78
+ svgModule = null;
79
+ }
80
+ return svgModule;
81
+ }
82
+ function parseIcon(icon, defaultLib) {
83
+ if (icon === 'dot') {
84
+ return {
85
+ lib: null,
86
+ group: null,
87
+ name: 'dot',
88
+ isEmoji: false,
89
+ isDot: true
90
+ };
91
+ }
92
+ if (emojiRegex.test(icon)) {
93
+ return {
94
+ lib: null,
95
+ group: null,
96
+ name: icon,
97
+ isEmoji: true,
98
+ isDot: false
99
+ };
100
+ }
101
+ if (icon === 'null') {
102
+ return {
103
+ lib: 'fas',
104
+ group: null,
105
+ name: 'square',
106
+ isEmoji: false,
107
+ isDot: false
108
+ };
109
+ }
110
+ const parts = icon.trim().split(' ');
111
+ if (parts.length === 2) {
112
+ return {
113
+ lib: parts[0] ?? defaultLib,
114
+ group: null,
115
+ name: parts[1] ?? icon,
116
+ isEmoji: false,
117
+ isDot: false
118
+ };
119
+ }
120
+ if (parts.length === 3) {
121
+ return {
122
+ lib: parts[0] ?? defaultLib,
123
+ group: parts[1] ?? null,
124
+ name: parts[2] ?? icon,
125
+ isEmoji: false,
126
+ isDot: false
127
+ };
128
+ }
129
+ return {
130
+ lib: defaultLib,
131
+ group: null,
132
+ name: icon,
133
+ isEmoji: false,
134
+ isDot: false
135
+ };
136
+ }
137
+ function buildIconUrl(lib, group, name) {
138
+ const groupSegment = group ? `/${group}` : '';
139
+ return `${CDN_BASE}/${lib}${groupSegment}/${name}.svg`;
140
+ }
141
+ function buildLocalSvg(name, color) {
142
+ const body = LOCAL_SVG_ICONS[name];
143
+ if (!body) {
144
+ return null;
145
+ }
146
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${body.replaceAll('__COLOR__', color)}</svg>`;
147
+ }
148
+ function normalizeSvgXml(xml, color, lib) {
149
+ if (!xml) {
150
+ return xml;
151
+ }
152
+ let nextXml = xml.replace(/stroke="currentColor"/gi, `stroke="${color}"`).replace(/fill="currentColor"/gi, `fill="${color}"`).replace(/color="currentColor"/gi, `color="${color}"`);
153
+ if (lib === 'huge') {
154
+ nextXml = nextXml.replace(/stroke="(?!none)(#[0-9a-fA-F]{3,8}|black|#000000|#000|rgb\(0,\s*0,\s*0\)|rgb\(17,\s*24,\s*39\))"/gi, `stroke="${color}"`);
155
+ } else if (FA_LIBS.includes(lib)) {
156
+ nextXml = nextXml.replace(/fill="(?!none)(#[0-9a-fA-F]{3,8}|black|#000000|#000|rgb\(0,\s*0,\s*0\)|rgb\(17,\s*24,\s*39\))"/gi, `fill="${color}"`);
157
+ } else {
158
+ nextXml = nextXml.replace(/stroke="(?!none)(#[0-9a-fA-F]{3,8}|black|#000000|#000|rgb\(0,\s*0,\s*0\)|rgb\(17,\s*24,\s*39\))"/gi, `stroke="${color}"`).replace(/fill="(?!none)(#[0-9a-fA-F]{3,8}|black|#000000|#000|rgb\(0,\s*0,\s*0\)|rgb\(17,\s*24,\s*39\))"/gi, `fill="${color}"`);
159
+ }
160
+ return nextXml;
161
+ }
162
+ function useSvgContent(url) {
163
+ const [xml, setXml] = (0, _react.useState)(null);
164
+ (0, _react.useEffect)(() => {
165
+ if (!url) {
166
+ setXml(null);
167
+ return;
168
+ }
169
+ let cancelled = false;
170
+ fetch(url).then(async response => response.ok ? response.text() : null).then(text => {
171
+ if (!cancelled && text) {
172
+ setXml(text);
173
+ }
174
+ }).catch(() => {});
175
+ return () => {
176
+ cancelled = true;
177
+ };
178
+ }, [url]);
179
+ return xml;
180
+ }
181
+ const DocyrusIcon = exports.DocyrusIcon = /*#__PURE__*/(0, _react.memo)(({
182
+ color,
183
+ disabled = false,
184
+ group = null,
185
+ icon,
186
+ lib = 'kv',
187
+ onPress,
188
+ size = 'default'
189
+ }) => {
190
+ const parsed = (0, _react.useMemo)(() => parseIcon(icon, lib), [icon, lib]);
191
+ const resolvedGroup = group ?? parsed.group;
192
+ const iconSize = typeof size === 'number' ? size : SIZE_MAP[size] ?? 20;
193
+ const resolvedColor = color ?? '#64748b';
194
+ const iconLib = parsed.lib ?? lib;
195
+ const url = !parsed.isEmoji && !parsed.isDot ? buildIconUrl(iconLib, resolvedGroup, parsed.name) : null;
196
+ const svgXml = useSvgContent(url);
197
+ const svg = getSvgModule();
198
+ const localSvgXml = (0, _react.useMemo)(() => buildLocalSvg(parsed.name, resolvedColor), [parsed.name, resolvedColor]);
199
+ const normalizedSvgXml = (0, _react.useMemo)(() => {
200
+ const xml = localSvgXml || svgXml;
201
+ return xml ? normalizeSvgXml(xml, resolvedColor, iconLib) : null;
202
+ }, [svgXml, localSvgXml, resolvedColor, iconLib]);
203
+ let content;
204
+ if (parsed.isDot) {
205
+ content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
206
+ style: {
207
+ color: resolvedColor,
208
+ fontSize: iconSize * 0.8,
209
+ lineHeight: iconSize
210
+ },
211
+ children: '\u2022'
212
+ });
213
+ } else if (parsed.isEmoji) {
214
+ content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
215
+ style: {
216
+ fontSize: iconSize * 0.8,
217
+ lineHeight: iconSize
218
+ },
219
+ children: parsed.name
220
+ });
221
+ } else if (svg?.SvgXml && normalizedSvgXml) {
222
+ const {
223
+ SvgXml
224
+ } = svg;
225
+ const isFa = FA_LIBS.includes(iconLib);
226
+ const isHuge = iconLib === 'huge';
227
+ content = /*#__PURE__*/(0, _jsxRuntime.jsx)(SvgXml, {
228
+ xml: normalizedSvgXml,
229
+ width: iconSize,
230
+ height: iconSize,
231
+ ...(isFa ? {
232
+ fill: resolvedColor
233
+ } : {}),
234
+ ...(isHuge ? {
235
+ stroke: resolvedColor
236
+ } : {}),
237
+ ...(!isFa && !isHuge ? {
238
+ color: resolvedColor
239
+ } : {})
240
+ });
241
+ } else {
242
+ const glyph = LOCAL_GLYPHS[parsed.name] ?? null;
243
+ if (glyph) {
244
+ content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
245
+ style: {
246
+ color: resolvedColor,
247
+ fontSize: Math.max(10, iconSize * 0.62),
248
+ fontWeight: parsed.name.startsWith('ai-') || parsed.name === 'brain' ? '800' : '700',
249
+ lineHeight: iconSize,
250
+ textAlign: 'center'
251
+ },
252
+ children: glyph
253
+ });
254
+ } else {
255
+ content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
256
+ style: {
257
+ width: Math.max(14, iconSize * 0.72),
258
+ height: Math.max(14, iconSize * 0.72),
259
+ borderRadius: Math.max(6, iconSize * 0.22),
260
+ backgroundColor: resolvedColor ?? '#dc2626',
261
+ alignItems: 'center',
262
+ justifyContent: 'center'
263
+ },
264
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
265
+ style: {
266
+ color: '#ffffff',
267
+ fontSize: Math.max(8, iconSize * 0.34),
268
+ fontWeight: '800',
269
+ lineHeight: Math.max(8, iconSize * 0.34)
270
+ },
271
+ children: "D"
272
+ })
273
+ });
274
+ }
275
+ }
276
+ const inner = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
277
+ style: {
278
+ alignItems: 'center',
279
+ height: iconSize,
280
+ justifyContent: 'center',
281
+ width: iconSize
282
+ },
283
+ children: content
284
+ });
285
+ if (!onPress) {
286
+ return inner;
287
+ }
288
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
289
+ disabled: disabled,
290
+ onPress: onPress,
291
+ style: {
292
+ opacity: disabled ? 0.5 : 1
293
+ },
294
+ children: inner
295
+ });
296
+ });
297
+ DocyrusIcon.displayName = 'DocyrusIcon';
298
+ //# sourceMappingURL=docyrus-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_jsxRuntime","LOCAL_SVG_ICONS","check","plus","sparkles","brain","square","tool","zap","LOCAL_GLYPHS","CDN_BASE","FA_LIBS","SIZE_MAP","xs","sm","default","lg","xl","emojiRegex","svgModule","svgModuleLoaded","getSvgModule","parseIcon","icon","defaultLib","lib","group","name","isEmoji","isDot","test","parts","trim","split","length","buildIconUrl","groupSegment","buildLocalSvg","color","body","replaceAll","normalizeSvgXml","xml","nextXml","replace","includes","useSvgContent","url","setXml","useState","useEffect","cancelled","fetch","then","response","ok","text","catch","DocyrusIcon","exports","memo","disabled","onPress","size","parsed","useMemo","resolvedGroup","iconSize","resolvedColor","iconLib","svgXml","svg","localSvgXml","normalizedSvgXml","content","jsx","Text","style","fontSize","lineHeight","children","SvgXml","isFa","isHuge","width","height","fill","stroke","glyph","Math","max","fontWeight","startsWith","textAlign","View","borderRadius","backgroundColor","alignItems","justifyContent","inner","Pressable","opacity","displayName"],"sourceRoot":"../../../src","sources":["ui/docyrus-icon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,YAAA,GAAAD,OAAA;AAIsB,IAAAE,WAAA,GAAAF,OAAA;AAqBtB,MAAMG,eAAuC,GAAG;EAC9C,aAAa,EAAE,qeAAqe;EACpf,aAAa,EAAE,4aAA4a;EAC3b,aAAa,EAAE,6NAA6N;EAC5O,aAAa,EAAE,uQAAuQ;EACtR,aAAa,EAAE,oaAAoa;EACnb,YAAY,EAAE,4UAA4U;EAC1V,kBAAkB,EAAE,iTAAiT;EACrU,aAAa,EAAE,6NAA6N;EAC5O,QAAQ,EAAE,gPAAgP;EAC1P,YAAY,EAAE,0UAA0U;EACxV,SAAS,EAAE,qXAAqX;EAChY,UAAU,EAAE,iSAAiS;EAC7S,cAAc,EAAE,6MAA6M;EAC7N,UAAU,EAAE,+QAA+Q;EAC3R,eAAe,EAAE,2HAA2H;EAC5I,gBAAgB,EAAE,2HAA2H;EAC7I,sBAAsB,EAAE,2IAA2I;EACnK,aAAa,EAAE,2HAA2H;EAC1I,eAAe,EAAE,gNAAgN;EACjO,WAAW,EAAE,kNAAkN;EAC/N,WAAW,EAAE,+FAA+F;EAC5G,eAAe,EAAE,kKAAkK;EACnLC,KAAK,EAAE,4HAA4H;EACnI,cAAc,EAAE,mMAAmM;EACnN,cAAc,EAAE,+GAA+G;EAC/H,YAAY,EAAE,gHAAgH;EAC9H,WAAW,EAAE,oOAAoO;EACjP,SAAS,EAAE,qPAAq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EAAElB,QAAQ;MAChB+B,cAAc,EAAE,QAAQ;MACxBd,KAAK,EAAEjB;IACT,CAAE;IAAAa,QAAA,EACDN;EAAO,CACJ,CACP;EAED,IAAI,CAACZ,OAAO,EAAE;IACZ,OAAOqC,KAAK;EACd;EAEA,oBACE,IAAAnG,WAAA,CAAA2E,GAAA,EAAC5E,YAAA,CAAAqG,SAAS;IACRvC,QAAQ,EAAEA,QAAS;IACnBC,OAAO,EAAEA,OAAQ;IACjBe,KAAK,EAAE;MAAEwB,OAAO,EAAExC,QAAQ,GAAG,GAAG,GAAG;IAAE,CAAE;IAAAmB,QAAA,EACtCmB;EAAK,CACG,CAAC;AAEhB,CAAC,CAAC;AAEFzC,WAAW,CAAC4C,WAAW,GAAG,aAAa","ignoreList":[]}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ActionSheet", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _actionSheet.ActionSheet;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "AlertDialog", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _alertDialog.AlertDialog;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "DocyrusBrandMark", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _docyrusBrandMark.DocyrusBrandMark;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "DocyrusIcon", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _docyrusIcon.DocyrusIcon;
28
+ }
29
+ });
30
+ var _actionSheet = require("./action-sheet.js");
31
+ var _alertDialog = require("./alert-dialog.js");
32
+ var _docyrusBrandMark = require("./docyrus-brand-mark.js");
33
+ var _docyrusIcon = require("./docyrus-icon.js");
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_actionSheet","require","_alertDialog","_docyrusBrandMark","_docyrusIcon"],"sourceRoot":"../../../src","sources":["ui/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA","ignoreList":[]}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.apiClient = apiClient;
7
+ /**
8
+ * Centralized API client for all Docyrus RN Assistant fetch requests
9
+ * Provides consistent logging and error handling
10
+ */
11
+
12
+ /**
13
+ * Centralized API client
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * // GET request
18
+ * const data = await apiClient('https://api.example.com/users', {
19
+ * headers: { Authorization: 'Bearer token' }
20
+ * });
21
+ *
22
+ * // POST request
23
+ * const result = await apiClient('https://api.example.com/users', {
24
+ * method: 'POST',
25
+ * body: { name: 'John' },
26
+ * headers: { Authorization: 'Bearer token' }
27
+ * });
28
+ * ```
29
+ */
30
+ async function apiClient(url, options = {}) {
31
+ const {
32
+ method = 'GET',
33
+ headers = {},
34
+ body,
35
+ isFormData = false,
36
+ transformResponse
37
+ } = options;
38
+
39
+ // For FormData, don't set Content-Type - fetch will set it automatically with boundary
40
+ const requestHeaders = isFormData ? {
41
+ ...headers
42
+ } : {
43
+ 'Content-Type': 'application/json',
44
+ ...headers
45
+ };
46
+ if (__DEV__) {
47
+ // Log request
48
+ console.info('[AI] API Request:', {
49
+ method,
50
+ url,
51
+ isFormData,
52
+ hasAuth: !!requestHeaders.Authorization || !!requestHeaders.authorization
53
+ });
54
+ }
55
+ const fetchOptions = {
56
+ method,
57
+ headers: requestHeaders
58
+ };
59
+ if (body) {
60
+ // For FormData, pass body directly; otherwise stringify JSON
61
+ fetchOptions.body = isFormData ? body : typeof body === 'string' ? body : JSON.stringify(body);
62
+ }
63
+ const response = await fetch(url, fetchOptions);
64
+ if (!response.ok) {
65
+ // Try to get error details from response body
66
+ let errorBody = null;
67
+ try {
68
+ errorBody = await response.json();
69
+ } catch {
70
+ // Response body is not JSON
71
+ }
72
+ if (__DEV__) {
73
+ console.error('[AI] API Error:', {
74
+ method,
75
+ url,
76
+ status: response.status,
77
+ statusText: response.statusText,
78
+ body: errorBody
79
+ });
80
+ }
81
+ const message = errorBody?.message || errorBody?.error_description || errorBody?.error;
82
+ throw new Error(`API request failed: ${response.status} ${response.statusText}${message ? ` - ${message}` : ''}`);
83
+ }
84
+ const data = await response.json();
85
+
86
+ // Transform response if transformer is provided
87
+ const transformedData = transformResponse ? transformResponse(data) : data;
88
+ if (__DEV__) {
89
+ // Log response
90
+ console.info('[AI] API Response:', {
91
+ method,
92
+ url,
93
+ dataType: Array.isArray(transformedData) ? 'array' : typeof transformedData,
94
+ count: Array.isArray(transformedData) ? transformedData.length : undefined
95
+ });
96
+ }
97
+ return transformedData;
98
+ }
99
+ //# sourceMappingURL=api-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["apiClient","url","options","method","headers","body","isFormData","transformResponse","requestHeaders","__DEV__","console","info","hasAuth","Authorization","authorization","fetchOptions","JSON","stringify","response","fetch","ok","errorBody","json","error","status","statusText","message","error_description","Error","data","transformedData","dataType","Array","isArray","count","length","undefined"],"sourceRoot":"../../../src","sources":["utils/api-client.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeA,SAASA,CAACC,GAAW,EAAEC,OAAyB,GAAG,CAAC,CAAC,EAAgB;EACzF,MAAM;IACJC,MAAM,GAAG,KAAK;IAAEC,OAAO,GAAG,CAAC,CAAC;IAAEC,IAAI;IAAEC,UAAU,GAAG,KAAK;IAAEC;EAC1D,CAAC,GAAGL,OAAO;;EAEX;EACA,MAAMM,cAAc,GAAGF,UAAU,GAAG;IAAE,GAAGF;EAAQ,CAAC,GAAG;IAAE,cA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