@planningcenter/chat-react-native 3.42.2-qa-821.1 → 3.42.2-qa-staging.4

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 (680) hide show
  1. package/build/components/conversation/attachments/attachment_card.d.ts +3 -3
  2. package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -1
  3. package/build/components/conversation/attachments/attachment_card.js +7 -3
  4. package/build/components/conversation/attachments/attachment_card.js.map +1 -1
  5. package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +2 -1
  6. package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -1
  7. package/build/components/conversation/attachments/attachment_deleting_overlay.js +7 -12
  8. package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
  9. package/build/components/conversation/attachments/audio_attachment.d.ts +2 -1
  10. package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
  11. package/build/components/conversation/attachments/audio_attachment.js +23 -6
  12. package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
  13. package/build/components/conversation/attachments/expanded_link.d.ts +2 -1
  14. package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
  15. package/build/components/conversation/attachments/expanded_link.js +8 -2
  16. package/build/components/conversation/attachments/expanded_link.js.map +1 -1
  17. package/build/components/conversation/attachments/generic_file_attachment.d.ts +2 -1
  18. package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
  19. package/build/components/conversation/attachments/generic_file_attachment.js +12 -2
  20. package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
  21. package/build/components/conversation/attachments/giphy_attachment.d.ts +2 -1
  22. package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
  23. package/build/components/conversation/attachments/giphy_attachment.js +7 -2
  24. package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
  25. package/build/components/conversation/attachments/image_attachment.d.ts +2 -1
  26. package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
  27. package/build/components/conversation/attachments/image_attachment.js +53 -16
  28. package/build/components/conversation/attachments/image_attachment.js.map +1 -1
  29. package/build/components/conversation/attachments/video_attachment.d.ts +2 -1
  30. package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
  31. package/build/components/conversation/attachments/video_attachment.js +13 -3
  32. package/build/components/conversation/attachments/video_attachment.js.map +1 -1
  33. package/build/components/conversation/conversation_start_banner.d.ts +2 -1
  34. package/build/components/conversation/conversation_start_banner.d.ts.map +1 -1
  35. package/build/components/conversation/conversation_start_banner.js +14 -2
  36. package/build/components/conversation/conversation_start_banner.js.map +1 -1
  37. package/build/components/conversation/empty_conversation_blank_state.d.ts +1 -1
  38. package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -1
  39. package/build/components/conversation/empty_conversation_blank_state.js +9 -2
  40. package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
  41. package/build/components/conversation/jump_to_bottom_button.d.ts +1 -1
  42. package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
  43. package/build/components/conversation/jump_to_bottom_button.js +10 -2
  44. package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
  45. package/build/components/conversation/message.d.ts +2 -1
  46. package/build/components/conversation/message.d.ts.map +1 -1
  47. package/build/components/conversation/message.js +53 -2
  48. package/build/components/conversation/message.js.map +1 -1
  49. package/build/components/conversation/message_attachments.d.ts +2 -1
  50. package/build/components/conversation/message_attachments.d.ts.map +1 -1
  51. package/build/components/conversation/message_attachments.js +21 -17
  52. package/build/components/conversation/message_attachments.js.map +1 -1
  53. package/build/components/conversation/message_form/message_form_attachment_file.d.ts +2 -1
  54. package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -1
  55. package/build/components/conversation/message_form/message_form_attachment_file.js +2 -2
  56. package/build/components/conversation/message_form/message_form_attachment_file.js.map +1 -1
  57. package/build/components/conversation/message_form/message_form_attachment_image.d.ts +2 -1
  58. package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
  59. package/build/components/conversation/message_form/message_form_attachment_image.js +2 -2
  60. package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
  61. package/build/components/conversation/message_form/message_form_attachment_video.d.ts +2 -1
  62. package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
  63. package/build/components/conversation/message_form/message_form_attachment_video.js +2 -2
  64. package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
  65. package/build/components/conversation/message_form.d.ts +6 -5
  66. package/build/components/conversation/message_form.d.ts.map +1 -1
  67. package/build/components/conversation/message_form.js +82 -20
  68. package/build/components/conversation/message_form.js.map +1 -1
  69. package/build/components/conversation/message_markdown.d.ts +2 -1
  70. package/build/components/conversation/message_markdown.d.ts.map +1 -1
  71. package/build/components/conversation/message_markdown.js +16 -8
  72. package/build/components/conversation/message_markdown.js.map +1 -1
  73. package/build/components/conversation/message_reaction.d.ts +2 -1
  74. package/build/components/conversation/message_reaction.d.ts.map +1 -1
  75. package/build/components/conversation/message_reaction.js +5 -3
  76. package/build/components/conversation/message_reaction.js.map +1 -1
  77. package/build/components/conversation/message_read_receipts.d.ts +2 -1
  78. package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
  79. package/build/components/conversation/message_read_receipts.js +13 -3
  80. package/build/components/conversation/message_read_receipts.js.map +1 -1
  81. package/build/components/conversation/messages_disabled_banners.d.ts +7 -3
  82. package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
  83. package/build/components/conversation/messages_disabled_banners.js +15 -8
  84. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  85. package/build/components/conversation/reply_connectors.d.ts +2 -2
  86. package/build/components/conversation/reply_connectors.d.ts.map +1 -1
  87. package/build/components/conversation/reply_connectors.js +50 -18
  88. package/build/components/conversation/reply_connectors.js.map +1 -1
  89. package/build/components/conversation/reply_shadow_message.d.ts +2 -1
  90. package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
  91. package/build/components/conversation/reply_shadow_message.js +46 -16
  92. package/build/components/conversation/reply_shadow_message.js.map +1 -1
  93. package/build/components/conversation/system_message.d.ts +2 -1
  94. package/build/components/conversation/system_message.d.ts.map +1 -1
  95. package/build/components/conversation/system_message.js +12 -3
  96. package/build/components/conversation/system_message.js.map +1 -1
  97. package/build/components/conversation/typing_indicator.d.ts +2 -1
  98. package/build/components/conversation/typing_indicator.d.ts.map +1 -1
  99. package/build/components/conversation/typing_indicator.js +13 -3
  100. package/build/components/conversation/typing_indicator.js.map +1 -1
  101. package/build/components/conversations/conversation_actions.d.ts +2 -2
  102. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  103. package/build/components/conversations/conversation_actions.js +10 -4
  104. package/build/components/conversations/conversation_actions.js.map +1 -1
  105. package/build/components/conversations/conversation_preview.d.ts +3 -2
  106. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  107. package/build/components/conversations/conversation_preview.js +76 -12
  108. package/build/components/conversations/conversation_preview.js.map +1 -1
  109. package/build/components/conversations/conversations.d.ts +1 -1
  110. package/build/components/conversations/conversations.d.ts.map +1 -1
  111. package/build/components/conversations/conversations.js +17 -16
  112. package/build/components/conversations/conversations.js.map +1 -1
  113. package/build/components/conversations/conversations_blank_state.d.ts +2 -1
  114. package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
  115. package/build/components/conversations/conversations_blank_state.js +12 -2
  116. package/build/components/conversations/conversations_blank_state.js.map +1 -1
  117. package/build/components/conversations/mute_indicator.d.ts +2 -1
  118. package/build/components/conversations/mute_indicator.d.ts.map +1 -1
  119. package/build/components/conversations/mute_indicator.js +2 -2
  120. package/build/components/conversations/mute_indicator.js.map +1 -1
  121. package/build/components/conversations/swipeable_toggle_button.d.ts +2 -1
  122. package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
  123. package/build/components/conversations/swipeable_toggle_button.js +10 -3
  124. package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
  125. package/build/components/conversations/unread_count_badge.d.ts +4 -2
  126. package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
  127. package/build/components/conversations/unread_count_badge.js +12 -7
  128. package/build/components/conversations/unread_count_badge.js.map +1 -1
  129. package/build/components/display/action_button.d.ts +1 -1
  130. package/build/components/display/action_button.d.ts.map +1 -1
  131. package/build/components/display/action_button.js +13 -3
  132. package/build/components/display/action_button.js.map +1 -1
  133. package/build/components/display/adult_requirement_notice.d.ts +2 -1
  134. package/build/components/display/adult_requirement_notice.d.ts.map +1 -1
  135. package/build/components/display/adult_requirement_notice.js +4 -2
  136. package/build/components/display/adult_requirement_notice.js.map +1 -1
  137. package/build/components/display/avatar.d.ts +2 -1
  138. package/build/components/display/avatar.d.ts.map +1 -1
  139. package/build/components/display/avatar.js +7 -2
  140. package/build/components/display/avatar.js.map +1 -1
  141. package/build/components/display/avatar_group.d.ts +2 -1
  142. package/build/components/display/avatar_group.d.ts.map +1 -1
  143. package/build/components/display/avatar_group.js +9 -2
  144. package/build/components/display/avatar_group.js.map +1 -1
  145. package/build/components/display/badge.d.ts +2 -1
  146. package/build/components/display/badge.d.ts.map +1 -1
  147. package/build/components/display/badge.js +37 -6
  148. package/build/components/display/badge.js.map +1 -1
  149. package/build/components/display/banner.d.ts +3 -3
  150. package/build/components/display/banner.d.ts.map +1 -1
  151. package/build/components/display/banner.js +11 -4
  152. package/build/components/display/banner.js.map +1 -1
  153. package/build/components/display/banner_collapsible.d.ts +2 -2
  154. package/build/components/display/banner_collapsible.d.ts.map +1 -1
  155. package/build/components/display/banner_collapsible.js +10 -2
  156. package/build/components/display/banner_collapsible.js.map +1 -1
  157. package/build/components/display/button.d.ts +2 -1
  158. package/build/components/display/button.d.ts.map +1 -1
  159. package/build/components/display/button.js +14 -3
  160. package/build/components/display/button.js.map +1 -1
  161. package/build/components/display/child_notice.d.ts +2 -1
  162. package/build/components/display/child_notice.d.ts.map +1 -1
  163. package/build/components/display/child_notice.js +15 -3
  164. package/build/components/display/child_notice.js.map +1 -1
  165. package/build/components/display/conversation_avatar.d.ts +2 -1
  166. package/build/components/display/conversation_avatar.d.ts.map +1 -1
  167. package/build/components/display/conversation_avatar.js +9 -5
  168. package/build/components/display/conversation_avatar.js.map +1 -1
  169. package/build/components/display/emoji_avatar.d.ts +2 -1
  170. package/build/components/display/emoji_avatar.d.ts.map +1 -1
  171. package/build/components/display/emoji_avatar.js +12 -2
  172. package/build/components/display/emoji_avatar.js.map +1 -1
  173. package/build/components/display/file_attachment_preview.d.ts +1 -1
  174. package/build/components/display/file_attachment_preview.d.ts.map +1 -1
  175. package/build/components/display/file_attachment_preview.js +17 -3
  176. package/build/components/display/file_attachment_preview.js.map +1 -1
  177. package/build/components/display/heading.d.ts +2 -1
  178. package/build/components/display/heading.d.ts.map +1 -1
  179. package/build/components/display/heading.js +4 -2
  180. package/build/components/display/heading.js.map +1 -1
  181. package/build/components/display/icon.d.ts +2 -1
  182. package/build/components/display/icon.d.ts.map +1 -1
  183. package/build/components/display/icon.js +4 -4
  184. package/build/components/display/icon.js.map +1 -1
  185. package/build/components/display/icon_avatar.d.ts +2 -1
  186. package/build/components/display/icon_avatar.d.ts.map +1 -1
  187. package/build/components/display/icon_avatar.js +12 -2
  188. package/build/components/display/icon_avatar.js.map +1 -1
  189. package/build/components/display/icon_button.d.ts +2 -1
  190. package/build/components/display/icon_button.d.ts.map +1 -1
  191. package/build/components/display/icon_button.js +5 -3
  192. package/build/components/display/icon_button.js.map +1 -1
  193. package/build/components/display/image.d.ts +2 -1
  194. package/build/components/display/image.d.ts.map +1 -1
  195. package/build/components/display/image.js +7 -3
  196. package/build/components/display/image.js.map +1 -1
  197. package/build/components/display/image_attachment_preview.d.ts +1 -1
  198. package/build/components/display/image_attachment_preview.d.ts.map +1 -1
  199. package/build/components/display/image_attachment_preview.js +7 -2
  200. package/build/components/display/image_attachment_preview.js.map +1 -1
  201. package/build/components/display/keyboard_view.d.ts +2 -1
  202. package/build/components/display/keyboard_view.d.ts.map +1 -1
  203. package/build/components/display/keyboard_view.js +9 -4
  204. package/build/components/display/keyboard_view.js.map +1 -1
  205. package/build/components/display/person.d.ts +2 -1
  206. package/build/components/display/person.d.ts.map +1 -1
  207. package/build/components/display/person.js +12 -2
  208. package/build/components/display/person.js.map +1 -1
  209. package/build/components/display/platform_modal_header_buttons.d.ts +3 -3
  210. package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
  211. package/build/components/display/platform_modal_header_buttons.js +10 -5
  212. package/build/components/display/platform_modal_header_buttons.js.map +1 -1
  213. package/build/components/display/pressable_row.d.ts +1 -1
  214. package/build/components/display/pressable_row.d.ts.map +1 -1
  215. package/build/components/display/pressable_row.js +7 -2
  216. package/build/components/display/pressable_row.js.map +1 -1
  217. package/build/components/display/spinner.d.ts +2 -1
  218. package/build/components/display/spinner.d.ts.map +1 -1
  219. package/build/components/display/spinner.js +9 -3
  220. package/build/components/display/spinner.js.map +1 -1
  221. package/build/components/display/switch.d.ts +2 -1
  222. package/build/components/display/switch.d.ts.map +1 -1
  223. package/build/components/display/switch.js +2 -2
  224. package/build/components/display/switch.js.map +1 -1
  225. package/build/components/display/tabs.d.ts +1 -1
  226. package/build/components/display/tabs.d.ts.map +1 -1
  227. package/build/components/display/tabs.js +31 -21
  228. package/build/components/display/tabs.js.map +1 -1
  229. package/build/components/display/text.d.ts +2 -1
  230. package/build/components/display/text.d.ts.map +1 -1
  231. package/build/components/display/text.js +4 -2
  232. package/build/components/display/text.js.map +1 -1
  233. package/build/components/display/text_button.d.ts +2 -1
  234. package/build/components/display/text_button.d.ts.map +1 -1
  235. package/build/components/display/text_button.js +8 -3
  236. package/build/components/display/text_button.js.map +1 -1
  237. package/build/components/display/text_inline_button.d.ts +2 -1
  238. package/build/components/display/text_inline_button.d.ts.map +1 -1
  239. package/build/components/display/text_inline_button.js +5 -4
  240. package/build/components/display/text_inline_button.js.map +1 -1
  241. package/build/components/display/text_input.d.ts +1 -1
  242. package/build/components/display/text_input.d.ts.map +1 -1
  243. package/build/components/display/text_input.js +1 -2
  244. package/build/components/display/text_input.js.map +1 -1
  245. package/build/components/display/toggle_button.d.ts +2 -1
  246. package/build/components/display/toggle_button.d.ts.map +1 -1
  247. package/build/components/display/toggle_button.js +9 -3
  248. package/build/components/display/toggle_button.js.map +1 -1
  249. package/build/components/display/video_attachment_preview.d.ts +1 -1
  250. package/build/components/display/video_attachment_preview.d.ts.map +1 -1
  251. package/build/components/display/video_attachment_preview.js +20 -3
  252. package/build/components/display/video_attachment_preview.js.map +1 -1
  253. package/build/components/group_conversation_list.d.ts +1 -1
  254. package/build/components/group_conversation_list.d.ts.map +1 -1
  255. package/build/components/group_conversation_list.js +14 -4
  256. package/build/components/group_conversation_list.js.map +1 -1
  257. package/build/components/page/component_error_boundary.d.ts +2 -2
  258. package/build/components/page/component_error_boundary.d.ts.map +1 -1
  259. package/build/components/page/component_error_boundary.js +4 -2
  260. package/build/components/page/component_error_boundary.js.map +1 -1
  261. package/build/components/page/loading.d.ts +2 -1
  262. package/build/components/page/loading.d.ts.map +1 -1
  263. package/build/components/page/loading.js +4 -2
  264. package/build/components/page/loading.js.map +1 -1
  265. package/build/components/page/page_error_boundary.d.ts +2 -2
  266. package/build/components/page/page_error_boundary.d.ts.map +1 -1
  267. package/build/components/page/page_error_boundary.js +32 -11
  268. package/build/components/page/page_error_boundary.js.map +1 -1
  269. package/build/components/primitive/avatar_primitive.js +41 -14
  270. package/build/components/primitive/avatar_primitive.js.map +1 -1
  271. package/build/components/primitive/banner_primitive.js +18 -10
  272. package/build/components/primitive/banner_primitive.js.map +1 -1
  273. package/build/components/primitive/blank_state_primitive.js +12 -8
  274. package/build/components/primitive/blank_state_primitive.js.map +1 -1
  275. package/build/components/primitive/form_sheet.d.ts +1 -1
  276. package/build/components/primitive/form_sheet.d.ts.map +1 -1
  277. package/build/components/primitive/form_sheet.js +22 -9
  278. package/build/components/primitive/form_sheet.js.map +1 -1
  279. package/build/components/safe_area_modal.d.ts +1 -1
  280. package/build/components/safe_area_modal.d.ts.map +1 -1
  281. package/build/components/safe_area_modal.js +3 -2
  282. package/build/components/safe_area_modal.js.map +1 -1
  283. package/build/contexts/api_provider.d.ts +2 -1
  284. package/build/contexts/api_provider.d.ts.map +1 -1
  285. package/build/contexts/api_provider.js +5 -3
  286. package/build/contexts/api_provider.js.map +1 -1
  287. package/build/contexts/chat_context.d.ts +1 -1
  288. package/build/contexts/chat_context.d.ts.map +1 -1
  289. package/build/contexts/chat_context.js +1 -2
  290. package/build/contexts/chat_context.js.map +1 -1
  291. package/build/contexts/conversation_context.d.ts +2 -2
  292. package/build/contexts/conversation_context.d.ts.map +1 -1
  293. package/build/contexts/conversation_context.js +2 -3
  294. package/build/contexts/conversation_context.js.map +1 -1
  295. package/build/contexts/conversations_context.d.ts +2 -2
  296. package/build/contexts/conversations_context.d.ts.map +1 -1
  297. package/build/contexts/conversations_context.js +2 -3
  298. package/build/contexts/conversations_context.js.map +1 -1
  299. package/build/contexts/session_context.d.ts +1 -1
  300. package/build/contexts/session_context.d.ts.map +1 -1
  301. package/build/contexts/session_context.js +2 -3
  302. package/build/contexts/session_context.js.map +1 -1
  303. package/build/hooks/direct_messages/find_direct_message_conversation.d.ts +14 -0
  304. package/build/hooks/direct_messages/find_direct_message_conversation.d.ts.map +1 -0
  305. package/build/hooks/direct_messages/find_direct_message_conversation.js +10 -0
  306. package/build/hooks/direct_messages/find_direct_message_conversation.js.map +1 -0
  307. package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts +16 -0
  308. package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts.map +1 -0
  309. package/build/hooks/direct_messages/resolve_message_available_members_link.js +24 -0
  310. package/build/hooks/direct_messages/resolve_message_available_members_link.js.map +1 -0
  311. package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.d.ts.map +1 -1
  312. package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js +1 -8
  313. package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js.map +1 -1
  314. package/build/hooks/direct_messages/use_message_available_members.d.ts +6 -0
  315. package/build/hooks/direct_messages/use_message_available_members.d.ts.map +1 -0
  316. package/build/hooks/direct_messages/use_message_available_members.js +40 -0
  317. package/build/hooks/direct_messages/use_message_available_members.js.map +1 -0
  318. package/build/hooks/direct_messages/use_message_available_members_action.d.ts +6 -0
  319. package/build/hooks/direct_messages/use_message_available_members_action.d.ts.map +1 -0
  320. package/build/hooks/direct_messages/use_message_available_members_action.js +30 -0
  321. package/build/hooks/direct_messages/use_message_available_members_action.js.map +1 -0
  322. package/build/hooks/use_animated_message_background_color.d.ts +2 -2
  323. package/build/hooks/use_conversation.d.ts +1 -1
  324. package/build/hooks/use_conversation.d.ts.map +1 -1
  325. package/build/hooks/use_conversation.js +3 -0
  326. package/build/hooks/use_conversation.js.map +1 -1
  327. package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
  328. package/build/hooks/use_conversation_jolt_events.js +4 -19
  329. package/build/hooks/use_conversation_jolt_events.js.map +1 -1
  330. package/build/hooks/use_conversation_membership.d.ts +1 -1
  331. package/build/hooks/use_conversation_membership.d.ts.map +1 -1
  332. package/build/hooks/use_conversation_messages.d.ts +0 -1
  333. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  334. package/build/hooks/use_conversation_messages.js +2 -2
  335. package/build/hooks/use_conversation_messages.js.map +1 -1
  336. package/build/hooks/use_conversations_actions.d.ts +36 -36
  337. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  338. package/build/hooks/use_conversations_actions.js +3 -1
  339. package/build/hooks/use_conversations_actions.js.map +1 -1
  340. package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
  341. package/build/hooks/use_mark_latest_message_read.js +3 -4
  342. package/build/hooks/use_mark_latest_message_read.js.map +1 -1
  343. package/build/hooks/use_person_settings.d.ts +1 -1
  344. package/build/index.d.ts +1 -2
  345. package/build/index.d.ts.map +1 -1
  346. package/build/index.js.map +1 -1
  347. package/build/navigation/chat_access_gate.d.ts +2 -2
  348. package/build/navigation/chat_access_gate.d.ts.map +1 -1
  349. package/build/navigation/chat_access_gate.js +5 -6
  350. package/build/navigation/chat_access_gate.js.map +1 -1
  351. package/build/navigation/index.d.ts +36 -35
  352. package/build/navigation/index.d.ts.map +1 -1
  353. package/build/navigation/index.js +21 -19
  354. package/build/navigation/index.js.map +1 -1
  355. package/build/navigation/screenLayout.d.ts +2 -2
  356. package/build/navigation/screenLayout.d.ts.map +1 -1
  357. package/build/navigation/screenLayout.js +9 -3
  358. package/build/navigation/screenLayout.js.map +1 -1
  359. package/build/polyfills/events/EventTarget.d.ts +1 -1
  360. package/build/polyfills/events/EventTarget.d.ts.map +1 -1
  361. package/build/polyfills/events/EventTarget.js.map +1 -1
  362. package/build/screens/age_check/age_check_required_screen.d.ts +2 -1
  363. package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
  364. package/build/screens/age_check/age_check_required_screen.js +46 -3
  365. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  366. package/build/screens/age_check/age_check_underage_screen.d.ts +2 -1
  367. package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
  368. package/build/screens/age_check/age_check_underage_screen.js +25 -2
  369. package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
  370. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +2 -1
  371. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
  372. package/build/screens/age_check/components/age_check_select_birthdate_modal.js +25 -6
  373. package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
  374. package/build/screens/attachment_actions/attachment_actions_screen.d.ts +2 -1
  375. package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
  376. package/build/screens/attachment_actions/attachment_actions_screen.js +5 -3
  377. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  378. package/build/screens/avatar_picker/avatar_picker_screen.d.ts +2 -1
  379. package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
  380. package/build/screens/avatar_picker/avatar_picker_screen.js +36 -9
  381. package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
  382. package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
  383. package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
  384. package/build/screens/avatar_picker/avatar_preview.js +9 -5
  385. package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
  386. package/build/screens/avatar_picker/color_picker.d.ts +2 -1
  387. package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
  388. package/build/screens/avatar_picker/color_picker.js +5 -4
  389. package/build/screens/avatar_picker/color_picker.js.map +1 -1
  390. package/build/screens/avatar_picker/emoji_tab.d.ts +2 -1
  391. package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
  392. package/build/screens/avatar_picker/emoji_tab.js +13 -12
  393. package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
  394. package/build/screens/avatar_picker/icon_grid.d.ts +2 -1
  395. package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
  396. package/build/screens/avatar_picker/icon_grid.js +5 -4
  397. package/build/screens/avatar_picker/icon_grid.js.map +1 -1
  398. package/build/screens/avatar_picker/upload_tab.d.ts +2 -1
  399. package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
  400. package/build/screens/avatar_picker/upload_tab.js +4 -3
  401. package/build/screens/avatar_picker/upload_tab.js.map +1 -1
  402. package/build/screens/bug_report_screen.d.ts +2 -1
  403. package/build/screens/bug_report_screen.d.ts.map +1 -1
  404. package/build/screens/bug_report_screen.js +117 -11
  405. package/build/screens/bug_report_screen.js.map +1 -1
  406. package/build/screens/conversation/message_read_receipts_screen.d.ts +2 -1
  407. package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
  408. package/build/screens/conversation/message_read_receipts_screen.js +20 -4
  409. package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
  410. package/build/screens/conversation_details_screen.d.ts +2 -1
  411. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  412. package/build/screens/conversation_details_screen.js +106 -43
  413. package/build/screens/conversation_details_screen.js.map +1 -1
  414. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
  415. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
  416. package/build/screens/conversation_filter_recipients/components/checkbox_row.js +9 -3
  417. package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
  418. package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
  419. package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
  420. package/build/screens/conversation_filter_recipients/components/header_row.js +12 -2
  421. package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
  422. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +2 -1
  423. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  424. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +44 -20
  425. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  426. package/build/screens/conversation_filters/components/conversation_filters.d.ts +2 -1
  427. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  428. package/build/screens/conversation_filters/components/conversation_filters.js +11 -10
  429. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  430. package/build/screens/conversation_filters/components/rows.d.ts +6 -6
  431. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  432. package/build/screens/conversation_filters/components/rows.js +34 -7
  433. package/build/screens/conversation_filters/components/rows.js.map +1 -1
  434. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
  435. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
  436. package/build/screens/conversation_filters/context/conversation_filter_context.js +1 -2
  437. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  438. package/build/screens/conversation_filters/group_filters.d.ts +2 -1
  439. package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
  440. package/build/screens/conversation_filters/group_filters.js +2 -2
  441. package/build/screens/conversation_filters/group_filters.js.map +1 -1
  442. package/build/screens/conversation_filters/team_filters.d.ts +2 -1
  443. package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
  444. package/build/screens/conversation_filters/team_filters.js +2 -2
  445. package/build/screens/conversation_filters/team_filters.js.map +1 -1
  446. package/build/screens/conversation_filters_screen.d.ts +2 -1
  447. package/build/screens/conversation_filters_screen.d.ts.map +1 -1
  448. package/build/screens/conversation_filters_screen.js +16 -4
  449. package/build/screens/conversation_filters_screen.js.map +1 -1
  450. package/build/screens/conversation_new/components/avatar_selection_row.d.ts +3 -2
  451. package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
  452. package/build/screens/conversation_new/components/avatar_selection_row.js +16 -6
  453. package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
  454. package/build/screens/conversation_new/components/filter_by_plan.d.ts +4 -3
  455. package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
  456. package/build/screens/conversation_new/components/filter_by_plan.js +46 -22
  457. package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
  458. package/build/screens/conversation_new/components/form_list.d.ts +3 -2
  459. package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
  460. package/build/screens/conversation_new/components/form_list.js +6 -4
  461. package/build/screens/conversation_new/components/form_list.js.map +1 -1
  462. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +2 -1
  463. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
  464. package/build/screens/conversation_new/components/gender_filter_toggle.js +20 -4
  465. package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
  466. package/build/screens/conversation_new/components/groups_form.d.ts +2 -1
  467. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  468. package/build/screens/conversation_new/components/groups_form.js +30 -4
  469. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  470. package/build/screens/conversation_new/components/services_form.d.ts +2 -1
  471. package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
  472. package/build/screens/conversation_new/components/services_form.js +61 -27
  473. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  474. package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
  475. package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
  476. package/build/screens/conversation_new/components/source_app_error_card.js +3 -2
  477. package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
  478. package/build/screens/conversation_new/conversation_new_screen.d.ts +2 -1
  479. package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
  480. package/build/screens/conversation_new/conversation_new_screen.js +4 -4
  481. package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
  482. package/build/screens/conversation_notification_level_select_screen.d.ts +2 -1
  483. package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
  484. package/build/screens/conversation_notification_level_select_screen.js +6 -4
  485. package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
  486. package/build/screens/conversation_screen.d.ts +3 -2
  487. package/build/screens/conversation_screen.d.ts.map +1 -1
  488. package/build/screens/conversation_screen.js +68 -25
  489. package/build/screens/conversation_screen.js.map +1 -1
  490. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
  491. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
  492. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -2
  493. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
  494. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +2 -1
  495. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
  496. package/build/screens/conversation_select_recipients/components/recipient_link_row.js +15 -2
  497. package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
  498. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +2 -1
  499. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
  500. package/build/screens/conversation_select_recipients/components/restricted_group_row.js +14 -2
  501. package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
  502. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
  503. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
  504. package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -2
  505. package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
  506. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
  507. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
  508. package/build/screens/conversation_select_recipients/components/view_more_link_row.js +5 -2
  509. package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
  510. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +2 -1
  511. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  512. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +11 -4
  513. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  514. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
  515. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
  516. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +96 -13
  517. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
  518. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +2 -1
  519. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  520. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +14 -7
  521. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  522. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +2 -1
  523. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  524. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +18 -15
  525. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  526. package/build/screens/conversation_select_recipients/types/screen_props.d.ts +2 -0
  527. package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -1
  528. package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -1
  529. package/build/screens/conversation_select_type_screen.d.ts +2 -1
  530. package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
  531. package/build/screens/conversation_select_type_screen.js +10 -3
  532. package/build/screens/conversation_select_type_screen.js.map +1 -1
  533. package/build/screens/conversations/components/chat_group_badge.d.ts +2 -1
  534. package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
  535. package/build/screens/conversations/components/chat_group_badge.js +4 -3
  536. package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
  537. package/build/screens/conversations/components/list_header_action_button.d.ts +2 -1
  538. package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
  539. package/build/screens/conversations/components/list_header_action_button.js +5 -3
  540. package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
  541. package/build/screens/conversations/components/list_header_component.d.ts +2 -1
  542. package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
  543. package/build/screens/conversations/components/list_header_component.js +42 -19
  544. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  545. package/build/screens/conversations/conversations_screen.d.ts +2 -1
  546. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  547. package/build/screens/conversations/conversations_screen.js +6 -2
  548. package/build/screens/conversations/conversations_screen.js.map +1 -1
  549. package/build/screens/design_system_screen.d.ts +2 -1
  550. package/build/screens/design_system_screen.d.ts.map +1 -1
  551. package/build/screens/design_system_screen.js +558 -35
  552. package/build/screens/design_system_screen.js.map +1 -1
  553. package/build/screens/get_help_screen.d.ts +1 -1
  554. package/build/screens/get_help_screen.d.ts.map +1 -1
  555. package/build/screens/get_help_screen.js +25 -4
  556. package/build/screens/get_help_screen.js.map +1 -1
  557. package/build/screens/group_notification_level_select_screen.d.ts +2 -1
  558. package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
  559. package/build/screens/group_notification_level_select_screen.js +4 -2
  560. package/build/screens/group_notification_level_select_screen.js.map +1 -1
  561. package/build/screens/group_notification_settings_screen.d.ts +2 -1
  562. package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
  563. package/build/screens/group_notification_settings_screen.js +25 -3
  564. package/build/screens/group_notification_settings_screen.js.map +1 -1
  565. package/build/screens/message_actions_screen.d.ts +2 -1
  566. package/build/screens/message_actions_screen.d.ts.map +1 -1
  567. package/build/screens/message_actions_screen.js +28 -12
  568. package/build/screens/message_actions_screen.js.map +1 -1
  569. package/build/screens/message_report/components/message_preview.d.ts +2 -1
  570. package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
  571. package/build/screens/message_report/components/message_preview.js +22 -2
  572. package/build/screens/message_report/components/message_preview.js.map +1 -1
  573. package/build/screens/message_report/components/report_reason_list.d.ts +2 -1
  574. package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
  575. package/build/screens/message_report/components/report_reason_list.js +13 -4
  576. package/build/screens/message_report/components/report_reason_list.js.map +1 -1
  577. package/build/screens/message_report_screen.d.ts +2 -1
  578. package/build/screens/message_report_screen.d.ts.map +1 -1
  579. package/build/screens/message_report_screen.js +61 -9
  580. package/build/screens/message_report_screen.js.map +1 -1
  581. package/build/screens/not_found.d.ts +2 -1
  582. package/build/screens/not_found.d.ts.map +1 -1
  583. package/build/screens/not_found.js +5 -2
  584. package/build/screens/not_found.js.map +1 -1
  585. package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
  586. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  587. package/build/screens/notification_settings_screen.d.ts +2 -1
  588. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  589. package/build/screens/notification_settings_screen.js +66 -28
  590. package/build/screens/notification_settings_screen.js.map +1 -1
  591. package/build/screens/preferred_app_selection_screen.d.ts +2 -1
  592. package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
  593. package/build/screens/preferred_app_selection_screen.js +21 -3
  594. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  595. package/build/screens/reactions_screen.d.ts +2 -1
  596. package/build/screens/reactions_screen.d.ts.map +1 -1
  597. package/build/screens/reactions_screen.js +19 -7
  598. package/build/screens/reactions_screen.js.map +1 -1
  599. package/build/screens/send_giphy_screen.d.ts +2 -1
  600. package/build/screens/send_giphy_screen.d.ts.map +1 -1
  601. package/build/screens/send_giphy_screen.js +31 -5
  602. package/build/screens/send_giphy_screen.js.map +1 -1
  603. package/build/screens/settings_screen.d.ts +2 -1
  604. package/build/screens/settings_screen.d.ts.map +1 -1
  605. package/build/screens/settings_screen.js +26 -4
  606. package/build/screens/settings_screen.js.map +1 -1
  607. package/build/screens/system_message_people_screen.d.ts +2 -1
  608. package/build/screens/system_message_people_screen.d.ts.map +1 -1
  609. package/build/screens/system_message_people_screen.js +10 -4
  610. package/build/screens/system_message_people_screen.js.map +1 -1
  611. package/build/screens/team_conversation_screen.d.ts +1 -1
  612. package/build/screens/team_conversation_screen.d.ts.map +1 -1
  613. package/build/screens/team_conversation_screen.js +12 -4
  614. package/build/screens/team_conversation_screen.js.map +1 -1
  615. package/build/types/resources/conversation.d.ts +10 -1
  616. package/build/types/resources/conversation.d.ts.map +1 -1
  617. package/build/types/resources/conversation.js.map +1 -1
  618. package/build/types/resources/direct_message_candidate.d.ts +1 -0
  619. package/build/types/resources/direct_message_candidate.d.ts.map +1 -1
  620. package/build/types/resources/direct_message_candidate.js.map +1 -1
  621. package/build/types/resources/member.d.ts +1 -0
  622. package/build/types/resources/member.d.ts.map +1 -1
  623. package/build/types/resources/member.js.map +1 -1
  624. package/build/types/resources/member_ability.d.ts +1 -0
  625. package/build/types/resources/member_ability.d.ts.map +1 -1
  626. package/build/types/resources/member_ability.js.map +1 -1
  627. package/build/utils/request/conversation.d.ts.map +1 -1
  628. package/build/utils/request/conversation.js +2 -0
  629. package/build/utils/request/conversation.js.map +1 -1
  630. package/build/utils/response_error.d.ts.map +1 -1
  631. package/build/utils/response_error.js +16 -6
  632. package/build/utils/response_error.js.map +1 -1
  633. package/build/utils/sha_256.js.map +1 -1
  634. package/build/utils/system_messages.d.ts +1 -1
  635. package/build/utils/system_messages.d.ts.map +1 -1
  636. package/build/utils/system_messages.js.map +1 -1
  637. package/build/utils/theme.d.ts +2 -2
  638. package/build/utils/theme.d.ts.map +1 -1
  639. package/build/utils/theme.js.map +1 -1
  640. package/package.json +12 -12
  641. package/src/__tests__/hooks/resolve_message_available_members_link.test.ts +72 -0
  642. package/src/__tests__/hooks/use_attachment_uploader.test.tsx +0 -1
  643. package/src/__tests__/hooks/use_font_scale.test.ts +3 -7
  644. package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
  645. package/src/__tests__/utils/system_messages.ts +1 -1
  646. package/src/__tests__/utils/uri.ts +50 -8
  647. package/src/__utils__/handlers.ts +6 -5
  648. package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +3 -10
  649. package/src/components/conversation/messages_disabled_banners.tsx +31 -4
  650. package/src/components/conversations/conversation_preview.tsx +58 -23
  651. package/src/components/conversations/unread_count_badge.tsx +13 -4
  652. package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
  653. package/src/components/page/__tests__/error_boundary.test.tsx +2 -6
  654. package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
  655. package/src/hooks/direct_messages/find_direct_message_conversation.ts +16 -0
  656. package/src/hooks/direct_messages/resolve_message_available_members_link.ts +42 -0
  657. package/src/hooks/direct_messages/use_find_or_create_direct_message_conversation.ts +2 -11
  658. package/src/hooks/direct_messages/use_message_available_members.ts +65 -0
  659. package/src/hooks/direct_messages/use_message_available_members_action.ts +34 -0
  660. package/src/hooks/use_conversation.ts +3 -0
  661. package/src/hooks/use_conversation_jolt_events.ts +3 -19
  662. package/src/hooks/use_conversation_messages.ts +5 -6
  663. package/src/hooks/use_conversations_actions.ts +3 -1
  664. package/src/hooks/use_mark_latest_message_read.ts +3 -4
  665. package/src/index.tsx +1 -2
  666. package/src/polyfills/events/EventTarget.ts +1 -1
  667. package/src/screens/conversation_screen.tsx +11 -5
  668. package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +18 -4
  669. package/src/screens/conversation_select_recipients/types/screen_props.tsx +2 -0
  670. package/src/screens/conversations/components/list_header_component.tsx +6 -6
  671. package/src/types/resources/conversation.ts +11 -1
  672. package/src/types/resources/direct_message_candidate.ts +5 -0
  673. package/src/types/resources/member.ts +1 -0
  674. package/src/types/resources/member_ability.ts +1 -0
  675. package/src/utils/__tests__/response_error.test.ts +7 -0
  676. package/src/utils/request/conversation.ts +2 -0
  677. package/src/utils/response_error.ts +18 -7
  678. package/src/utils/sha_256.ts +24 -24
  679. package/src/utils/system_messages.ts +1 -1
  680. package/src/utils/theme.ts +2 -3
@@ -1,9 +1,9 @@
1
- import { ComponentProps, ReactNode } from 'react';
1
+ import React, { ComponentProps, ReactNode } from 'react';
2
2
  import { View } from 'react-native';
3
3
  type AttachmentCardProps = ComponentProps<typeof View>;
4
- export declare function AttachmentCard({ children, ...props }: AttachmentCardProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function AttachmentCard({ children, ...props }: AttachmentCardProps): React.JSX.Element;
5
5
  export declare function AttachmentCardTitle({ children }: {
6
6
  children: ReactNode;
7
- }): import("react/jsx-runtime").JSX.Element;
7
+ }): React.JSX.Element;
8
8
  export {};
9
9
  //# sourceMappingURL=attachment_card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachment_card.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/attachment_card.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxD,OAAO,EAAc,IAAI,EAAE,MAAM,cAAc,CAAA;AAK/C,KAAK,mBAAmB,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AAEtD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAQzE;AAED,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAQxE"}
1
+ {"version":3,"file":"attachment_card.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/attachment_card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxD,OAAO,EAAc,IAAI,EAAE,MAAM,cAAc,CAAA;AAK/C,KAAK,mBAAmB,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AAEtD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,qBAQzE;AAED,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,qBAQxE"}
@@ -1,15 +1,19 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
  import { useTheme } from '../../../hooks';
4
4
  import { tokens } from '../../../vendor/tapestry/tokens';
5
5
  import { Text } from '../../display';
6
6
  export function AttachmentCard({ children, ...props }) {
7
7
  const styles = useStyles();
8
- return (_jsx(View, { style: styles.card, ...props, children: children }));
8
+ return (<View style={styles.card} {...props}>
9
+ {children}
10
+ </View>);
9
11
  }
10
12
  export function AttachmentCardTitle({ children }) {
11
13
  const styles = useStyles();
12
- return (_jsx(Text, { style: styles.title, numberOfLines: 1, selectable: false, children: children }));
14
+ return (<Text style={styles.title} numberOfLines={1} selectable={false}>
15
+ {children}
16
+ </Text>);
13
17
  }
14
18
  const useStyles = () => {
15
19
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"attachment_card.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/attachment_card.tsx"],"names":[],"mappings":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View } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { tokens } from '../../../vendor/tapestry/tokens'\nimport { Text } from '../../display'\n\ntype AttachmentCardProps = ComponentProps<typeof View>\n\nexport function AttachmentCard({ children, ...props }: AttachmentCardProps) {\n const styles = useStyles()\n\n return (\n <View style={styles.card} {...props}>\n {children}\n </View>\n )\n}\n\nexport function AttachmentCardTitle({ children }: { children: ReactNode }) {\n const styles = useStyles()\n\n return (\n <Text style={styles.title} numberOfLines={1} selectable={false}>\n {children}\n </Text>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n card: {\n padding: 8,\n backgroundColor: colors.surfaceColor100,\n borderRadius: 8,\n minWidth: '100%',\n minHeight: 60,\n justifyContent: 'center',\n position: 'relative',\n },\n title: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeSm,\n flex: 1,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"attachment_card.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/attachment_card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAIpC,MAAM,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAuB;IACxE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAClC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,EAAE,QAAQ,EAA2B;IACvE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAC7D;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC;YACV,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,MAAM;YAChB,SAAS,EAAE,EAAE;YACb,cAAc,EAAE,QAAQ;YACxB,QAAQ,EAAE,UAAU;SACrB;QACD,KAAK,EAAE;YACL,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,MAAM,CAAC,UAAU;YAC3B,IAAI,EAAE,CAAC;SACR;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { ComponentProps, ReactNode } from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { tokens } from '../../../vendor/tapestry/tokens'\nimport { Text } from '../../display'\n\ntype AttachmentCardProps = ComponentProps<typeof View>\n\nexport function AttachmentCard({ children, ...props }: AttachmentCardProps) {\n const styles = useStyles()\n\n return (\n <View style={styles.card} {...props}>\n {children}\n </View>\n )\n}\n\nexport function AttachmentCardTitle({ children }: { children: ReactNode }) {\n const styles = useStyles()\n\n return (\n <Text style={styles.title} numberOfLines={1} selectable={false}>\n {children}\n </Text>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n card: {\n padding: 8,\n backgroundColor: colors.surfaceColor100,\n borderRadius: 8,\n minWidth: '100%',\n minHeight: 60,\n justifyContent: 'center',\n position: 'relative',\n },\n title: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeSm,\n flex: 1,\n },\n })\n}\n"]}
@@ -1,2 +1,3 @@
1
- export declare function AttachmentDeletingOverlay(): import("react/jsx-runtime").JSX.Element;
1
+ import React from 'react';
2
+ export declare function AttachmentDeletingOverlay(): React.JSX.Element;
2
3
  //# sourceMappingURL=attachment_deleting_overlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachment_deleting_overlay.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/attachment_deleting_overlay.tsx"],"names":[],"mappings":"AAIA,wBAAgB,yBAAyB,4CASxC"}
1
+ {"version":3,"file":"attachment_deleting_overlay.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/attachment_deleting_overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,wBAAgB,yBAAyB,sBASxC"}
@@ -1,31 +1,26 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { View, StyleSheet } from 'react-native';
3
3
  import { useTheme } from '../../../hooks';
4
4
  import { Spinner } from '../../display';
5
5
  export function AttachmentDeletingOverlay() {
6
6
  const styles = useStyles();
7
- return (_jsxs(View, { style: styles.container, children: [_jsx(View, { style: styles.overlay }), _jsx(Spinner, { size: 24 })] }));
7
+ return (<View style={styles.container}>
8
+ <View style={styles.overlay}/>
9
+ <Spinner size={24}/>
10
+ </View>);
8
11
  }
9
12
  const useStyles = () => {
10
13
  const { colors } = useTheme();
11
14
  return StyleSheet.create({
12
15
  container: {
13
- position: 'absolute',
14
- top: 0,
15
- left: 0,
16
- right: 0,
17
- bottom: 0,
16
+ ...StyleSheet.absoluteFillObject,
18
17
  justifyContent: 'center',
19
18
  alignItems: 'center',
20
19
  borderRadius: 8,
21
20
  overflow: 'hidden',
22
21
  },
23
22
  overlay: {
24
- position: 'absolute',
25
- top: 0,
26
- left: 0,
27
- right: 0,
28
- bottom: 0,
23
+ ...StyleSheet.absoluteFillObject,
29
24
  backgroundColor: colors.fillColorNeutral070,
30
25
  opacity: 0.5,
31
26
  },
@@ -1 +1 @@
1
- {"version":3,"file":"attachment_deleting_overlay.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/attachment_deleting_overlay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,MAAM,UAAU,yBAAyB;IACvC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,aAC3B,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,GAAI,EAC/B,KAAC,OAAO,IAAC,IAAI,EAAE,EAAE,GAAI,IAChB,CACR,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,QAAQ;SACnB;QACD,OAAO,EAAE;YACP,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,eAAe,EAAE,MAAM,CAAC,mBAAmB;YAC3C,OAAO,EAAE,GAAG;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { View, StyleSheet } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { Spinner } from '../../display'\n\nexport function AttachmentDeletingOverlay() {\n const styles = useStyles()\n\n return (\n <View style={styles.container}>\n <View style={styles.overlay} />\n <Spinner size={24} />\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: 8,\n overflow: 'hidden',\n },\n overlay: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: colors.fillColorNeutral070,\n opacity: 0.5,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"attachment_deleting_overlay.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/attachment_deleting_overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,MAAM,UAAU,yBAAyB;IACvC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAC5B;MAAA,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EACpB;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,GAAG,UAAU,CAAC,kBAAkB;YAChC,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,QAAQ;SACnB;QACD,OAAO,EAAE;YACP,GAAG,UAAU,CAAC,kBAAkB;YAChC,eAAe,EAAE,MAAM,CAAC,mBAAmB;YAC3C,OAAO,EAAE,GAAG;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { View, StyleSheet } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { Spinner } from '../../display'\n\nexport function AttachmentDeletingOverlay() {\n const styles = useStyles()\n\n return (\n <View style={styles.container}>\n <View style={styles.overlay} />\n <Spinner size={24} />\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n ...StyleSheet.absoluteFillObject,\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: 8,\n overflow: 'hidden',\n },\n overlay: {\n ...StyleSheet.absoluteFillObject,\n backgroundColor: colors.fillColorNeutral070,\n opacity: 0.5,\n },\n })\n}\n"]}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
2
3
  export declare function AudioAttachment({ attachment, onMessageAttachmentLongPress, isDeleting, }: {
3
4
  attachment: DenormalizedMessageAttachmentResource;
4
5
  onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void;
5
6
  isDeleting: boolean;
6
- }): import("react/jsx-runtime").JSX.Element;
7
+ }): React.JSX.Element;
7
8
  //# sourceMappingURL=audio_attachment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audio_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/audio_attachment.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,qCAAqC,EAAE,MAAM,2DAA2D,CAAA;AAMjH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,4BAA4B,EAC5B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,qCAAqC,CAAA;IACjD,4BAA4B,EAAE,CAAC,UAAU,EAAE,qCAAqC,KAAK,IAAI,CAAA;IACzF,UAAU,EAAE,OAAO,CAAA;CACpB,2CAwDA"}
1
+ {"version":3,"file":"audio_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/audio_attachment.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,qCAAqC,EAAE,MAAM,2DAA2D,CAAA;AAMjH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,4BAA4B,EAC5B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,qCAAqC,CAAA;IACjD,4BAA4B,EAAE,CAAC,UAAU,EAAE,qCAAqC,KAAK,IAAI,CAAA;IACzF,UAAU,EAAE,OAAO,CAAA;CACpB,qBAwDA"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { PlatformPressable } from '@react-navigation/elements';
2
+ import React from 'react';
3
3
  import { View, StyleSheet } from 'react-native';
4
4
  import { useTheme } from '../../../hooks';
5
5
  import { Audio } from '../../../utils/native_adapters';
@@ -22,24 +22,41 @@ export function AudioAttachment({ attachment, onMessageAttachmentLongPress, isDe
22
22
  }
23
23
  }
24
24
  const progress = sound.duration > 0 ? sound.position / sound.duration : 0;
25
- return (_jsx(PlatformPressable, { onLongPress: () => !isDeleting && onMessageAttachmentLongPress(attachment), android_ripple: { color: colors.androidRippleNeutral, foreground: true }, accessibilityHint: "Long press for more options", disabled: isDeleting, children: _jsxs(AttachmentCard, { children: [_jsxs(View, { style: styles.container, children: [AudioPlayer, _jsx(IconButton, { name: sound.isPlaying ? 'services.pause' : 'services.play', size: "md", accessibilityLabel: sound.isPlaying ? 'Pause' : 'Play', onPress: toggleAudio, disabled: !sound || isDeleting, style: styles.button, iconStyle: styles.buttonIcon }), _jsxs(View, { style: styles.details, children: [_jsx(AttachmentCardTitle, { children: filename }), _jsx(View, { style: styles.progressContainer, children: _jsx(View, { style: styles.progressTrack, children: _jsx(View, { style: [styles.progressBar, { width: `${progress * 100}%` }] }) }) }), sound.isPlaying ? (_jsx(ProgressionText, { progress: sound.position || 0 })) : (_jsx(DurationText, { duration: sound.duration || 0 }))] })] }), isDeleting && _jsx(AttachmentDeletingOverlay, {})] }) }));
25
+ return (<PlatformPressable onLongPress={() => !isDeleting && onMessageAttachmentLongPress(attachment)} android_ripple={{ color: colors.androidRippleNeutral, foreground: true }} accessibilityHint="Long press for more options" disabled={isDeleting}>
26
+ <AttachmentCard>
27
+ <View style={styles.container}>
28
+ {AudioPlayer}
29
+ <IconButton name={sound.isPlaying ? 'services.pause' : 'services.play'} size="md" accessibilityLabel={sound.isPlaying ? 'Pause' : 'Play'} onPress={toggleAudio} disabled={!sound || isDeleting} style={styles.button} iconStyle={styles.buttonIcon}/>
30
+ <View style={styles.details}>
31
+ <AttachmentCardTitle>{filename}</AttachmentCardTitle>
32
+ <View style={styles.progressContainer}>
33
+ <View style={styles.progressTrack}>
34
+ <View style={[styles.progressBar, { width: `${progress * 100}%` }]}/>
35
+ </View>
36
+ </View>
37
+ {sound.isPlaying ? (<ProgressionText progress={sound.position || 0}/>) : (<DurationText duration={sound.duration || 0}/>)}
38
+ </View>
39
+ </View>
40
+ {isDeleting && <AttachmentDeletingOverlay />}
41
+ </AttachmentCard>
42
+ </PlatformPressable>);
26
43
  }
27
44
  const DurationText = ({ duration }) => {
28
45
  if (duration === 0)
29
- return _jsx(Text, { variant: "footnote", children: "Loading..." });
46
+ return <Text variant="footnote">Loading...</Text>;
30
47
  const { minutes, seconds } = getMinutesAndSeconds(duration);
31
48
  const secondsLabel = `${seconds}s`;
32
49
  const minutesLabel = `${minutes}m`;
33
50
  const label = minutes > 0 ? `${minutesLabel} ${secondsLabel}` : secondsLabel;
34
- return _jsx(Text, { variant: "footnote", children: label });
51
+ return <Text variant="footnote">{label}</Text>;
35
52
  };
36
53
  const ProgressionText = ({ progress }) => {
37
54
  if (progress === 0)
38
- return _jsx(Text, { variant: "footnote", children: "Loading..." });
55
+ return <Text variant="footnote">Loading...</Text>;
39
56
  const { minutes, seconds } = getMinutesAndSeconds(progress);
40
57
  const twoDigitSeconds = seconds.toString().padStart(2, '0');
41
58
  const twoDigitMinutes = minutes.toString().padStart(2, '0');
42
- return _jsx(Text, { variant: "footnote", children: `${twoDigitMinutes}:${twoDigitSeconds}` });
59
+ return <Text variant="footnote">{`${twoDigitMinutes}:${twoDigitSeconds}`}</Text>;
43
60
  };
44
61
  function getMinutesAndSeconds(ms) {
45
62
  if (!ms || ms === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"audio_attachment.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/audio_attachment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AAEzE,MAAM,UAAU,eAAe,CAAC,EAC9B,UAAU,EACV,4BAA4B,EAC5B,UAAU,GAKX;IACC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B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V,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,MAAM,CAAC,2BAA2B;YACnD,WAAW,EAAE,MAAM,CAAC,sBAAsB;YAC1C,WAAW,EAAE,CAAC;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;SACf;QACD,OAAO,EAAE;YACP,IAAI,EAAE,CAAC;YACP,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,CAAC;SACP;QACD,iBAAiB,EAAE;YACjB,SAAS,EAAE,CAAC;SACb;QACD,aAAa,EAAE;YACb,MAAM,EAAE,CAAC;YACT,eAAe,EAAE,MAAM,CAAC,sBAAsB;YAC9C,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,QAAQ;SACnB;QACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,MAAM,CAAC,WAAW;SACpC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { View, StyleSheet } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { Audio } from '../../../utils/native_adapters'\nimport { IconButton, Text } from '../../display'\nimport { AttachmentCard, AttachmentCardTitle } from './attachment_card'\nimport { AttachmentDeletingOverlay } from './attachment_deleting_overlay'\n\nexport function AudioAttachment({\n attachment,\n onMessageAttachmentLongPress,\n isDeleting,\n}: {\n attachment: DenormalizedMessageAttachmentResource\n onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void\n isDeleting: boolean\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n const { attributes } = attachment\n const { url, filename } = attributes\n const sound = Audio.useAudio(url)\n const { AudioPlayer } = sound\n\n function toggleAudio() {\n if (!sound.isPlaying) {\n sound.play()\n } else {\n sound.pause()\n }\n }\n\n const progress = sound.duration > 0 ? sound.position / sound.duration : 0\n\n return (\n <PlatformPressable\n onLongPress={() => !isDeleting && onMessageAttachmentLongPress(attachment)}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n accessibilityHint=\"Long press for more options\"\n disabled={isDeleting}\n >\n <AttachmentCard>\n <View style={styles.container}>\n {AudioPlayer}\n <IconButton\n name={sound.isPlaying ? 'services.pause' : 'services.play'}\n size=\"md\"\n accessibilityLabel={sound.isPlaying ? 'Pause' : 'Play'}\n onPress={toggleAudio}\n disabled={!sound || isDeleting}\n style={styles.button}\n iconStyle={styles.buttonIcon}\n />\n <View style={styles.details}>\n <AttachmentCardTitle>{filename}</AttachmentCardTitle>\n <View style={styles.progressContainer}>\n <View style={styles.progressTrack}>\n <View style={[styles.progressBar, { width: `${progress * 100}%` }]} />\n </View>\n </View>\n {sound.isPlaying ? (\n <ProgressionText progress={sound.position || 0} />\n ) : (\n <DurationText duration={sound.duration || 0} />\n )}\n </View>\n </View>\n {isDeleting && <AttachmentDeletingOverlay />}\n </AttachmentCard>\n </PlatformPressable>\n )\n}\n\nconst DurationText = ({ duration }: { duration: number }) => {\n if (duration === 0) return <Text variant=\"footnote\">Loading...</Text>\n\n const { minutes, seconds } = getMinutesAndSeconds(duration)\n const secondsLabel = `${seconds}s`\n const minutesLabel = `${minutes}m`\n const label = minutes > 0 ? `${minutesLabel} ${secondsLabel}` : secondsLabel\n\n return <Text variant=\"footnote\">{label}</Text>\n}\n\nconst ProgressionText = ({ progress }: { progress: number }) => {\n if (progress === 0) return <Text variant=\"footnote\">Loading...</Text>\n\n const { minutes, seconds } = getMinutesAndSeconds(progress)\n const twoDigitSeconds = seconds.toString().padStart(2, '0')\n const twoDigitMinutes = minutes.toString().padStart(2, '0')\n\n return <Text variant=\"footnote\">{`${twoDigitMinutes}:${twoDigitSeconds}`}</Text>\n}\n\nfunction getMinutesAndSeconds(ms?: number) {\n if (!ms || ms === 0) return { minutes: 0, seconds: 0 }\n\n const totalSeconds = Math.floor(ms / 1000)\n const minutes = Math.floor(totalSeconds / 60)\n const seconds = totalSeconds % 60\n\n return { minutes, seconds }\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n button: {\n width: 42,\n height: 42,\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: 25,\n backgroundColor: colors.fillColorNeutral100Inverted,\n borderColor: colors.borderColorDefaultBase,\n borderWidth: 1,\n },\n buttonIcon: {\n color: colors.iconColorDefaultPrimary,\n },\n buttonText: {\n fontSize: 32,\n lineHeight: 32,\n },\n details: {\n flex: 1,\n marginLeft: 10,\n gap: 4,\n },\n progressContainer: {\n marginTop: 2,\n },\n progressTrack: {\n height: 4,\n backgroundColor: colors.borderColorDefaultBase,\n borderRadius: 2,\n overflow: 'hidden',\n },\n progressBar: {\n height: '100%',\n borderRadius: 2,\n backgroundColor: colors.interaction,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"audio_attachment.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/audio_attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AAEzE,MAAM,UAA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E,QAAQ;SACnB;QACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,MAAM,CAAC,WAAW;SACpC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { View, StyleSheet } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { Audio } from '../../../utils/native_adapters'\nimport { IconButton, Text } from '../../display'\nimport { AttachmentCard, AttachmentCardTitle } from './attachment_card'\nimport { AttachmentDeletingOverlay } from './attachment_deleting_overlay'\n\nexport function AudioAttachment({\n attachment,\n onMessageAttachmentLongPress,\n isDeleting,\n}: {\n attachment: DenormalizedMessageAttachmentResource\n onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void\n isDeleting: boolean\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n const { attributes } = attachment\n const { url, filename } = attributes\n const sound = Audio.useAudio(url)\n const { AudioPlayer } = sound\n\n function toggleAudio() {\n if (!sound.isPlaying) {\n sound.play()\n } else {\n sound.pause()\n }\n }\n\n const progress = sound.duration > 0 ? sound.position / sound.duration : 0\n\n return (\n <PlatformPressable\n onLongPress={() => !isDeleting && onMessageAttachmentLongPress(attachment)}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n accessibilityHint=\"Long press for more options\"\n disabled={isDeleting}\n >\n <AttachmentCard>\n <View style={styles.container}>\n {AudioPlayer}\n <IconButton\n name={sound.isPlaying ? 'services.pause' : 'services.play'}\n size=\"md\"\n accessibilityLabel={sound.isPlaying ? 'Pause' : 'Play'}\n onPress={toggleAudio}\n disabled={!sound || isDeleting}\n style={styles.button}\n iconStyle={styles.buttonIcon}\n />\n <View style={styles.details}>\n <AttachmentCardTitle>{filename}</AttachmentCardTitle>\n <View style={styles.progressContainer}>\n <View style={styles.progressTrack}>\n <View style={[styles.progressBar, { width: `${progress * 100}%` }]} />\n </View>\n </View>\n {sound.isPlaying ? (\n <ProgressionText progress={sound.position || 0} />\n ) : (\n <DurationText duration={sound.duration || 0} />\n )}\n </View>\n </View>\n {isDeleting && <AttachmentDeletingOverlay />}\n </AttachmentCard>\n </PlatformPressable>\n )\n}\n\nconst DurationText = ({ duration }: { duration: number }) => {\n if (duration === 0) return <Text variant=\"footnote\">Loading...</Text>\n\n const { minutes, seconds } = getMinutesAndSeconds(duration)\n const secondsLabel = `${seconds}s`\n const minutesLabel = `${minutes}m`\n const label = minutes > 0 ? `${minutesLabel} ${secondsLabel}` : secondsLabel\n\n return <Text variant=\"footnote\">{label}</Text>\n}\n\nconst ProgressionText = ({ progress }: { progress: number }) => {\n if (progress === 0) return <Text variant=\"footnote\">Loading...</Text>\n\n const { minutes, seconds } = getMinutesAndSeconds(progress)\n const twoDigitSeconds = seconds.toString().padStart(2, '0')\n const twoDigitMinutes = minutes.toString().padStart(2, '0')\n\n return <Text variant=\"footnote\">{`${twoDigitMinutes}:${twoDigitSeconds}`}</Text>\n}\n\nfunction getMinutesAndSeconds(ms?: number) {\n if (!ms || ms === 0) return { minutes: 0, seconds: 0 }\n\n const totalSeconds = Math.floor(ms / 1000)\n const minutes = Math.floor(totalSeconds / 60)\n const seconds = totalSeconds % 60\n\n return { minutes, seconds }\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n button: {\n width: 42,\n height: 42,\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: 25,\n backgroundColor: colors.fillColorNeutral100Inverted,\n borderColor: colors.borderColorDefaultBase,\n borderWidth: 1,\n },\n buttonIcon: {\n color: colors.iconColorDefaultPrimary,\n },\n buttonText: {\n fontSize: 32,\n lineHeight: 32,\n },\n details: {\n flex: 1,\n marginLeft: 10,\n gap: 4,\n },\n progressContainer: {\n marginTop: 2,\n },\n progressTrack: {\n height: 4,\n backgroundColor: colors.borderColorDefaultBase,\n borderRadius: 2,\n overflow: 'hidden',\n },\n progressBar: {\n height: '100%',\n borderRadius: 2,\n backgroundColor: colors.interaction,\n },\n })\n}\n"]}
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { DenormalizedExpandedLinkAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
2
3
  export declare function ExpandedLink({ attachment, onMessageLongPress, }: {
3
4
  attachment: DenormalizedExpandedLinkAttachmentResource;
4
5
  onMessageLongPress: () => void;
5
- }): import("react/jsx-runtime").JSX.Element;
6
+ }): React.JSX.Element;
6
7
  //# sourceMappingURL=expanded_link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expanded_link.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/expanded_link.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,0CAA0C,EAAE,MAAM,2DAA2D,CAAA;AAItH,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,kBAAkB,GACnB,EAAE;IACD,UAAU,EAAE,0CAA0C,CAAA;IACtD,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,2CA8BA"}
1
+ {"version":3,"file":"expanded_link.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/expanded_link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,0CAA0C,EAAE,MAAM,2DAA2D,CAAA;AAItH,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,kBAAkB,GACnB,EAAE;IACD,UAAU,EAAE,0CAA0C,CAAA;IACtD,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,qBA8BA"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { PlatformPressable } from '@react-navigation/elements';
2
+ import React from 'react';
3
3
  import { Image, StyleSheet, Text, View } from 'react-native';
4
4
  import { useTheme } from '../../../hooks';
5
5
  import { Linking } from '../../../utils';
@@ -14,7 +14,13 @@ export function ExpandedLink({ attachment, onMessageLongPress, }) {
14
14
  if (url)
15
15
  Linking.openURL(url);
16
16
  }
17
- return (_jsxs(PlatformPressable, { style: styles.container, android_ripple: { color: colors.androidRippleNeutral, foreground: true }, onPress: openUrl, onLongPress: onMessageLongPress, children: [imageUrl && (_jsx(Image, { source: { uri: imageUrl }, style: [styles.image, { aspectRatio }], alt: title })), (title || description) && (_jsxs(View, { style: styles.textWrapper, children: [title && _jsx(Text, { style: styles.title, children: title }), description && _jsx(Text, { style: styles.description, children: description })] }))] }));
17
+ return (<PlatformPressable style={styles.container} android_ripple={{ color: colors.androidRippleNeutral, foreground: true }} onPress={openUrl} onLongPress={onMessageLongPress}>
18
+ {imageUrl && (<Image source={{ uri: imageUrl }} style={[styles.image, { aspectRatio }]} alt={title}/>)}
19
+ {(title || description) && (<View style={styles.textWrapper}>
20
+ {title && <Text style={styles.title}>{title}</Text>}
21
+ {description && <Text style={styles.description}>{description}</Text>}
22
+ </View>)}
23
+ </PlatformPressable>);
18
24
  }
19
25
  const useStyles = () => {
20
26
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"expanded_link.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/expanded_link.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAExD,MAAM,UAAU,YAAY,CAAC,EAC3B,UAAU,EACV,kBAAkB,GAInB;IACC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,MAAM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CAAC;QACvB,SAAS,EAAE,EAAE;QACb,KAAK,EAAE;YACL,YAAY,EAAE,CAAC;YACf,KAAK,EAAE,MAAM;SACd;QACD,WAAW,EAAE;YACX,GAAG,EAAE,CAAC;YACN,OAAO,EAAE,CAAC;SACX;QACD,KAAK,EAAE;YACL,QAAQ,EAAE,MAAM,CAAC,UAAU;YAC3B,UAAU,EAAE,MAAM,CAAC,gBAAgB;YACnC,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,MAAM,CAAC,UAAU;YAC3B,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { Image, StyleSheet, Text, View } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { DenormalizedExpandedLinkAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { Linking } from '../../../utils'\nimport { tokens } from '../../../vendor/tapestry/tokens'\n\nexport function ExpandedLink({\n attachment,\n onMessageLongPress,\n}: {\n attachment: DenormalizedExpandedLinkAttachmentResource\n onMessageLongPress: () => void\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n const { attributes } = attachment\n const { url, title, description, imageUrl, imageHeight, imageWidth } = attributes\n\n const aspectRatio = imageWidth && imageHeight ? imageWidth / imageHeight : 1\n\n async function openUrl() {\n if (url) Linking.openURL(url)\n }\n\n return (\n <PlatformPressable\n style={styles.container}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n onPress={openUrl}\n onLongPress={onMessageLongPress}\n >\n {imageUrl && (\n <Image source={{ uri: imageUrl }} style={[styles.image, { aspectRatio }]} alt={title} />\n )}\n {(title || description) && (\n <View style={styles.textWrapper}>\n {title && <Text style={styles.title}>{title}</Text>}\n {description && <Text style={styles.description}>{description}</Text>}\n </View>\n )}\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {},\n image: {\n borderRadius: 8,\n width: '100%',\n },\n textWrapper: {\n gap: 4,\n padding: 8,\n },\n title: {\n fontSize: tokens.fontSizeSm,\n fontWeight: tokens.fontWeightMedium,\n color: colors.textColorDefaultPrimary,\n },\n description: {\n fontSize: tokens.fontSizeXs,\n color: colors.textColorDefaultPrimary,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"expanded_link.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/expanded_link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAExD,MAAM,UAAU,YAAY,CAAC,EAC3B,UAAU,EACV,kBAAkB,GAInB;IACC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAA;IACjC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,UAAU,CAAA;IAEjF,MAAM,WAAW,GAAG,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;IAE5E,KAAK,UAAU,OAAO;QACpB,IAAI,GAAG;YAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IAC/B,CAAC;IAED,OAAO,CACL,CAAC,iBAAiB,C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K,EAAE;YACL,QAAQ,EAAE,MAAM,CAAC,UAAU;YAC3B,UAAU,EAAE,MAAM,CAAC,gBAAgB;YACnC,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,MAAM,CAAC,UAAU;YAC3B,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { Image, StyleSheet, Text, View } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { DenormalizedExpandedLinkAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { Linking } from '../../../utils'\nimport { tokens } from '../../../vendor/tapestry/tokens'\n\nexport function ExpandedLink({\n attachment,\n onMessageLongPress,\n}: {\n attachment: DenormalizedExpandedLinkAttachmentResource\n onMessageLongPress: () => void\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n const { attributes } = attachment\n const { url, title, description, imageUrl, imageHeight, imageWidth } = attributes\n\n const aspectRatio = imageWidth && imageHeight ? imageWidth / imageHeight : 1\n\n async function openUrl() {\n if (url) Linking.openURL(url)\n }\n\n return (\n <PlatformPressable\n style={styles.container}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n onPress={openUrl}\n onLongPress={onMessageLongPress}\n >\n {imageUrl && (\n <Image source={{ uri: imageUrl }} style={[styles.image, { aspectRatio }]} alt={title} />\n )}\n {(title || description) && (\n <View style={styles.textWrapper}>\n {title && <Text style={styles.title}>{title}</Text>}\n {description && <Text style={styles.description}>{description}</Text>}\n </View>\n )}\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {},\n image: {\n borderRadius: 8,\n width: '100%',\n },\n textWrapper: {\n gap: 4,\n padding: 8,\n },\n title: {\n fontSize: tokens.fontSizeSm,\n fontWeight: tokens.fontWeightMedium,\n color: colors.textColorDefaultPrimary,\n },\n description: {\n fontSize: tokens.fontSizeXs,\n color: colors.textColorDefaultPrimary,\n },\n })\n}\n"]}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
2
3
  export declare function GenericFileAttachment({ attachment, onMessageAttachmentLongPress, isDeleting, }: {
3
4
  attachment: DenormalizedMessageAttachmentResource;
4
5
  onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void;
5
6
  isDeleting: boolean;
6
- }): import("react/jsx-runtime").JSX.Element;
7
+ }): React.JSX.Element;
7
8
  //# sourceMappingURL=generic_file_attachment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generic_file_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/generic_file_attachment.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,qCAAqC,EAAE,MAAM,2DAA2D,CAAA;AAOjH,wBAAgB,qBAAqB,CAAC,EACpC,UAAU,EACV,4BAA4B,EAC5B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,qCAAqC,CAAA;IACjD,4BAA4B,EAAE,CAAC,UAAU,EAAE,qCAAqC,KAAK,IAAI,CAAA;IACzF,UAAU,EAAE,OAAO,CAAA;CACpB,2CAmCA"}
1
+ {"version":3,"file":"generic_file_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/generic_file_attachment.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,qCAAqC,EAAE,MAAM,2DAA2D,CAAA;AAOjH,wBAAgB,qBAAqB,CAAC,EACpC,UAAU,EACV,4BAA4B,EAC5B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,qCAAqC,CAAA;IACjD,4BAA4B,EAAE,CAAC,UAAU,EAAE,qCAAqC,KAAK,IAAI,CAAA;IACzF,UAAU,EAAE,OAAO,CAAA;CACpB,qBAmCA"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { PlatformPressable } from '@react-navigation/elements';
2
+ import React from 'react';
3
3
  import { StyleSheet, View } from 'react-native';
4
4
  import { useTheme } from '../../../hooks';
5
5
  import { Linking, getAttachmentIconName } from '../../../utils';
@@ -19,7 +19,17 @@ export function GenericFileAttachment({ attachment, onMessageAttachmentLongPress
19
19
  Linking.openURL(url);
20
20
  }
21
21
  }
22
- return (_jsx(PlatformPressable, { onPress: handleDownload, onLongPress: () => !isDeleting && onMessageAttachmentLongPress(attachment), android_ripple: { color: colors.androidRippleNeutral, foreground: true }, accessibilityRole: "link", accessibilityHint: `Press to open ${fileTypeLabel} in a browser. Long press for more options`, disabled: isDeleting, children: _jsxs(AttachmentCard, { children: [_jsx(View, { style: styles.container, children: _jsxs(View, { style: styles.stack, children: [_jsx(Icon, { name: iconName, style: styles.icon }), _jsx(AttachmentCardTitle, { children: filename })] }) }), isDeleting && _jsx(AttachmentDeletingOverlay, {})] }) }));
22
+ return (<PlatformPressable onPress={handleDownload} onLongPress={() => !isDeleting && onMessageAttachmentLongPress(attachment)} android_ripple={{ color: colors.androidRippleNeutral, foreground: true }} accessibilityRole="link" accessibilityHint={`Press to open ${fileTypeLabel} in a browser. Long press for more options`} disabled={isDeleting}>
23
+ <AttachmentCard>
24
+ <View style={styles.container}>
25
+ <View style={styles.stack}>
26
+ <Icon name={iconName} style={styles.icon}/>
27
+ <AttachmentCardTitle>{filename}</AttachmentCardTitle>
28
+ </View>
29
+ </View>
30
+ {isDeleting && <AttachmentDeletingOverlay />}
31
+ </AttachmentCard>
32
+ </PlatformPressable>);
23
33
  }
24
34
  const useStyles = () => {
25
35
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"generic_file_attachment.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/generic_file_attachment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE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aAAa,4CAA4C,EAC7F,QAAQ,EAAE,UAAU,YAEpB,MAAC,cAAc,eACb,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YAC3B,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,aACvB,KAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,GAAI,EAC5C,KAAC,mBAAmB,cAAE,QAAQ,GAAuB,IAChD,GACF,EACN,UAAU,IAAI,KAAC,yBAAyB,KAAG,IAC7B,GACC,CACrB,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,GAAG,EAAE,CAAC;YACN,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;SAChC;QACD,KAAK,EAAE;YACL,GAAG,EAAE,CAAC;YACN,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;SACrB;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { Linking, getAttachmentIconName } from '../../../utils'\nimport { tokens } from '../../../vendor/tapestry/tokens'\nimport { Icon } from '../../display'\nimport { AttachmentCard, AttachmentCardTitle } from './attachment_card'\nimport { AttachmentDeletingOverlay } from './attachment_deleting_overlay'\n\nexport function GenericFileAttachment({\n attachment,\n onMessageAttachmentLongPress,\n isDeleting,\n}: {\n attachment: DenormalizedMessageAttachmentResource\n onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void\n isDeleting: boolean\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n const { url, filename, contentType } = attachment.attributes\n const iconName = getAttachmentIconName(contentType)\n const fileTypeLabel = contentType === 'application/pdf' ? 'PDF' : 'file'\n\n async function handleDownload() {\n if (url) {\n // Open link in the default web browser\n Linking.openURL(url)\n }\n }\n\n return (\n <PlatformPressable\n onPress={handleDownload}\n onLongPress={() => !isDeleting && onMessageAttachmentLongPress(attachment)}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n accessibilityRole=\"link\"\n accessibilityHint={`Press to open ${fileTypeLabel} in a browser. Long press for more options`}\n disabled={isDeleting}\n >\n <AttachmentCard>\n <View style={styles.container}>\n <View style={styles.stack}>\n <Icon name={iconName} style={styles.icon} />\n <AttachmentCardTitle>{filename}</AttachmentCardTitle>\n </View>\n </View>\n {isDeleting && <AttachmentDeletingOverlay />}\n </AttachmentCard>\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n gap: 4,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n stack: {\n gap: 4,\n flexDirection: 'row',\n alignItems: 'center',\n },\n icon: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeMd,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"generic_file_attachment.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/generic_file_attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,M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K,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACxB;YAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EACzC;YAAA,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CACtD;UAAA,EAAE,IAAI,CACR;QAAA,EAAE,IAAI,CACN;QAAA,CAAC,UAAU,IAAI,CAAC,yBAAyB,CAAC,AAAD,EAAG,CAC9C;MAAA,EAAE,cAAc,CAClB;IAAA,EAAE,iBAAiB,CAAC,CACrB,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,GAAG,EAAE,CAAC;YACN,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;SAChC;QACD,KAAK,EAAE;YACL,GAAG,EAAE,CAAC;YACN,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;SACrB;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { Linking, getAttachmentIconName } from '../../../utils'\nimport { tokens } from '../../../vendor/tapestry/tokens'\nimport { Icon } from '../../display'\nimport { AttachmentCard, AttachmentCardTitle } from './attachment_card'\nimport { AttachmentDeletingOverlay } from './attachment_deleting_overlay'\n\nexport function GenericFileAttachment({\n attachment,\n onMessageAttachmentLongPress,\n isDeleting,\n}: {\n attachment: DenormalizedMessageAttachmentResource\n onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void\n isDeleting: boolean\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n const { url, filename, contentType } = attachment.attributes\n const iconName = getAttachmentIconName(contentType)\n const fileTypeLabel = contentType === 'application/pdf' ? 'PDF' : 'file'\n\n async function handleDownload() {\n if (url) {\n // Open link in the default web browser\n Linking.openURL(url)\n }\n }\n\n return (\n <PlatformPressable\n onPress={handleDownload}\n onLongPress={() => !isDeleting && onMessageAttachmentLongPress(attachment)}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n accessibilityRole=\"link\"\n accessibilityHint={`Press to open ${fileTypeLabel} in a browser. Long press for more options`}\n disabled={isDeleting}\n >\n <AttachmentCard>\n <View style={styles.container}>\n <View style={styles.stack}>\n <Icon name={iconName} style={styles.icon} />\n <AttachmentCardTitle>{filename}</AttachmentCardTitle>\n </View>\n </View>\n {isDeleting && <AttachmentDeletingOverlay />}\n </AttachmentCard>\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n gap: 4,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n stack: {\n gap: 4,\n flexDirection: 'row',\n alignItems: 'center',\n },\n icon: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeMd,\n },\n })\n}\n"]}
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { DenormalizedGiphyAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
2
3
  export declare function GiphyAttachment({ attachment, onMessageLongPress, }: {
3
4
  attachment: DenormalizedGiphyAttachmentResource;
4
5
  onMessageLongPress: () => void;
5
- }): import("react/jsx-runtime").JSX.Element;
6
+ }): React.JSX.Element;
6
7
  //# sourceMappingURL=giphy_attachment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"giphy_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/giphy_attachment.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAA;AAK/G,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,kBAAkB,GACnB,EAAE;IACD,UAAU,EAAE,mCAAmC,CAAA;IAC/C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,2CAgCA"}
1
+ {"version":3,"file":"giphy_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/giphy_attachment.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAA;AAK/G,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,kBAAkB,GACnB,EAAE;IACD,UAAU,EAAE,mCAAmC,CAAA;IAC/C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,qBAgCA"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { PlatformPressable } from '@react-navigation/elements';
2
+ import React from 'react';
3
3
  import { Text, StyleSheet, Linking } from 'react-native';
4
4
  import { useTheme } from '../../../hooks';
5
5
  import { assertKeysAreNumbers } from '../../../utils';
@@ -17,7 +17,12 @@ export function GiphyAttachment({ attachment, onMessageLongPress, }) {
17
17
  Linking.openURL(titleLink);
18
18
  }
19
19
  }
20
- return (_jsxs(PlatformPressable, { onPress: handlePress, onLongPress: onMessageLongPress, style: styles.container, android_ripple: { color: colors.androidRippleNeutral, foreground: true }, children: [_jsx(Image, { source: { uri: url }, wrapperStyle: styles.imageWrapper, style: styles.image, alt: title }), _jsxs(Text, { style: styles.link, children: [_jsx(Text, { style: styles.tag, children: "/giphy" }), " ", title] })] }));
20
+ return (<PlatformPressable onPress={handlePress} onLongPress={onMessageLongPress} style={styles.container} android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}>
21
+ <Image source={{ uri: url }} wrapperStyle={styles.imageWrapper} style={styles.image} alt={title}/>
22
+ <Text style={styles.link}>
23
+ <Text style={styles.tag}>/giphy</Text> {title}
24
+ </Text>
25
+ </PlatformPressable>);
21
26
  }
22
27
  const useStyles = ({ imageWidth, imageHeight }) => {
23
28
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"giphy_attachment.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/giphy_attachment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC,MAAM,UAAU,eAAe,CAAC,EAC9B,UAAU,EACV,kBAAkB,GAInB;IACC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,UAAU,CAAA;IAC9C,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,UAAU,CAAA;IAChC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAChE,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAA;IAEpE,SAAS,WAAW;QAClB,IAAI,SAAS,EAAE,CAAC;YACd,6CAA6C;YAC7C,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;IAED,OAAO,CACL,MAAC,iBAAiB,IAChB,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,kBAAkB,EAC/B,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,oBAAoB,EAAE,UAAU,EAAE,IAAI,EAAE,aAExE,KAAC,KAAK,IACJ,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EACpB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,GAAG,EAAE,KAAK,GACV,EACF,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,aACtB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,uBAAe,OAAE,KAAK,IACxC,IACW,CACrB,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,EAAE,UAAU,EAAE,WAAW,EAA+C,EAAE,EAAE;IAC7F,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,GAAG,EAAE,CAAC;SACP;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,UAAU,GAAG,WAAW;SACtC;QACD,KAAK,EAAE;YACL,YAAY,EAAE,CAAC;SAChB;QACD,IAAI,EAAE;YACJ,QAAQ,EAAE,MAAM,CAAC,UAAU;YAC3B,KAAK,EAAE,MAAM,CAAC,WAAW;YACzB,iBAAiB,EAAE,CAAC;YACpB,eAAe,EAAE,CAAC;SACnB;QACD,GAAG,EAAE;YACH,UAAU,EAAE,MAAM;SACnB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { Text, StyleSheet, Linking } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { DenormalizedGiphyAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { assertKeysAreNumbers } from '../../../utils'\nimport { tokens } from '../../../vendor/tapestry/tokens'\nimport { Image } from '../../display'\n\nexport function GiphyAttachment({\n attachment,\n onMessageLongPress,\n}: {\n attachment: DenormalizedGiphyAttachmentResource\n onMessageLongPress: () => void\n}) {\n const { colors } = useTheme()\n const { title, titleLink, giphy } = attachment\n const { url } = giphy.fixedWidth\n const { width, height } = assertKeysAreNumbers(giphy.fixedWidth)\n const styles = useStyles({ imageWidth: width, imageHeight: height })\n\n function handlePress() {\n if (titleLink) {\n // Open Giphy link in the default web browser\n Linking.openURL(titleLink)\n }\n }\n\n return (\n <PlatformPressable\n onPress={handlePress}\n onLongPress={onMessageLongPress}\n style={styles.container}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n >\n <Image\n source={{ uri: url }}\n wrapperStyle={styles.imageWrapper}\n style={styles.image}\n alt={title}\n />\n <Text style={styles.link}>\n <Text style={styles.tag}>/giphy</Text> {title}\n </Text>\n </PlatformPressable>\n )\n}\n\nconst useStyles = ({ imageWidth, imageHeight }: { imageWidth: number; imageHeight: number }) => {\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n gap: 4,\n },\n imageWrapper: {\n width: '100%',\n aspectRatio: imageWidth / imageHeight,\n },\n image: {\n borderRadius: 8,\n },\n link: {\n fontSize: tokens.fontSizeSm,\n color: colors.interaction,\n paddingHorizontal: 8,\n paddingVertical: 6,\n },\n tag: {\n fontWeight: 'bold',\n },\n })\n}\n"]}
1
+ {"version":3,"file":"giphy_attachment.js","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/giphy_attachment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,UA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AC,MAAM,CAAC,KAAK,CAAC,CACpB,GAAG,CAAC,CAAC,KAAK,CAAC,EAEb;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CACvB;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAE,CAAA,CAAC,KAAK,CAC/C;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,iBAAiB,CAAC,CACrB,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,EAAE,UAAU,EAAE,WAAW,EAA+C,EAAE,EAAE;IAC7F,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,GAAG,EAAE,CAAC;SACP;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,UAAU,GAAG,WAAW;SACtC;QACD,KAAK,EAAE;YACL,YAAY,EAAE,CAAC;SAChB;QACD,IAAI,EAAE;YACJ,QAAQ,EAAE,MAAM,CAAC,UAAU;YAC3B,KAAK,EAAE,MAAM,CAAC,WAAW;YACzB,iBAAiB,EAAE,CAAC;YACpB,eAAe,EAAE,CAAC;SACnB;QACD,GAAG,EAAE;YACH,UAAU,EAAE,MAAM;SACnB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { Text, StyleSheet, Linking } from 'react-native'\nimport { useTheme } from '../../../hooks'\nimport { DenormalizedGiphyAttachmentResource } from '../../../types/resources/denormalized_attachment_resource'\nimport { assertKeysAreNumbers } from '../../../utils'\nimport { tokens } from '../../../vendor/tapestry/tokens'\nimport { Image } from '../../display'\n\nexport function GiphyAttachment({\n attachment,\n onMessageLongPress,\n}: {\n attachment: DenormalizedGiphyAttachmentResource\n onMessageLongPress: () => void\n}) {\n const { colors } = useTheme()\n const { title, titleLink, giphy } = attachment\n const { url } = giphy.fixedWidth\n const { width, height } = assertKeysAreNumbers(giphy.fixedWidth)\n const styles = useStyles({ imageWidth: width, imageHeight: height })\n\n function handlePress() {\n if (titleLink) {\n // Open Giphy link in the default web browser\n Linking.openURL(titleLink)\n }\n }\n\n return (\n <PlatformPressable\n onPress={handlePress}\n onLongPress={onMessageLongPress}\n style={styles.container}\n android_ripple={{ color: colors.androidRippleNeutral, foreground: true }}\n >\n <Image\n source={{ uri: url }}\n wrapperStyle={styles.imageWrapper}\n style={styles.image}\n alt={title}\n />\n <Text style={styles.link}>\n <Text style={styles.tag}>/giphy</Text> {title}\n </Text>\n </PlatformPressable>\n )\n}\n\nconst useStyles = ({ imageWidth, imageHeight }: { imageWidth: number; imageHeight: number }) => {\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n gap: 4,\n },\n imageWrapper: {\n width: '100%',\n aspectRatio: imageWidth / imageHeight,\n },\n image: {\n borderRadius: 8,\n },\n link: {\n fontSize: tokens.fontSizeSm,\n color: colors.interaction,\n paddingHorizontal: 8,\n paddingVertical: 6,\n },\n tag: {\n fontWeight: 'bold',\n },\n })\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
2
3
  export type MetaProps = {
3
4
  authorName: string;
@@ -10,5 +11,5 @@ export declare function ImageAttachment({ attachment, imageAttachments, currentI
10
11
  metaProps: MetaProps;
11
12
  onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void;
12
13
  isDeleting: boolean;
13
- }): import("react/jsx-runtime").JSX.Element;
14
+ }): React.JSX.Element;
14
15
  //# sourceMappingURL=image_attachment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/image_attachment.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAAE,qCAAqC,EAAE,MAAM,2DAA2D,CAAA;AAyBjH,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,4BAA4B,EAC5B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,qCAAqC,CAAA;IACjD,gBAAgB,EAAE,qCAAqC,EAAE,CAAA;IACzD,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,EAAE,SAAS,CAAA;IACpB,4BAA4B,EAAE,CAAC,UAAU,EAAE,qCAAqC,KAAK,IAAI,CAAA;IACzF,UAAU,EAAE,OAAO,CAAA;CACpB,2CA6CA"}
1
+ {"version":3,"file":"image_attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation/attachments/image_attachment.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2E,MAAM,OAAO,CAAA;AA6B/F,OAAO,EAAE,qCAAqC,EAAE,MAAM,2DAA2D,CAAA;AAyBjH,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,4BAA4B,EAC5B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,qCAAqC,CAAA;IACjD,gBAAgB,EAAE,qCAAqC,EAAE,CAAA;IACzD,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,EAAE,SAAS,CAAA;IACpB,4BAA4B,EAAE,CAAC,UAAU,EAAE,qCAAqC,KAAK,IAAI,CAAA;IACzF,UAAU,EAAE,OAAO,CAAA;CACpB,qBA6CA"}