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

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 (637) 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 +3 -3
  82. package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
  83. package/build/components/conversation/messages_disabled_banners.js +8 -5
  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/use_animated_message_background_color.d.ts +2 -2
  304. package/build/hooks/use_conversation.d.ts +1 -1
  305. package/build/hooks/use_conversation.d.ts.map +1 -1
  306. package/build/hooks/use_conversation.js +2 -0
  307. package/build/hooks/use_conversation.js.map +1 -1
  308. package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
  309. package/build/hooks/use_conversation_jolt_events.js +4 -19
  310. package/build/hooks/use_conversation_jolt_events.js.map +1 -1
  311. package/build/hooks/use_conversation_membership.d.ts +1 -1
  312. package/build/hooks/use_conversation_membership.d.ts.map +1 -1
  313. package/build/hooks/use_conversation_messages.d.ts +0 -1
  314. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  315. package/build/hooks/use_conversation_messages.js +2 -2
  316. package/build/hooks/use_conversation_messages.js.map +1 -1
  317. package/build/hooks/use_conversations_actions.d.ts +36 -36
  318. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  319. package/build/hooks/use_conversations_actions.js +3 -1
  320. package/build/hooks/use_conversations_actions.js.map +1 -1
  321. package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
  322. package/build/hooks/use_mark_latest_message_read.js +3 -4
  323. package/build/hooks/use_mark_latest_message_read.js.map +1 -1
  324. package/build/hooks/use_person_settings.d.ts +1 -1
  325. package/build/index.d.ts +1 -2
  326. package/build/index.d.ts.map +1 -1
  327. package/build/index.js.map +1 -1
  328. package/build/navigation/chat_access_gate.d.ts +2 -2
  329. package/build/navigation/chat_access_gate.d.ts.map +1 -1
  330. package/build/navigation/chat_access_gate.js +5 -6
  331. package/build/navigation/chat_access_gate.js.map +1 -1
  332. package/build/navigation/index.d.ts +36 -35
  333. package/build/navigation/index.d.ts.map +1 -1
  334. package/build/navigation/index.js +21 -19
  335. package/build/navigation/index.js.map +1 -1
  336. package/build/navigation/screenLayout.d.ts +2 -2
  337. package/build/navigation/screenLayout.d.ts.map +1 -1
  338. package/build/navigation/screenLayout.js +9 -3
  339. package/build/navigation/screenLayout.js.map +1 -1
  340. package/build/polyfills/events/EventTarget.d.ts +1 -1
  341. package/build/polyfills/events/EventTarget.d.ts.map +1 -1
  342. package/build/polyfills/events/EventTarget.js.map +1 -1
  343. package/build/screens/age_check/age_check_required_screen.d.ts +2 -1
  344. package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
  345. package/build/screens/age_check/age_check_required_screen.js +46 -3
  346. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  347. package/build/screens/age_check/age_check_underage_screen.d.ts +2 -1
  348. package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
  349. package/build/screens/age_check/age_check_underage_screen.js +25 -2
  350. package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
  351. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +2 -1
  352. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
  353. package/build/screens/age_check/components/age_check_select_birthdate_modal.js +25 -6
  354. package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
  355. package/build/screens/attachment_actions/attachment_actions_screen.d.ts +2 -1
  356. package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
  357. package/build/screens/attachment_actions/attachment_actions_screen.js +5 -3
  358. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  359. package/build/screens/avatar_picker/avatar_picker_screen.d.ts +2 -1
  360. package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
  361. package/build/screens/avatar_picker/avatar_picker_screen.js +36 -9
  362. package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
  363. package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
  364. package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
  365. package/build/screens/avatar_picker/avatar_preview.js +9 -5
  366. package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
  367. package/build/screens/avatar_picker/color_picker.d.ts +2 -1
  368. package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
  369. package/build/screens/avatar_picker/color_picker.js +5 -4
  370. package/build/screens/avatar_picker/color_picker.js.map +1 -1
  371. package/build/screens/avatar_picker/emoji_tab.d.ts +2 -1
  372. package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
  373. package/build/screens/avatar_picker/emoji_tab.js +13 -12
  374. package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
  375. package/build/screens/avatar_picker/icon_grid.d.ts +2 -1
  376. package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
  377. package/build/screens/avatar_picker/icon_grid.js +5 -4
  378. package/build/screens/avatar_picker/icon_grid.js.map +1 -1
  379. package/build/screens/avatar_picker/upload_tab.d.ts +2 -1
  380. package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
  381. package/build/screens/avatar_picker/upload_tab.js +4 -3
  382. package/build/screens/avatar_picker/upload_tab.js.map +1 -1
  383. package/build/screens/bug_report_screen.d.ts +2 -1
  384. package/build/screens/bug_report_screen.d.ts.map +1 -1
  385. package/build/screens/bug_report_screen.js +117 -11
  386. package/build/screens/bug_report_screen.js.map +1 -1
  387. package/build/screens/conversation/message_read_receipts_screen.d.ts +2 -1
  388. package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
  389. package/build/screens/conversation/message_read_receipts_screen.js +20 -4
  390. package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
  391. package/build/screens/conversation_details_screen.d.ts +2 -1
  392. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  393. package/build/screens/conversation_details_screen.js +106 -43
  394. package/build/screens/conversation_details_screen.js.map +1 -1
  395. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
  396. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
  397. package/build/screens/conversation_filter_recipients/components/checkbox_row.js +9 -3
  398. package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
  399. package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
  400. package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
  401. package/build/screens/conversation_filter_recipients/components/header_row.js +12 -2
  402. package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
  403. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +2 -1
  404. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  405. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +44 -20
  406. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  407. package/build/screens/conversation_filters/components/conversation_filters.d.ts +2 -1
  408. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  409. package/build/screens/conversation_filters/components/conversation_filters.js +11 -10
  410. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  411. package/build/screens/conversation_filters/components/rows.d.ts +6 -6
  412. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  413. package/build/screens/conversation_filters/components/rows.js +34 -7
  414. package/build/screens/conversation_filters/components/rows.js.map +1 -1
  415. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
  416. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
  417. package/build/screens/conversation_filters/context/conversation_filter_context.js +1 -2
  418. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  419. package/build/screens/conversation_filters/group_filters.d.ts +2 -1
  420. package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
  421. package/build/screens/conversation_filters/group_filters.js +2 -2
  422. package/build/screens/conversation_filters/group_filters.js.map +1 -1
  423. package/build/screens/conversation_filters/team_filters.d.ts +2 -1
  424. package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
  425. package/build/screens/conversation_filters/team_filters.js +2 -2
  426. package/build/screens/conversation_filters/team_filters.js.map +1 -1
  427. package/build/screens/conversation_filters_screen.d.ts +2 -1
  428. package/build/screens/conversation_filters_screen.d.ts.map +1 -1
  429. package/build/screens/conversation_filters_screen.js +16 -4
  430. package/build/screens/conversation_filters_screen.js.map +1 -1
  431. package/build/screens/conversation_new/components/avatar_selection_row.d.ts +3 -2
  432. package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
  433. package/build/screens/conversation_new/components/avatar_selection_row.js +16 -6
  434. package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
  435. package/build/screens/conversation_new/components/filter_by_plan.d.ts +4 -3
  436. package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
  437. package/build/screens/conversation_new/components/filter_by_plan.js +46 -22
  438. package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
  439. package/build/screens/conversation_new/components/form_list.d.ts +3 -2
  440. package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
  441. package/build/screens/conversation_new/components/form_list.js +6 -4
  442. package/build/screens/conversation_new/components/form_list.js.map +1 -1
  443. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +2 -1
  444. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
  445. package/build/screens/conversation_new/components/gender_filter_toggle.js +20 -4
  446. package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
  447. package/build/screens/conversation_new/components/groups_form.d.ts +2 -1
  448. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  449. package/build/screens/conversation_new/components/groups_form.js +30 -4
  450. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  451. package/build/screens/conversation_new/components/services_form.d.ts +2 -1
  452. package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
  453. package/build/screens/conversation_new/components/services_form.js +61 -27
  454. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  455. package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
  456. package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
  457. package/build/screens/conversation_new/components/source_app_error_card.js +3 -2
  458. package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
  459. package/build/screens/conversation_new/conversation_new_screen.d.ts +2 -1
  460. package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
  461. package/build/screens/conversation_new/conversation_new_screen.js +4 -4
  462. package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
  463. package/build/screens/conversation_notification_level_select_screen.d.ts +2 -1
  464. package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
  465. package/build/screens/conversation_notification_level_select_screen.js +6 -4
  466. package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
  467. package/build/screens/conversation_screen.d.ts +3 -2
  468. package/build/screens/conversation_screen.d.ts.map +1 -1
  469. package/build/screens/conversation_screen.js +66 -25
  470. package/build/screens/conversation_screen.js.map +1 -1
  471. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
  472. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
  473. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -2
  474. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
  475. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +2 -1
  476. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
  477. package/build/screens/conversation_select_recipients/components/recipient_link_row.js +15 -2
  478. package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
  479. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +2 -1
  480. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
  481. package/build/screens/conversation_select_recipients/components/restricted_group_row.js +14 -2
  482. package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
  483. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
  484. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
  485. package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -2
  486. package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
  487. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
  488. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
  489. package/build/screens/conversation_select_recipients/components/view_more_link_row.js +5 -2
  490. package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
  491. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +2 -1
  492. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  493. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +11 -4
  494. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  495. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
  496. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
  497. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +83 -11
  498. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
  499. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +2 -1
  500. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  501. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +14 -7
  502. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  503. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +2 -1
  504. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  505. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +18 -15
  506. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  507. package/build/screens/conversation_select_type_screen.d.ts +2 -1
  508. package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
  509. package/build/screens/conversation_select_type_screen.js +10 -3
  510. package/build/screens/conversation_select_type_screen.js.map +1 -1
  511. package/build/screens/conversations/components/chat_group_badge.d.ts +2 -1
  512. package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
  513. package/build/screens/conversations/components/chat_group_badge.js +4 -3
  514. package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
  515. package/build/screens/conversations/components/list_header_action_button.d.ts +2 -1
  516. package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
  517. package/build/screens/conversations/components/list_header_action_button.js +5 -3
  518. package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
  519. package/build/screens/conversations/components/list_header_component.d.ts +2 -1
  520. package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
  521. package/build/screens/conversations/components/list_header_component.js +42 -19
  522. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  523. package/build/screens/conversations/conversations_screen.d.ts +2 -1
  524. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  525. package/build/screens/conversations/conversations_screen.js +6 -2
  526. package/build/screens/conversations/conversations_screen.js.map +1 -1
  527. package/build/screens/design_system_screen.d.ts +2 -1
  528. package/build/screens/design_system_screen.d.ts.map +1 -1
  529. package/build/screens/design_system_screen.js +558 -35
  530. package/build/screens/design_system_screen.js.map +1 -1
  531. package/build/screens/get_help_screen.d.ts +1 -1
  532. package/build/screens/get_help_screen.d.ts.map +1 -1
  533. package/build/screens/get_help_screen.js +25 -4
  534. package/build/screens/get_help_screen.js.map +1 -1
  535. package/build/screens/group_notification_level_select_screen.d.ts +2 -1
  536. package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
  537. package/build/screens/group_notification_level_select_screen.js +4 -2
  538. package/build/screens/group_notification_level_select_screen.js.map +1 -1
  539. package/build/screens/group_notification_settings_screen.d.ts +2 -1
  540. package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
  541. package/build/screens/group_notification_settings_screen.js +25 -3
  542. package/build/screens/group_notification_settings_screen.js.map +1 -1
  543. package/build/screens/message_actions_screen.d.ts +2 -1
  544. package/build/screens/message_actions_screen.d.ts.map +1 -1
  545. package/build/screens/message_actions_screen.js +28 -12
  546. package/build/screens/message_actions_screen.js.map +1 -1
  547. package/build/screens/message_report/components/message_preview.d.ts +2 -1
  548. package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
  549. package/build/screens/message_report/components/message_preview.js +22 -2
  550. package/build/screens/message_report/components/message_preview.js.map +1 -1
  551. package/build/screens/message_report/components/report_reason_list.d.ts +2 -1
  552. package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
  553. package/build/screens/message_report/components/report_reason_list.js +13 -4
  554. package/build/screens/message_report/components/report_reason_list.js.map +1 -1
  555. package/build/screens/message_report_screen.d.ts +2 -1
  556. package/build/screens/message_report_screen.d.ts.map +1 -1
  557. package/build/screens/message_report_screen.js +61 -9
  558. package/build/screens/message_report_screen.js.map +1 -1
  559. package/build/screens/not_found.d.ts +2 -1
  560. package/build/screens/not_found.d.ts.map +1 -1
  561. package/build/screens/not_found.js +5 -2
  562. package/build/screens/not_found.js.map +1 -1
  563. package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
  564. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  565. package/build/screens/notification_settings_screen.d.ts +2 -1
  566. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  567. package/build/screens/notification_settings_screen.js +66 -28
  568. package/build/screens/notification_settings_screen.js.map +1 -1
  569. package/build/screens/preferred_app_selection_screen.d.ts +2 -1
  570. package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
  571. package/build/screens/preferred_app_selection_screen.js +21 -3
  572. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  573. package/build/screens/reactions_screen.d.ts +2 -1
  574. package/build/screens/reactions_screen.d.ts.map +1 -1
  575. package/build/screens/reactions_screen.js +19 -7
  576. package/build/screens/reactions_screen.js.map +1 -1
  577. package/build/screens/send_giphy_screen.d.ts +2 -1
  578. package/build/screens/send_giphy_screen.d.ts.map +1 -1
  579. package/build/screens/send_giphy_screen.js +31 -5
  580. package/build/screens/send_giphy_screen.js.map +1 -1
  581. package/build/screens/settings_screen.d.ts +2 -1
  582. package/build/screens/settings_screen.d.ts.map +1 -1
  583. package/build/screens/settings_screen.js +26 -4
  584. package/build/screens/settings_screen.js.map +1 -1
  585. package/build/screens/system_message_people_screen.d.ts +2 -1
  586. package/build/screens/system_message_people_screen.d.ts.map +1 -1
  587. package/build/screens/system_message_people_screen.js +10 -4
  588. package/build/screens/system_message_people_screen.js.map +1 -1
  589. package/build/screens/team_conversation_screen.d.ts +1 -1
  590. package/build/screens/team_conversation_screen.d.ts.map +1 -1
  591. package/build/screens/team_conversation_screen.js +12 -4
  592. package/build/screens/team_conversation_screen.js.map +1 -1
  593. package/build/types/resources/conversation.d.ts +10 -1
  594. package/build/types/resources/conversation.d.ts.map +1 -1
  595. package/build/types/resources/conversation.js.map +1 -1
  596. package/build/utils/request/conversation.d.ts.map +1 -1
  597. package/build/utils/request/conversation.js +2 -0
  598. package/build/utils/request/conversation.js.map +1 -1
  599. package/build/utils/response_error.d.ts.map +1 -1
  600. package/build/utils/response_error.js +16 -6
  601. package/build/utils/response_error.js.map +1 -1
  602. package/build/utils/sha_256.js.map +1 -1
  603. package/build/utils/system_messages.d.ts +1 -1
  604. package/build/utils/system_messages.d.ts.map +1 -1
  605. package/build/utils/system_messages.js.map +1 -1
  606. package/build/utils/theme.d.ts +2 -2
  607. package/build/utils/theme.d.ts.map +1 -1
  608. package/build/utils/theme.js.map +1 -1
  609. package/package.json +12 -12
  610. package/src/__tests__/hooks/use_attachment_uploader.test.tsx +0 -1
  611. package/src/__tests__/hooks/use_font_scale.test.ts +3 -7
  612. package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
  613. package/src/__tests__/utils/system_messages.ts +1 -1
  614. package/src/__tests__/utils/uri.ts +50 -8
  615. package/src/__utils__/handlers.ts +6 -5
  616. package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +3 -10
  617. package/src/components/conversations/conversation_preview.tsx +58 -23
  618. package/src/components/conversations/unread_count_badge.tsx +13 -4
  619. package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
  620. package/src/components/page/__tests__/error_boundary.test.tsx +2 -6
  621. package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
  622. package/src/hooks/use_conversation.ts +2 -0
  623. package/src/hooks/use_conversation_jolt_events.ts +3 -19
  624. package/src/hooks/use_conversation_messages.ts +5 -6
  625. package/src/hooks/use_conversations_actions.ts +3 -1
  626. package/src/hooks/use_mark_latest_message_read.ts +3 -4
  627. package/src/index.tsx +1 -2
  628. package/src/polyfills/events/EventTarget.ts +1 -1
  629. package/src/screens/conversation_screen.tsx +2 -4
  630. package/src/screens/conversations/components/list_header_component.tsx +6 -6
  631. package/src/types/resources/conversation.ts +11 -1
  632. package/src/utils/__tests__/response_error.test.ts +7 -0
  633. package/src/utils/request/conversation.ts +2 -0
  634. package/src/utils/response_error.ts +18 -7
  635. package/src/utils/sha_256.ts +24 -24
  636. package/src/utils/system_messages.ts +1 -1
  637. package/src/utils/theme.ts +2 -3
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_preview.js","sourceRoot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AAM,EAAE,EAAE;YACV,eAAe,EAAE,MAAM,CAAC,mBAAmB;YAC3C,YAAY,EAAE,CAAC;SAChB;QACD,aAAa,EAAE;YACb,GAAG,EAAE,CAAC;YACN,UAAU,EAAE,qBAAqB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;YACzD,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY;YACtE,aAAa,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ;SACxD;QACD,WAAW,EAAE;YACX,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,eAAe,EAAE,MAAM,CAAC,mBAAmB;YAC3C,YAAY,EAAE,CAAC;SAChB;QACD,MAAM,EAAE;YACN,SAAS,EAAE,CAAC;YACZ,UAAU,EAAE,YAAY;SACzB;QACD,eAAe,EAAE;YACf,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC,GAAG,SAAS;SACnB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport {\n useTheme,\n useAtFontScaleBreakpoint,\n useFontScale,\n useScalableNumberOfLines,\n} from '../../hooks'\nimport { ConversationResource } from '../../types'\nimport { formatDatePreview } from '../../utils/date'\nimport { AvatarGroup, ConversationAvatar, Heading, Text, Badge, type BadgeProps } from '../display'\nimport { ConversationActions } from './conversation_actions'\nimport { MuteIndicator } from './mute_indicator'\nimport { UnreadCountBadge } from './unread_count_badge'\n\nconst EMPTY_CONVERSATION_PREVIEW_TEXT = 'Send your first message'\n\ninterface ConversationPreviewProps {\n conversation: ConversationResource\n onPress: () => void\n showBadges?: boolean\n style?: ViewStyle\n}\n\nexport const ConversationPreview = ({\n conversation,\n onPress,\n showBadges = true,\n style,\n}: ConversationPreviewProps) => {\n const styles = useStyles()\n const {\n lastMessageAuthorName,\n lastMessageCreatedAt,\n lastMessageTextPreview,\n title,\n unreadCount,\n badges,\n muted,\n disabled,\n } = conversation\n\n const emptyConversation = !lastMessageCreatedAt\n const fallbackIconName = emptyConversation ? 'people.noTextMessage' : 'general.person'\n const hasMetaContent = lastMessageCreatedAt || unreadCount > 0 || muted\n\n const numberOfLinesScaledTitle = useScalableNumberOfLines(1)\n const numberOfLinesScaledPreviewText = useScalableNumberOfLines(2)\n\n const conversationPreviewText = lastMessageTextPreview\n ? `${lastMessageAuthorName}: ${lastMessageTextPreview}`\n : EMPTY_CONVERSATION_PREVIEW_TEXT\n\n const conversationAccessibilityLabel = getConversationAccessibilityLabel({\n conversation,\n showBadges,\n })\n\n return (\n <ConversationActions\n conversation={conversation}\n style={[styles.previewRow, disabled && styles.disabled, style]}\n onPress={onPress}\n accessibilityLabel={conversationAccessibilityLabel}\n >\n <ConversationAvatar\n conversation={conversation}\n size=\"lg\"\n fallbackIconName={fallbackIconName}\n />\n <View style={styles.conversationBody}>\n <Heading numberOfLines={numberOfLinesScaledTitle} variant=\"h3\" style={styles.title}>\n {title}\n </Heading>\n <Text\n variant=\"tertiary\"\n numberOfLines={numberOfLinesScaledPreviewText}\n style={emptyConversation && styles.emptyConversationPreviewText}\n >\n {conversationPreviewText}\n </Text>\n <ConversationBadges visible={showBadges} badges={badges} />\n </View>\n {hasMetaContent && (\n <View style={styles.metaContainer}>\n <Text variant=\"tertiary\">{formatDatePreview(lastMessageCreatedAt)}</Text>\n <View style={styles.statusContainer}>\n <UnreadCountBadge count={unreadCount} showDot={muted} />\n <MuteIndicator muted={muted} />\n </View>\n </View>\n )}\n </ConversationActions>\n )\n}\n\ninterface BadgeShape {\n appName?: BadgeProps['productLogoName']\n pcoResourceType: string\n text: string | null\n}\nconst ConversationBadges = ({ visible, badges }: { visible: boolean; badges?: BadgeShape[] }) => {\n const styles = useStyles()\n const numberOfLinesScaled = useScalableNumberOfLines(1)\n\n if (!visible || !badges || badges.length === 0) {\n return null\n }\n\n return (\n <View style={styles.badges}>\n {badges.map(badge => (\n <Badge\n key={badge.text}\n variant=\"meta\"\n productLogoName={badge.appName}\n label={badge.pcoResourceType}\n metaLabel={badge.text || ''}\n numberOfLinesMetaLabel={numberOfLinesScaled}\n />\n ))}\n </View>\n )\n}\n\nconst skeletonBadges: BadgeShape[] = [\n {\n pcoResourceType: ' ',\n text: ' ',\n },\n]\nexport const ConversationPreviewSkeleton = () => {\n const styles = useStyles()\n\n return (\n <View style={styles.previewRow}>\n <AvatarGroup\n size=\"lg\"\n sourceUris={[]}\n showFallback={true}\n fallbackIconName={'general.person'}\n />\n <View style={styles.conversationBody}>\n <View style={styles.titleLoading} />\n <View style={styles.subtitleLoading} />\n <ConversationBadges visible={true} badges={skeletonBadges} />\n </View>\n <View style={styles.metaContainer}>\n <View style={styles.dateLoading} />\n </View>\n </View>\n )\n}\n\ninterface GetConversationAccessibilityLabelProps {\n conversation: ConversationResource\n showBadges: boolean\n}\nconst getConversationAccessibilityLabel = ({\n conversation,\n showBadges,\n}: GetConversationAccessibilityLabelProps) => {\n const {\n badges,\n title,\n lastMessageAuthorName,\n lastMessageTextPreview,\n muted,\n disabled,\n unreadCount,\n lastMessageCreatedAt,\n } = conversation\n\n const hasBadges = badges && showBadges\n const hasUnreadMessages = unreadCount > 0\n const hasLastMessage = lastMessageCreatedAt\n\n const label = {\n title,\n badge: hasBadges ? `for ${badges[0]?.pcoResourceType} ${badges[0]?.text || ''}` : '',\n disabled: disabled ? 'Disabled' : '',\n muted: muted ? 'Muted' : '',\n readStatus: hasUnreadMessages ? `${unreadCount} unread messages` : '',\n lastMessage: hasLastMessage\n ? `Last message sent ${formatDatePreview(lastMessageCreatedAt)} from ${lastMessageAuthorName} and says ${lastMessageTextPreview}`\n : EMPTY_CONVERSATION_PREVIEW_TEXT,\n }\n\n return [\n `Select ${label.title}`,\n label.badge,\n label.disabled,\n label.muted,\n label.readStatus,\n label.lastMessage,\n ]\n .filter(Boolean)\n .join(', ')\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const atFontScaleBreakpoint = useAtFontScaleBreakpoint()\n const fontScale = useFontScale()\n\n return StyleSheet.create({\n previewRow: {\n flexDirection: atFontScaleBreakpoint ? 'column' : 'row',\n gap: 8,\n borderBottomWidth: 1,\n borderBottomColor: atFontScaleBreakpoint\n ? colors.borderColorDefaultDark\n : colors.borderColorDefaultDim,\n paddingTop: 12,\n paddingBottom: 12,\n paddingHorizontal: 16,\n },\n disabled: {\n opacity: 0.4,\n },\n title: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n },\n titleLoading: {\n width: 120,\n height: 20,\n backgroundColor: colors.fillColorNeutral080,\n borderRadius: 4,\n },\n conversationBody: {\n flex: 1,\n rowGap: 2,\n },\n emptyConversationPreviewText: {\n color: colors.interaction,\n },\n subtitleLoading: {\n width: 80,\n height: 16,\n backgroundColor: colors.fillColorNeutral090,\n borderRadius: 4,\n },\n metaContainer: {\n gap: 4,\n alignItems: atFontScaleBreakpoint ? 'center' : 'flex-end',\n justifyContent: atFontScaleBreakpoint ? 'space-between' : 'flex-start',\n flexDirection: atFontScaleBreakpoint ? 'row' : 'column',\n },\n dateLoading: {\n width: 60,\n height: 16,\n backgroundColor: colors.fillColorNeutral090,\n borderRadius: 4,\n },\n badges: {\n marginTop: 4,\n alignItems: 'flex-start',\n },\n statusContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4 * fontScale,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_preview.js","sourceRoot":"","sources":["../../../src/components/conversations/conversation_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,EACL,QAAQ,EACR,wBAAwB,EACxB,YAAY,EACZ,wBAAwB,GACzB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,aAAa,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ourcesContent":["import React from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport {\n useTheme,\n useAtFontScaleBreakpoint,\n useFontScale,\n useScalableNumberOfLines,\n} from '../../hooks'\nimport { ConversationPreviewData, ConversationResource } from '../../types'\nimport { REACTION_EMOJIS, platformFontWeightBold } from '../../utils'\nimport { formatDatePreview } from '../../utils/date'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { AvatarGroup, ConversationAvatar, Heading, Text, Badge, type BadgeProps } from '../display'\nimport { ConversationActions } from './conversation_actions'\nimport { MuteIndicator } from './mute_indicator'\nimport { UnreadCountBadge } from './unread_count_badge'\n\nconst EMPTY_CONVERSATION_PREVIEW_TEXT = 'Send your first message'\n\ninterface ConversationPreviewProps {\n conversation: ConversationResource\n onPress: () => void\n showBadges?: boolean\n style?: ViewStyle\n}\n\nexport const ConversationPreview = ({\n conversation,\n onPress,\n showBadges = true,\n style,\n}: ConversationPreviewProps) => {\n const styles = useStyles()\n const {\n conversationPreview,\n lastMessageCreatedAt,\n title,\n unreadCount,\n badges,\n muted,\n disabled,\n unreadReaction,\n } = conversation\n\n const emptyConversation = !lastMessageCreatedAt\n const fallbackIconName = emptyConversation ? 'people.noTextMessage' : 'general.person'\n const hasMetaContent = lastMessageCreatedAt || unreadCount > 0 || muted\n const isUnread = unreadCount > 0 || unreadReaction\n\n const numberOfLinesScaledTitle = useScalableNumberOfLines(1)\n const numberOfLinesScaledPreviewText = useScalableNumberOfLines(2)\n\n const conversationPreviewText = conversationPreview\n ? formatConversationPreviewText(conversationPreview)\n : EMPTY_CONVERSATION_PREVIEW_TEXT\n\n const conversationAccessibilityLabel = getConversationAccessibilityLabel({\n conversation,\n showBadges,\n })\n\n return (\n <ConversationActions\n conversation={conversation}\n style={[styles.previewRow, disabled && styles.disabled, style]}\n onPress={onPress}\n accessibilityLabel={conversationAccessibilityLabel}\n >\n <ConversationAvatar\n conversation={conversation}\n size=\"lg\"\n fallbackIconName={fallbackIconName}\n />\n <View style={styles.conversationBody}>\n <Heading\n numberOfLines={numberOfLinesScaledTitle}\n variant=\"h3\"\n style={[styles.title, isUnread && styles.unreadTitle]}\n >\n {title}\n </Heading>\n <Text\n variant=\"tertiary\"\n numberOfLines={numberOfLinesScaledPreviewText}\n style={[\n emptyConversation && styles.emptyConversationPreviewText,\n isUnread && styles.unreadText,\n ]}\n >\n {conversationPreviewText}\n </Text>\n <ConversationBadges visible={showBadges} badges={badges} />\n </View>\n {hasMetaContent && (\n <View style={styles.metaContainer}>\n <Text variant=\"tertiary\">{formatDatePreview(conversationPreview?.createdAt)}</Text>\n <View style={styles.statusContainer}>\n <UnreadCountBadge count={unreadCount} unreadReaction={unreadReaction} showDot={muted} />\n <MuteIndicator muted={muted} />\n </View>\n </View>\n )}\n </ConversationActions>\n )\n}\n\ninterface BadgeShape {\n appName?: BadgeProps['productLogoName']\n pcoResourceType: string\n text: string | null\n}\nconst ConversationBadges = ({ visible, badges }: { visible: boolean; badges?: BadgeShape[] }) => {\n const styles = useStyles()\n const numberOfLinesScaled = useScalableNumberOfLines(1)\n\n if (!visible || !badges || badges.length === 0) {\n return null\n }\n\n return (\n <View style={styles.badges}>\n {badges.map(badge => (\n <Badge\n key={badge.text}\n variant=\"meta\"\n productLogoName={badge.appName}\n label={badge.pcoResourceType}\n metaLabel={badge.text || ''}\n numberOfLinesMetaLabel={numberOfLinesScaled}\n />\n ))}\n </View>\n )\n}\n\nconst skeletonBadges: BadgeShape[] = [\n {\n pcoResourceType: ' ',\n text: ' ',\n },\n]\nexport const ConversationPreviewSkeleton = () => {\n const styles = useStyles()\n\n return (\n <View style={styles.previewRow}>\n <AvatarGroup\n size=\"lg\"\n sourceUris={[]}\n showFallback={true}\n fallbackIconName={'general.person'}\n />\n <View style={styles.conversationBody}>\n <View style={styles.titleLoading} />\n <View style={styles.subtitleLoading} />\n <ConversationBadges visible={true} badges={skeletonBadges} />\n </View>\n <View style={styles.metaContainer}>\n <View style={styles.dateLoading} />\n </View>\n </View>\n )\n}\n\nfunction reactionEmoji(value: ConversationPreviewData['value']): string | null {\n if (!value) return null\n return REACTION_EMOJIS[value] ?? null\n}\n\nfunction formatConversationPreviewText(preview: ConversationPreviewData) {\n if (preview.kind === 'reaction') {\n const emoji = reactionEmoji(preview.value)\n return `${preview.authorName}${emoji ? ` ${emoji}` : ' reacted'} to: \"${preview.text}\"`\n }\n\n return `${preview.authorName}: ${preview.text}`\n}\n\nfunction formatConversationPreviewAccessibilityLabel(preview: ConversationPreviewData) {\n const date = formatDatePreview(preview.createdAt)\n\n if (preview.kind === 'reaction') {\n return `${preview.authorName} reacted to your message sent ${date} and says ${preview.text}`\n }\n\n return `Last message sent ${date} from ${preview.authorName} and says ${preview.text}`\n}\n\ninterface GetConversationAccessibilityLabelProps {\n conversation: ConversationResource\n showBadges: boolean\n}\nconst getConversationAccessibilityLabel = ({\n conversation,\n showBadges,\n}: GetConversationAccessibilityLabelProps) => {\n const { badges, title, conversationPreview, muted, disabled, unreadCount, unreadReaction } =\n conversation\n\n const hasBadges = badges && showBadges\n const hasUnreadMessages = unreadCount > 0\n\n const label = {\n title,\n badge: hasBadges ? `for ${badges[0]?.pcoResourceType} ${badges[0]?.text || ''}` : '',\n disabled: disabled ? 'Disabled' : '',\n muted: muted ? 'Muted' : '',\n readStatus: hasUnreadMessages\n ? `${unreadCount} unread messages`\n : unreadReaction\n ? 'unread reaction'\n : '',\n lastMessage: conversationPreview\n ? formatConversationPreviewAccessibilityLabel(conversationPreview)\n : EMPTY_CONVERSATION_PREVIEW_TEXT,\n }\n\n return [\n `Select ${label.title}`,\n label.badge,\n label.disabled,\n label.muted,\n label.readStatus,\n label.lastMessage,\n ]\n .filter(Boolean)\n .join(', ')\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const atFontScaleBreakpoint = useAtFontScaleBreakpoint()\n const fontScale = useFontScale()\n\n return StyleSheet.create({\n previewRow: {\n flexDirection: atFontScaleBreakpoint ? 'column' : 'row',\n gap: 8,\n borderBottomWidth: 1,\n borderBottomColor: atFontScaleBreakpoint\n ? colors.borderColorDefaultDark\n : colors.borderColorDefaultDim,\n paddingTop: 12,\n paddingBottom: 12,\n paddingHorizontal: 16,\n },\n disabled: {\n opacity: 0.4,\n },\n title: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n },\n unreadTitle: {\n fontWeight: tokens.fontWeightBold,\n },\n unreadText: {\n fontWeight: platformFontWeightBold,\n },\n titleLoading: {\n width: 120,\n height: 20,\n backgroundColor: colors.fillColorNeutral080,\n borderRadius: 4,\n },\n conversationBody: {\n flex: 1,\n rowGap: 2,\n },\n emptyConversationPreviewText: {\n color: colors.interaction,\n },\n subtitleLoading: {\n width: 80,\n height: 16,\n backgroundColor: colors.fillColorNeutral090,\n borderRadius: 4,\n },\n metaContainer: {\n gap: 4,\n alignItems: atFontScaleBreakpoint ? 'center' : 'flex-end',\n justifyContent: atFontScaleBreakpoint ? 'space-between' : 'flex-start',\n flexDirection: atFontScaleBreakpoint ? 'row' : 'column',\n },\n dateLoading: {\n width: 60,\n height: 16,\n backgroundColor: colors.fillColorNeutral090,\n borderRadius: 4,\n },\n badges: {\n marginTop: 4,\n alignItems: 'flex-start',\n },\n statusContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4 * fontScale,\n },\n })\n}\n"]}
@@ -2,6 +2,6 @@ import React from 'react';
2
2
  interface ConversationsProps {
3
3
  ListHeaderComponent?: React.ComponentType<any> | React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
4
4
  }
5
- export declare const Conversations: ({ ListHeaderComponent }: ConversationsProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const Conversations: ({ ListHeaderComponent }: ConversationsProps) => React.JSX.Element;
6
6
  export {};
7
7
  //# sourceMappingURL=conversations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversations.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAWtC,UAAU,kBAAkB;IAC1B,mBAAmB,CAAC,EAChB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAClE,IAAI,GACJ,SAAS,CAAA;CACd;AAED,eAAO,MAAM,aAAa,GAAI,yBAAyB,kBAAkB,4CA4ExE,CAAA"}
1
+ {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversations.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAWtC,UAAU,kBAAkB;IAC1B,mBAAmB,CAAC,EAChB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAClE,IAAI,GACJ,SAAS,CAAA;CACd;AAED,eAAO,MAAM,aAAa,GAAI,yBAAyB,kBAAkB,sBA4ExE,CAAA"}
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { useNavigation } from '@react-navigation/native';
3
- import { useMemo } from 'react';
2
+ import React, { useMemo } from 'react';
4
3
  import { FlatList, StyleSheet, View } from 'react-native';
5
4
  import { useConversationsContext } from '../../contexts/conversations_context';
6
5
  import { useTheme } from '../../hooks';
@@ -30,20 +29,22 @@ export const Conversations = ({ ListHeaderComponent }) => {
30
29
  throwResponseError(error);
31
30
  }
32
31
  useConversationsJoltEvents();
33
- return (_jsx(View, { style: styles.container, children: _jsx(FlatList, { data: data, keyExtractor: item => item.id.toString(), contentContainerStyle: styles.contentContainer, onRefresh: refetch, refreshing: !isFetched && isRefetching, ListHeaderComponent: ListHeaderComponent, ListEmptyComponent: _jsx(ConversationsBlankState, { isFilterApplied: isFilterApplied, canCreateConversations: canCreateConversations }), renderItem: ({ item }) => {
34
- if (item.type === 'loading') {
35
- return _jsx(ConversationPreviewSkeleton, {});
36
- }
37
- else {
38
- return (_jsx(ConversationPreview, { conversation: item.resource, onPress: () => navigation.navigate('Conversation', {
39
- conversation_id: item.resource.id,
40
- title: item.resource.title,
41
- badge: item.resource.badges?.[0],
42
- deleted: item.resource.deleted,
43
- muted: item.resource.muted,
44
- }), showBadges: showBadges }));
45
- }
46
- }, onEndReached: () => fetchNextPage() }) }));
32
+ return (<View style={styles.container}>
33
+ <FlatList data={data} keyExtractor={item => item.id.toString()} contentContainerStyle={styles.contentContainer} onRefresh={refetch} refreshing={!isFetched && isRefetching} ListHeaderComponent={ListHeaderComponent} ListEmptyComponent={<ConversationsBlankState isFilterApplied={isFilterApplied} canCreateConversations={canCreateConversations}/>} renderItem={({ item }) => {
34
+ if (item.type === 'loading') {
35
+ return <ConversationPreviewSkeleton />;
36
+ }
37
+ else {
38
+ return (<ConversationPreview conversation={item.resource} onPress={() => navigation.navigate('Conversation', {
39
+ conversation_id: item.resource.id,
40
+ title: item.resource.title,
41
+ badge: item.resource.badges?.[0],
42
+ deleted: item.resource.deleted,
43
+ muted: item.resource.muted,
44
+ })} showBadges={showBadges}/>);
45
+ }
46
+ }} onEndReached={() => fetchNextPage()}/>
47
+ </View>);
47
48
  };
48
49
  const useStyles = () => {
49
50
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../../src/components/conversations/conversations.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,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,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;QACtB,gBAAgB,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE;QACzC,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,mBAAmB,EAAE;KAChD,CAAC,CAAA;AACJ,CAAC,CAAA;AAaD,MAAM,kBAAkB,GAAmB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9E,IAAI,EAAE,SAAS;IACf,EAAE,EAAE,UAAU,CAAC,EAAE;CAClB,CAAC,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport React, { useMemo } from 'react'\nimport { FlatList, StyleSheet, View } from 'react-native'\nimport { useConversationsContext } from '../../contexts/conversations_context'\nimport { useTheme } from '../../hooks'\nimport { useCanCreateConversations } from '../../hooks/use_chat_permissions'\nimport { useConversationsJoltEvents } from '../../hooks/use_conversations_jolt_events'\nimport { ConversationResource } from '../../types'\nimport { throwResponseError } from '../../utils/response_error'\nimport { ConversationPreview, ConversationPreviewSkeleton } from './conversation_preview'\nimport { ConversationsBlankState } from './conversations_blank_state'\n\ninterface ConversationsProps {\n ListHeaderComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n | null\n | undefined\n}\n\nexport const Conversations = ({ ListHeaderComponent }: ConversationsProps) => {\n const styles = useStyles()\n const {\n conversations,\n isLoading,\n fetchNextPage,\n refetch,\n isRefetching,\n isFetched,\n isError,\n error,\n args: { chat_group_graph_id, group_source_app_name },\n } = useConversationsContext()\n const navigation = useNavigation()\n const canCreateConversations = useCanCreateConversations()\n const isFilterApplied = !!chat_group_graph_id || !!group_source_app_name\n\n const showBadges = !chat_group_graph_id\n\n const data: FlatListItem[] = useMemo(() => {\n if (isLoading) {\n return loadingPlaceholder\n }\n return conversations.map(conversation => ({\n type: 'conversation' as const,\n id: conversation.id,\n resource: conversation,\n }))\n }, [conversations, isLoading])\n\n if (isError) {\n throwResponseError(error)\n }\n\n useConversationsJoltEvents()\n\n return (\n <View style={styles.container}>\n <FlatList\n data={data}\n keyExtractor={item => item.id.toString()}\n contentContainerStyle={styles.contentContainer}\n onRefresh={refetch}\n refreshing={!isFetched && isRefetching}\n ListHeaderComponent={ListHeaderComponent}\n ListEmptyComponent={\n <ConversationsBlankState\n isFilterApplied={isFilterApplied}\n canCreateConversations={canCreateConversations}\n />\n }\n renderItem={({ item }) => {\n if (item.type === 'loading') {\n return <ConversationPreviewSkeleton />\n } else {\n return (\n <ConversationPreview\n conversation={item.resource}\n onPress={() =>\n navigation.navigate('Conversation', {\n conversation_id: item.resource.id,\n title: item.resource.title,\n badge: item.resource.badges?.[0],\n deleted: item.resource.deleted,\n muted: item.resource.muted,\n })\n }\n showBadges={showBadges}\n />\n )\n }\n }}\n onEndReached={() => fetchNextPage()}\n />\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: { flex: 1 },\n contentContainer: { paddingVertical: 16 },\n listItem: { color: colors.fillColorNeutral020 },\n })\n}\n\ninterface FlatListLoadingItem {\n type: 'loading'\n id: string\n}\ninterface FlatListConversationItem {\n type: 'conversation'\n resource: ConversationResource\n id: number\n}\ntype FlatListItem = FlatListLoadingItem | FlatListConversationItem\n\nconst loadingPlaceholder: FlatListItem[] = Array.from({ length: 5 }, (_, i) => ({\n type: 'loading',\n id: `loading${i}`,\n}))\n"]}
1
+ {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../../src/components/conversations/conversations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,QA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AC,MAAM,EAAE,CAAC,CAAC,CAAC;wBAChC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO;wBAC9B,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;qBAC3B,CACH,CAAC,CACD,UAAU,CAAC,CAAC,UAAU,CAAC,EACvB,CACH,CAAA;YACH,CAAC;QACH,CAAC,CAAC,CACF,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC,EAExC;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;QACtB,gBAAgB,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE;QACzC,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,mBAAmB,EAAE;KAChD,CAAC,CAAA;AACJ,CAAC,CAAA;AAaD,MAAM,kBAAkB,GAAmB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9E,IAAI,EAAE,SAAS;IACf,EAAE,EAAE,UAAU,CAAC,EAAE;CAClB,CAAC,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport React, { useMemo } from 'react'\nimport { FlatList, StyleSheet, View } from 'react-native'\nimport { useConversationsContext } from '../../contexts/conversations_context'\nimport { useTheme } from '../../hooks'\nimport { useCanCreateConversations } from '../../hooks/use_chat_permissions'\nimport { useConversationsJoltEvents } from '../../hooks/use_conversations_jolt_events'\nimport { ConversationResource } from '../../types'\nimport { throwResponseError } from '../../utils/response_error'\nimport { ConversationPreview, ConversationPreviewSkeleton } from './conversation_preview'\nimport { ConversationsBlankState } from './conversations_blank_state'\n\ninterface ConversationsProps {\n ListHeaderComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n | null\n | undefined\n}\n\nexport const Conversations = ({ ListHeaderComponent }: ConversationsProps) => {\n const styles = useStyles()\n const {\n conversations,\n isLoading,\n fetchNextPage,\n refetch,\n isRefetching,\n isFetched,\n isError,\n error,\n args: { chat_group_graph_id, group_source_app_name },\n } = useConversationsContext()\n const navigation = useNavigation()\n const canCreateConversations = useCanCreateConversations()\n const isFilterApplied = !!chat_group_graph_id || !!group_source_app_name\n\n const showBadges = !chat_group_graph_id\n\n const data: FlatListItem[] = useMemo(() => {\n if (isLoading) {\n return loadingPlaceholder\n }\n return conversations.map(conversation => ({\n type: 'conversation' as const,\n id: conversation.id,\n resource: conversation,\n }))\n }, [conversations, isLoading])\n\n if (isError) {\n throwResponseError(error)\n }\n\n useConversationsJoltEvents()\n\n return (\n <View style={styles.container}>\n <FlatList\n data={data}\n keyExtractor={item => item.id.toString()}\n contentContainerStyle={styles.contentContainer}\n onRefresh={refetch}\n refreshing={!isFetched && isRefetching}\n ListHeaderComponent={ListHeaderComponent}\n ListEmptyComponent={\n <ConversationsBlankState\n isFilterApplied={isFilterApplied}\n canCreateConversations={canCreateConversations}\n />\n }\n renderItem={({ item }) => {\n if (item.type === 'loading') {\n return <ConversationPreviewSkeleton />\n } else {\n return (\n <ConversationPreview\n conversation={item.resource}\n onPress={() =>\n navigation.navigate('Conversation', {\n conversation_id: item.resource.id,\n title: item.resource.title,\n badge: item.resource.badges?.[0],\n deleted: item.resource.deleted,\n muted: item.resource.muted,\n })\n }\n showBadges={showBadges}\n />\n )\n }\n }}\n onEndReached={() => fetchNextPage()}\n />\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: { flex: 1 },\n contentContainer: { paddingVertical: 16 },\n listItem: { color: colors.fillColorNeutral020 },\n })\n}\n\ninterface FlatListLoadingItem {\n type: 'loading'\n id: string\n}\ninterface FlatListConversationItem {\n type: 'conversation'\n resource: ConversationResource\n id: number\n}\ntype FlatListItem = FlatListLoadingItem | FlatListConversationItem\n\nconst loadingPlaceholder: FlatListItem[] = Array.from({ length: 5 }, (_, i) => ({\n type: 'loading',\n id: `loading${i}`,\n}))\n"]}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  interface ConversationsBlankStateProps {
2
3
  isFilterApplied: boolean;
3
4
  canCreateConversations: boolean;
4
5
  }
5
- export declare function ConversationsBlankState({ isFilterApplied, canCreateConversations, }: ConversationsBlankStateProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function ConversationsBlankState({ isFilterApplied, canCreateConversations, }: ConversationsBlankStateProps): React.JSX.Element;
6
7
  export {};
7
8
  //# sourceMappingURL=conversations_blank_state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversations_blank_state.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversations_blank_state.tsx"],"names":[],"mappings":"AAIA,UAAU,4BAA4B;IACpC,eAAe,EAAE,OAAO,CAAA;IACxB,sBAAsB,EAAE,OAAO,CAAA;CAChC;AAED,wBAAgB,uBAAuB,CAAC,EACtC,eAAe,EACf,sBAAsB,GACvB,EAAE,4BAA4B,2CAoB9B"}
1
+ {"version":3,"file":"conversations_blank_state.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversations_blank_state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,UAAU,4BAA4B;IACpC,eAAe,EAAE,OAAO,CAAA;IACxB,sBAAsB,EAAE,OAAO,CAAA;CAChC;AAED,wBAAgB,uBAAuB,CAAC,EACtC,eAAe,EACf,sBAAsB,GACvB,EAAE,4BAA4B,qBAoB9B"}
@@ -1,8 +1,18 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
  import BlankState from '../primitive/blank_state_primitive';
4
4
  export function ConversationsBlankState({ isFilterApplied, canCreateConversations, }) {
5
- return (_jsx(View, { style: styles.container, children: _jsxs(BlankState.Root, { children: [_jsx(BlankState.Imagery, { name: "general.outlinedTextMessage" }), _jsxs(BlankState.Content, { children: [_jsx(BlankState.Heading, { children: "No conversations yet." }), isFilterApplied ? (_jsx(BlankState.Text, { children: "Adjust your filters to find conversations." })) : canCreateConversations ? (_jsx(BlankState.Text, { children: "Tap the compose button to get started." })) : (_jsx(BlankState.Text, { children: "When your groups or teams start chatting, you\u2019ll find them here." }))] })] }) }));
5
+ return (<View style={styles.container}>
6
+ <BlankState.Root>
7
+ <BlankState.Imagery name="general.outlinedTextMessage"/>
8
+ <BlankState.Content>
9
+ <BlankState.Heading>No conversations yet.</BlankState.Heading>
10
+ {isFilterApplied ? (<BlankState.Text>Adjust your filters to find conversations.</BlankState.Text>) : canCreateConversations ? (<BlankState.Text>Tap the compose button to get started.</BlankState.Text>) : (<BlankState.Text>
11
+ When your groups or teams start chatting, you&rsquo;ll find them here.
12
+ </BlankState.Text>)}
13
+ </BlankState.Content>
14
+ </BlankState.Root>
15
+ </View>);
6
16
  }
7
17
  const styles = StyleSheet.create({
8
18
  container: {
@@ -1 +1 @@
1
- {"version":3,"file":"conversations_blank_state.js","sourceRoot":"","sources":["../../../src/components/conversations/conversations_blank_state.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,UAAU,MAAM,oCAAoC,CAAA;AAO3D,MAAM,UAAU,uBAAuB,CAAC,EACtC,eAAe,EACf,sBAAsB,GACO;IAC7B,OAAO,CACL,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YAC3B,MAAC,UAAU,CAAC,IAAI,eACd,KAAC,UAAU,CAAC,OAAO,IAAC,IAAI,EAAC,6BAA6B,GAAG,EACzD,MAAC,UAAU,CAAC,OAAO,eACjB,KAAC,UAAU,CAAC,OAAO,wCAA2C,EAC7D,eAAe,CAAC,CAAC,CAAC,CACjB,KAAC,UAAU,CAAC,IAAI,6DAA6D,CAC9E,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAC3B,KAAC,UAAU,CAAC,IAAI,yDAAyD,CAC1E,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,CAAC,IAAI,wFAEE,CACnB,IACkB,IACL,GACb,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,EAAE;KACpB;CACF,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport BlankState from '../primitive/blank_state_primitive'\n\ninterface ConversationsBlankStateProps {\n isFilterApplied: boolean\n canCreateConversations: boolean\n}\n\nexport function ConversationsBlankState({\n isFilterApplied,\n canCreateConversations,\n}: ConversationsBlankStateProps) {\n return (\n <View style={styles.container}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.outlinedTextMessage\" />\n <BlankState.Content>\n <BlankState.Heading>No conversations yet.</BlankState.Heading>\n {isFilterApplied ? (\n <BlankState.Text>Adjust your filters to find conversations.</BlankState.Text>\n ) : canCreateConversations ? (\n <BlankState.Text>Tap the compose button to get started.</BlankState.Text>\n ) : (\n <BlankState.Text>\n When your groups or teams start chatting, you&rsquo;ll find them here.\n </BlankState.Text>\n )}\n </BlankState.Content>\n </BlankState.Root>\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 32,\n },\n})\n"]}
1
+ {"version":3,"file":"conversations_blank_state.js","sourceRoot":"","sources":["../../../src/components/conversations/conversations_blank_state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,UAAU,MAAM,oCAAoC,CAAA;AAO3D,MAAM,UAAU,uBAAuB,CAAC,EACtC,eAAe,EACf,sBAAsB,GACO;IAC7B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,UAAU,CAAC,IAAI,CACd;QAAA,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EACtD;QAAA,CAAC,UAAU,CAAC,OAAO,CACjB;UAAA,CAAC,UAAU,CAAC,OAAO,CAAC,qBAAqB,EAAE,UAAU,CAAC,OAAO,CAC7D;UAAA,CAAC,eAAe,CAAC,CAAC,CAAC,CACjB,CAAC,UAAU,CAAC,IAAI,CAAC,0CAA0C,EAAE,UAAU,CAAC,IAAI,CAAC,CAC9E,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAC3B,CAAC,UAAU,CAAC,IAAI,CAAC,sCAAsC,EAAE,UAAU,CAAC,IAAI,CAAC,CAC1E,CAAC,CAAC,CAAC,CACF,CAAC,UAAU,CAAC,IAAI,CACd;;YACF,EAAE,UAAU,CAAC,IAAI,CAAC,CACnB,CACH;QAAA,EAAE,UAAU,CAAC,OAAO,CACtB;MAAA,EAAE,UAAU,CAAC,IAAI,CACnB;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,EAAE;KACpB;CACF,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport BlankState from '../primitive/blank_state_primitive'\n\ninterface ConversationsBlankStateProps {\n isFilterApplied: boolean\n canCreateConversations: boolean\n}\n\nexport function ConversationsBlankState({\n isFilterApplied,\n canCreateConversations,\n}: ConversationsBlankStateProps) {\n return (\n <View style={styles.container}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.outlinedTextMessage\" />\n <BlankState.Content>\n <BlankState.Heading>No conversations yet.</BlankState.Heading>\n {isFilterApplied ? (\n <BlankState.Text>Adjust your filters to find conversations.</BlankState.Text>\n ) : canCreateConversations ? (\n <BlankState.Text>Tap the compose button to get started.</BlankState.Text>\n ) : (\n <BlankState.Text>\n When your groups or teams start chatting, you&rsquo;ll find them here.\n </BlankState.Text>\n )}\n </BlankState.Content>\n </BlankState.Root>\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 32,\n },\n})\n"]}
@@ -1,4 +1,5 @@
1
+ import React from 'react';
1
2
  export declare const MuteIndicator: ({ muted }: {
2
3
  muted: boolean;
3
- }) => import("react/jsx-runtime").JSX.Element | null;
4
+ }) => React.JSX.Element | null;
4
5
  //# sourceMappingURL=mute_indicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mute_indicator.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/mute_indicator.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,GAAI,WAAW;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,mDAY1D,CAAA"}
1
+ {"version":3,"file":"mute_indicator.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/mute_indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,eAAO,MAAM,aAAa,GAAI,WAAW;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,6BAY1D,CAAA"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { StyleSheet } from 'react-native';
3
3
  import { useTheme } from '../../hooks';
4
4
  import { MAX_FONT_SIZE_MULTIPLIER } from '../../utils';
@@ -7,7 +7,7 @@ export const MuteIndicator = ({ muted }) => {
7
7
  const styles = useStyles();
8
8
  if (!muted)
9
9
  return null;
10
- return (_jsx(Icon, { name: "general.bellMuted", style: styles.mutedIcon, maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER }));
10
+ return (<Icon name="general.bellMuted" style={styles.mutedIcon} maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}/>);
11
11
  };
12
12
  const useStyles = () => {
13
13
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"mute_indicator.js","sourceRoot":"","sources":["../../../src/components/conversations/mute_indicator.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,KAAK,EAAsB,EAAE,EAAE;IAC7D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IAEvB,OAAO,CACL,KAAC,IAAI,IACH,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,qBAAqB,EAAE,wBAAwB,GAC/C,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,mBAAmB;YACjC,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { MAX_FONT_SIZE_MULTIPLIER } from '../../utils'\nimport { Icon } from '../display'\n\nexport const MuteIndicator = ({ muted }: { muted: boolean }) => {\n const styles = useStyles()\n\n if (!muted) return null\n\n return (\n <Icon\n name=\"general.bellMuted\"\n style={styles.mutedIcon}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}\n />\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n mutedIcon: {\n color: colors.iconColorDefaultDim,\n fontSize: 16,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"mute_indicator.js","sourceRoot":"","sources":["../../../src/components/conversations/mute_indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,KAAK,EAAsB,EAAE,EAAE;IAC7D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IAEvB,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,mBAAmB,CACxB,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CACxB,qBAAqB,CAAC,CAAC,wBAAwB,CAAC,EAChD,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,mBAAmB;YACjC,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { MAX_FONT_SIZE_MULTIPLIER } from '../../utils'\nimport { Icon } from '../display'\n\nexport const MuteIndicator = ({ muted }: { muted: boolean }) => {\n const styles = useStyles()\n\n if (!muted) return null\n\n return (\n <Icon\n name=\"general.bellMuted\"\n style={styles.mutedIcon}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}\n />\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n mutedIcon: {\n color: colors.iconColorDefaultDim,\n fontSize: 16,\n },\n })\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { type PressableProps } from 'react-native-gesture-handler';
2
3
  import { IconString } from '../display';
3
4
  interface SwipeableToggleButtonProps extends PressableProps {
@@ -15,6 +16,6 @@ interface SwipeableToggleButtonProps extends PressableProps {
15
16
  };
16
17
  loading?: boolean;
17
18
  }
18
- export declare function SwipeableToggleButton({ backgroundColor, onPress, toggleContent, disabled, toggled, loading, ...props }: SwipeableToggleButtonProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function SwipeableToggleButton({ backgroundColor, onPress, toggleContent, disabled, toggled, loading, ...props }: SwipeableToggleButtonProps): React.JSX.Element;
19
20
  export {};
20
21
  //# sourceMappingURL=swipeable_toggle_button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"swipeable_toggle_button.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/swipeable_toggle_button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAS7E,OAAO,EAAQ,UAAU,EAAiB,MAAM,YAAY,CAAA;AAE5D,UAAU,0BAA2B,SAAQ,cAAc;IACzD,eAAe,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE;QACb,IAAI,EAAE;YAAE,QAAQ,EAAE,UAAU,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;QAC7C,KAAK,EAAE;YAAE,QAAQ,EAAE,UAAU,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;KAC/C,CAAA;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,OAAO,EACP,aAAa,EACb,QAAgB,EAChB,OAAO,EACP,OAAe,EACf,GAAG,KAAK,EACT,EAAE,0BAA0B,2CAyC5B"}
1
+ {"version":3,"file":"swipeable_toggle_button.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/swipeable_toggle_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAS7E,OAAO,EAAQ,UAAU,EAAiB,MAAM,YAAY,CAAA;AAE5D,UAAU,0BAA2B,SAAQ,cAAc;IACzD,eAAe,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE;QACb,IAAI,EAAE;YAAE,QAAQ,EAAE,UAAU,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;QAC7C,KAAK,EAAE;YAAE,QAAQ,EAAE,UAAU,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;KAC/C,CAAA;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,OAAO,EACP,aAAa,EACb,QAAgB,EAChB,OAAO,EACP,OAAe,EACf,GAAG,KAAK,EACT,EAAE,0BAA0B,qBAyC5B"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { StyleSheet } from 'react-native';
3
3
  import { Pressable } from 'react-native-gesture-handler';
4
4
  import { useCreateAndroidRippleColor, useTheme } from '../../hooks';
@@ -12,10 +12,17 @@ export function SwipeableToggleButton({ backgroundColor, onPress, toggleContent,
12
12
  color: backgroundColor,
13
13
  });
14
14
  const { iconName, label } = toggleContent[toggled ? 'true' : 'false'];
15
- return (_jsx(Pressable, { onPress: event => {
15
+ return (<Pressable onPress={event => {
16
16
  Haptic.impactLight();
17
17
  onPress?.(event);
18
- }, style: ({ pressed }) => [styles.button, pressed && platformPressedOpacityStyle], android_ripple: { color: androidRippleColor, borderless: false, foreground: true }, disabled: disabled || loading, accessibilityRole: "togglebutton", accessibilityState: { checked: toggled }, ...props, children: loading ? (_jsx(Spinner, { size: 20 })) : (_jsxs(_Fragment, { children: [_jsx(Icon, { name: iconName, style: styles.icon, maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER }), _jsx(Text, { variant: "footnote", style: styles.text, maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER, children: label })] })) }));
18
+ }} style={({ pressed }) => [styles.button, pressed && platformPressedOpacityStyle]} android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }} disabled={disabled || loading} accessibilityRole="togglebutton" accessibilityState={{ checked: toggled }} {...props}>
19
+ {loading ? (<Spinner size={20}/>) : (<>
20
+ <Icon name={iconName} style={styles.icon} maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}/>
21
+ <Text variant="footnote" style={styles.text} maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}>
22
+ {label}
23
+ </Text>
24
+ </>)}
25
+ </Pressable>);
19
26
  }
20
27
  const useStyles = ({ backgroundColor, disabled }) => {
21
28
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"swipeable_toggle_button.js","sourceRoot":"","sources":["../../../src/components/conversations/swipeable_toggle_button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,SAAS,EAAuB,MAAM,8BAA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ACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet } from 'react-native'\nimport { Pressable, type PressableProps } from 'react-native-gesture-handler'\nimport { useCreateAndroidRippleColor, useTheme } from '../../hooks'\nimport { Haptic } from '../../utils/native_adapters/configuration'\nimport {\n MAX_FONT_SIZE_MULTIPLIER,\n platformFontWeightMedium,\n platformPressedOpacityStyle,\n} from '../../utils/styles'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { Icon, IconString, Spinner, Text } from '../display'\n\ninterface SwipeableToggleButtonProps extends PressableProps {\n backgroundColor: string\n toggled: boolean\n toggleContent: {\n true: { iconName: IconString; label: string }\n false: { iconName: IconString; label: string }\n }\n loading?: boolean\n}\n\nexport function SwipeableToggleButton({\n backgroundColor,\n onPress,\n toggleContent,\n disabled = false,\n toggled,\n loading = false,\n ...props\n}: SwipeableToggleButtonProps) {\n const styles = useStyles({ backgroundColor, disabled })\n const androidRippleColor = useCreateAndroidRippleColor({\n color: backgroundColor,\n })\n\n const { iconName, label } = toggleContent[toggled ? 'true' : 'false']\n\n return (\n <Pressable\n onPress={event => {\n Haptic.impactLight()\n onPress?.(event)\n }}\n style={({ pressed }) => [styles.button, pressed && platformPressedOpacityStyle]}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n disabled={disabled || loading}\n accessibilityRole=\"togglebutton\"\n accessibilityState={{ checked: toggled }}\n {...props}\n >\n {loading ? (\n <Spinner size={20} />\n ) : (\n <>\n <Icon\n name={iconName}\n style={styles.icon}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}\n />\n <Text\n variant=\"footnote\"\n style={styles.text}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}\n >\n {label}\n </Text>\n </>\n )}\n </Pressable>\n )\n}\n\nconst useStyles = ({ backgroundColor, disabled }: Partial<SwipeableToggleButtonProps>) => {\n const { colors } = useTheme()\n const fillColor = disabled ? colors.textColorDefaultDisabled : tokens.colorNeutral100White\n const buttonBackgroundColor = disabled\n ? colors.fillColorButtonNeutralSolidDisabled\n : backgroundColor\n\n return StyleSheet.create({\n button: {\n flex: 1,\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 4,\n height: '100%',\n backgroundColor: buttonBackgroundColor,\n },\n icon: {\n fontSize: 20,\n color: fillColor,\n marginTop: 4,\n },\n text: {\n color: fillColor,\n fontWeight: platformFontWeightMedium,\n textAlign: 'center',\n paddingHorizontal: 8,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"swipeable_toggle_button.js","sourceRoot":"","sources":["../../../src/components/conversations/swipeable_toggle_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,SAAS,EAAuB,MAAM,8BAA8B,CAAA;AAC7E,OAAO,EAAE,2BAA2B,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAClE,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAc,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAY5D,MAAM,UAAU,qBAAqB,CAAC,EACpC,eAAe,EACf,OAAO,EACP,aAAa,EACb,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EACmB;IAC3B,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,CAAA;IACvD,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;QACrD,KAAK,EAAE,eAAe;KACvB,CAAC,CAAA;IAEF,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,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AE,EAAE;IACvF,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAA;IAC1F,MAAM,qBAAqB,GAAG,QAAQ;QACpC,CAAC,CAAC,MAAM,CAAC,mCAAmC;QAC5C,CAAC,CAAC,eAAe,CAAA;IAEnB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,MAAM,EAAE;YACN,IAAI,EAAE,CAAC;YACP,aAAa,EAAE,QAAQ;YACvB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,MAAM;YACd,eAAe,EAAE,qBAAqB;SACvC;QACD,IAAI,EAAE;YACJ,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,CAAC;SACb;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,SAAS;YAChB,UAAU,EAAE,wBAAwB;YACpC,SAAS,EAAE,QAAQ;YACnB,iBAAiB,EAAE,CAAC;SACrB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet } from 'react-native'\nimport { Pressable, type PressableProps } from 'react-native-gesture-handler'\nimport { useCreateAndroidRippleColor, useTheme } from '../../hooks'\nimport { Haptic } from '../../utils/native_adapters/configuration'\nimport {\n MAX_FONT_SIZE_MULTIPLIER,\n platformFontWeightMedium,\n platformPressedOpacityStyle,\n} from '../../utils/styles'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { Icon, IconString, Spinner, Text } from '../display'\n\ninterface SwipeableToggleButtonProps extends PressableProps {\n backgroundColor: string\n toggled: boolean\n toggleContent: {\n true: { iconName: IconString; label: string }\n false: { iconName: IconString; label: string }\n }\n loading?: boolean\n}\n\nexport function SwipeableToggleButton({\n backgroundColor,\n onPress,\n toggleContent,\n disabled = false,\n toggled,\n loading = false,\n ...props\n}: SwipeableToggleButtonProps) {\n const styles = useStyles({ backgroundColor, disabled })\n const androidRippleColor = useCreateAndroidRippleColor({\n color: backgroundColor,\n })\n\n const { iconName, label } = toggleContent[toggled ? 'true' : 'false']\n\n return (\n <Pressable\n onPress={event => {\n Haptic.impactLight()\n onPress?.(event)\n }}\n style={({ pressed }) => [styles.button, pressed && platformPressedOpacityStyle]}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n disabled={disabled || loading}\n accessibilityRole=\"togglebutton\"\n accessibilityState={{ checked: toggled }}\n {...props}\n >\n {loading ? (\n <Spinner size={20} />\n ) : (\n <>\n <Icon\n name={iconName}\n style={styles.icon}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}\n />\n <Text\n variant=\"footnote\"\n style={styles.text}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}\n >\n {label}\n </Text>\n </>\n )}\n </Pressable>\n )\n}\n\nconst useStyles = ({ backgroundColor, disabled }: Partial<SwipeableToggleButtonProps>) => {\n const { colors } = useTheme()\n const fillColor = disabled ? colors.textColorDefaultDisabled : tokens.colorNeutral100White\n const buttonBackgroundColor = disabled\n ? colors.fillColorButtonNeutralSolidDisabled\n : backgroundColor\n\n return StyleSheet.create({\n button: {\n flex: 1,\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 4,\n height: '100%',\n backgroundColor: buttonBackgroundColor,\n },\n icon: {\n fontSize: 20,\n color: fillColor,\n marginTop: 4,\n },\n text: {\n color: fillColor,\n fontWeight: platformFontWeightMedium,\n textAlign: 'center',\n paddingHorizontal: 8,\n },\n })\n}\n"]}
@@ -1,5 +1,7 @@
1
- export declare const UnreadCountBadge: ({ count, showDot }: {
1
+ import React from 'react';
2
+ export declare const UnreadCountBadge: ({ count, unreadReaction, showDot, }: {
2
3
  count: number;
4
+ unreadReaction: boolean;
3
5
  showDot: boolean;
4
- }) => import("react/jsx-runtime").JSX.Element | null;
6
+ }) => React.JSX.Element | null;
5
7
  //# sourceMappingURL=unread_count_badge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unread_count_badge.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/unread_count_badge.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,GAAI,oBAAoB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,mDAcvF,CAAA"}
1
+ {"version":3,"file":"unread_count_badge.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/unread_count_badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,eAAO,MAAM,gBAAgB,GAAI,qCAI9B;IACD,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;CACjB,6BAeA,CAAA"}
@@ -1,22 +1,27 @@
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 { useFontScale, useTheme } from '../../hooks';
4
4
  import { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightBold } from '../../utils';
5
5
  import { Text } from '../display';
6
- export const UnreadCountBadge = ({ count, showDot }) => {
6
+ export const UnreadCountBadge = ({ count, unreadReaction, showDot, }) => {
7
7
  const styles = useStyles();
8
8
  const displayCount = count > 99 ? '99+' : count;
9
- if (count === 0)
9
+ const isUnread = count > 0 || unreadReaction;
10
+ if (!isUnread)
10
11
  return null;
11
- if (showDot)
12
- return _jsx(View, { style: styles.dot });
13
- return (_jsx(View, { style: styles.badge, children: _jsx(Text, { variant: "footnote", style: styles.count, children: displayCount }) }));
12
+ if (showDot || count === 0)
13
+ return <View style={styles.dot}/>;
14
+ return (<View style={styles.badge}>
15
+ <Text variant="footnote" style={styles.count}>
16
+ {displayCount}
17
+ </Text>
18
+ </View>);
14
19
  };
15
20
  const useStyles = () => {
16
21
  const { colors } = useTheme();
17
22
  const dotScaleLimit = MAX_FONT_SIZE_MULTIPLIER * 1.5;
18
23
  const fontScale = useFontScale({ maxFontSizeMultiplier: dotScaleLimit });
19
- const size = 8 * fontScale;
24
+ const size = 10 * fontScale;
20
25
  return StyleSheet.create({
21
26
  badge: {
22
27
  alignSelf: 'flex-end',
@@ -1 +1 @@
1
- {"version":3,"file":"unread_count_badge.js","sourceRoot":"","sources":["../../../src/components/conversations/unread_count_badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAuC,EAAE,EAAE;IAC1F,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,YAAY,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;IAE/C,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAC5B,IAAI,OAAO;QAAE,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,GAAI,CAAA;IAE/C,OAAO,CACL,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,YACvB,KAAC,IAAI,IAAC,OAAO,EAAC,UAAU,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,YACzC,YAAY,GACR,GACF,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,aAAa,GAAG,wBAAwB,GAAG,GAAG,CAAA;IACpD,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,qBAAqB,EAAE,aAAa,EAAE,CAAC,CAAA;IACxE,MAAM,IAAI,GAAG,CAAC,GAAG,SAAS,CAAA;IAE1B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,KAAK,EAAE;YACL,SAAS,EAAE,UAAU;YACrB,eAAe,EAAE,MAAM,CAAC,2BAA2B;YACnD,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,CAAC;YACpB,YAAY,EAAE,EAAE,GAAG,SAAS;SAC7B;QACD,KAAK,EAAE;YACL,UAAU,EAAE,sBAAsB;YAClC,KAAK,EAAE,OAAO;SACf;QACD,GAAG,EAAE;YACH,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,MAAM,CAAC,2BAA2B;SACpD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useFontScale, useTheme } from '../../hooks'\nimport { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightBold } from '../../utils'\nimport { Text } from '../display'\n\nexport const UnreadCountBadge = ({ count, showDot }: { count: number; showDot: boolean }) => {\n const styles = useStyles()\n const displayCount = count > 99 ? '99+' : count\n\n if (count === 0) return null\n if (showDot) return <View style={styles.dot} />\n\n return (\n <View style={styles.badge}>\n <Text variant=\"footnote\" style={styles.count}>\n {displayCount}\n </Text>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const dotScaleLimit = MAX_FONT_SIZE_MULTIPLIER * 1.5\n const fontScale = useFontScale({ maxFontSizeMultiplier: dotScaleLimit })\n const size = 8 * fontScale\n\n return StyleSheet.create({\n badge: {\n alignSelf: 'flex-end',\n backgroundColor: colors.fillColorInteractionDefault,\n paddingVertical: 2,\n paddingHorizontal: 8,\n borderRadius: 24 * fontScale,\n },\n count: {\n fontWeight: platformFontWeightBold,\n color: 'white',\n },\n dot: {\n width: size,\n height: size,\n borderRadius: size,\n backgroundColor: colors.fillColorInteractionDefault,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"unread_count_badge.js","sourceRoot":"","sources":["../../../src/components/conversations/unread_count_badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,cAAc,EACd,OAAO,GAKR,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,YAAY,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;IAC/C,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,IAAI,cAAc,CAAA;IAE5C,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAA;IAC1B,IAAI,OAAO,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAG,CAAA;IAE9D,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACxB;MAAA,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAC3C;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,aAAa,GAAG,wBAAwB,GAAG,GAAG,CAAA;IACpD,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,qBAAqB,EAAE,aAAa,EAAE,CAAC,CAAA;IACxE,MAAM,IAAI,GAAG,EAAE,GAAG,SAAS,CAAA;IAE3B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,KAAK,EAAE;YACL,SAAS,EAAE,UAAU;YACrB,eAAe,EAAE,MAAM,CAAC,2BAA2B;YACnD,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,CAAC;YACpB,YAAY,EAAE,EAAE,GAAG,SAAS;SAC7B;QACD,KAAK,EAAE;YACL,UAAU,EAAE,sBAAsB;YAClC,KAAK,EAAE,OAAO;SACf;QACD,GAAG,EAAE;YACH,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,MAAM,CAAC,2BAA2B;SACpD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useFontScale, useTheme } from '../../hooks'\nimport { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightBold } from '../../utils'\nimport { Text } from '../display'\n\nexport const UnreadCountBadge = ({\n count,\n unreadReaction,\n showDot,\n}: {\n count: number\n unreadReaction: boolean\n showDot: boolean\n}) => {\n const styles = useStyles()\n const displayCount = count > 99 ? '99+' : count\n const isUnread = count > 0 || unreadReaction\n\n if (!isUnread) return null\n if (showDot || count === 0) return <View style={styles.dot} />\n\n return (\n <View style={styles.badge}>\n <Text variant=\"footnote\" style={styles.count}>\n {displayCount}\n </Text>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const dotScaleLimit = MAX_FONT_SIZE_MULTIPLIER * 1.5\n const fontScale = useFontScale({ maxFontSizeMultiplier: dotScaleLimit })\n const size = 10 * fontScale\n\n return StyleSheet.create({\n badge: {\n alignSelf: 'flex-end',\n backgroundColor: colors.fillColorInteractionDefault,\n paddingVertical: 2,\n paddingHorizontal: 8,\n borderRadius: 24 * fontScale,\n },\n count: {\n fontWeight: platformFontWeightBold,\n color: 'white',\n },\n dot: {\n width: size,\n height: size,\n borderRadius: size,\n backgroundColor: colors.fillColorInteractionDefault,\n },\n })\n}\n"]}
@@ -11,5 +11,5 @@ export declare const ActionButton: ({ visible, disabled, onPress, title, infoTex
11
11
  secondaryButton?: React.ReactNode;
12
12
  loading?: boolean;
13
13
  warnings?: ConversationWarning[];
14
- }) => import("react/jsx-runtime").JSX.Element | null;
14
+ }) => React.JSX.Element | null;
15
15
  //# sourceMappingURL=action_button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/action_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAKvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAIjD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAGnC,eAAO,MAAM,YAAY,GAAI,0GAU1B;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kBAAkB,CAAC,EAAE,UAAU,CAAA;IAC/B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAA;CACjC,mDAiDA,CAAA"}
1
+ {"version":3,"file":"action_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/action_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAKvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAIjD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAGnC,eAAO,MAAM,YAAY,GAAI,0GAU1B;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kBAAkB,CAAC,EAAE,UAAU,CAAA;IAC/B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAA;CACjC,6BAiDA,CAAA"}
@@ -1,5 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
1
+ import React, { useState } from 'react';
3
2
  import { useEffect } from 'react';
4
3
  import { Animated, LayoutAnimation, StyleSheet, useWindowDimensions, View } from 'react-native';
5
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -19,7 +18,18 @@ export const ActionButton = ({ visible = true, disabled = false, onPress, title,
19
18
  }, [show, visible]);
20
19
  if (!visible)
21
20
  return null;
22
- return (_jsxs(Animated.View, { style: styles.container, children: [warnings.length > 0 && (_jsx(View, { style: styles.warnings, children: warnings.map((warning, index) => (_jsx(Banner, { appearance: "error", description: warning.fullMessage }, `${warning.attribute}-${index}`))) })), Boolean(infoText) && (_jsx(Text, { style: styles.infoText, variant: "footnote", children: infoText })), _jsxs(View, { style: styles.buttonRow, children: [secondaryButton, _jsx(Button, { variant: "fill", size: "lg", onPress: onPress, title: title, disabled: disabled, style: secondaryButton ? null : styles.fullWidthButton, iconNameLeft: buttonIconNameLeft, loading: loading, maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER_LANDMARK, accessibilityShowsLargeContentViewer: true, accessibilityLargeContentTitle: title })] })] }));
21
+ return (<Animated.View style={styles.container}>
22
+ {warnings.length > 0 && (<View style={styles.warnings}>
23
+ {warnings.map((warning, index) => (<Banner key={`${warning.attribute}-${index}`} appearance="error" description={warning.fullMessage}/>))}
24
+ </View>)}
25
+ {Boolean(infoText) && (<Text style={styles.infoText} variant="footnote">
26
+ {infoText}
27
+ </Text>)}
28
+ <View style={styles.buttonRow}>
29
+ {secondaryButton}
30
+ <Button variant="fill" size="lg" onPress={onPress} title={title} disabled={disabled} style={secondaryButton ? null : styles.fullWidthButton} iconNameLeft={buttonIconNameLeft} loading={loading} maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK} accessibilityShowsLargeContentViewer accessibilityLargeContentTitle={title}/>
31
+ </View>
32
+ </Animated.View>);
23
33
  };
24
34
  const useStyles = () => {
25
35
  const { fontScale } = useWindowDimensions();
@@ -1 +1 @@
1
- {"version":3,"file":"action_button.js","sourceRoot":"","sources":["../../../src/components/display/action_button.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,MAAM,CAAC,MAAM,YAAY,GAAG,CA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C,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useState } from 'react'\nimport { useEffect } from 'react'\nimport { Animated, LayoutAnimation, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useTheme } from '../../hooks'\nimport { ConversationWarning } from '../../types'\nimport { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '../../utils'\nimport { Banner } from './banner'\nimport { Button } from './button'\nimport { IconString } from './icon'\nimport { Text } from './text'\n\nexport const ActionButton = ({\n visible = true,\n disabled = false,\n onPress,\n title,\n infoText,\n buttonIconNameLeft,\n secondaryButton,\n loading = false,\n warnings = [],\n}: {\n visible?: boolean\n disabled?: boolean\n onPress: () => void\n title: string\n infoText?: string\n buttonIconNameLeft?: IconString\n secondaryButton?: React.ReactNode\n loading?: boolean\n warnings?: ConversationWarning[]\n}) => {\n const styles = useStyles()\n const [show, setShow] = useState(visible)\n\n useEffect(() => {\n if (show === visible) return\n\n setShow(visible)\n LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)\n }, [show, visible])\n\n if (!visible) return null\n\n return (\n <Animated.View style={styles.container}>\n {warnings.length > 0 && (\n <View style={styles.warnings}>\n {warnings.map((warning, index) => (\n <Banner\n key={`${warning.attribute}-${index}`}\n appearance=\"error\"\n description={warning.fullMessage}\n />\n ))}\n </View>\n )}\n {Boolean(infoText) && (\n <Text style={styles.infoText} variant=\"footnote\">\n {infoText}\n </Text>\n )}\n <View style={styles.buttonRow}>\n {secondaryButton}\n <Button\n variant=\"fill\"\n size=\"lg\"\n onPress={onPress}\n title={title}\n disabled={disabled}\n style={secondaryButton ? null : styles.fullWidthButton}\n iconNameLeft={buttonIconNameLeft}\n loading={loading}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n accessibilityShowsLargeContentViewer\n accessibilityLargeContentTitle={title}\n />\n </View>\n </Animated.View>\n )\n}\n\nconst useStyles = () => {\n const { fontScale } = useWindowDimensions()\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n const containerVerticalPadding = 16\n\n return StyleSheet.create({\n container: {\n backgroundColor: colors.surfaceColor090,\n paddingHorizontal: 24,\n paddingTop: containerVerticalPadding,\n paddingBottom: bottom + containerVerticalPadding,\n borderTopWidth: 1,\n borderTopColor: colors.borderColorDefaultDim,\n gap: 16,\n },\n buttonRow: {\n flexDirection: 'row',\n justifyContent: fontScale > 1 ? 'center' : 'space-between',\n alignItems: 'center',\n gap: 16,\n flexWrap: 'wrap-reverse',\n },\n fullWidthButton: {\n flexGrow: 1,\n },\n infoText: {\n textAlign: 'center',\n },\n warnings: {\n gap: 8,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"action_button.js","sourceRoot":"","sources":["../../../src/components/display/action_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,GAAG,IAAI,EACd,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,EAAE,GAWd,EAAE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ACP,QAAQ,EAAE,cAAc;SACzB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,CAAC;SACZ;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,QAAQ;SACpB;QACD,QAAQ,EAAE;YACR,GAAG,EAAE,CAAC;SACP;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useState } from 'react'\nimport { useEffect } from 'react'\nimport { Animated, LayoutAnimation, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useTheme } from '../../hooks'\nimport { ConversationWarning } from '../../types'\nimport { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '../../utils'\nimport { Banner } from './banner'\nimport { Button } from './button'\nimport { IconString } from './icon'\nimport { Text } from './text'\n\nexport const ActionButton = ({\n visible = true,\n disabled = false,\n onPress,\n title,\n infoText,\n buttonIconNameLeft,\n secondaryButton,\n loading = false,\n warnings = [],\n}: {\n visible?: boolean\n disabled?: boolean\n onPress: () => void\n title: string\n infoText?: string\n buttonIconNameLeft?: IconString\n secondaryButton?: React.ReactNode\n loading?: boolean\n warnings?: ConversationWarning[]\n}) => {\n const styles = useStyles()\n const [show, setShow] = useState(visible)\n\n useEffect(() => {\n if (show === visible) return\n\n setShow(visible)\n LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)\n }, [show, visible])\n\n if (!visible) return null\n\n return (\n <Animated.View style={styles.container}>\n {warnings.length > 0 && (\n <View style={styles.warnings}>\n {warnings.map((warning, index) => (\n <Banner\n key={`${warning.attribute}-${index}`}\n appearance=\"error\"\n description={warning.fullMessage}\n />\n ))}\n </View>\n )}\n {Boolean(infoText) && (\n <Text style={styles.infoText} variant=\"footnote\">\n {infoText}\n </Text>\n )}\n <View style={styles.buttonRow}>\n {secondaryButton}\n <Button\n variant=\"fill\"\n size=\"lg\"\n onPress={onPress}\n title={title}\n disabled={disabled}\n style={secondaryButton ? null : styles.fullWidthButton}\n iconNameLeft={buttonIconNameLeft}\n loading={loading}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n accessibilityShowsLargeContentViewer\n accessibilityLargeContentTitle={title}\n />\n </View>\n </Animated.View>\n )\n}\n\nconst useStyles = () => {\n const { fontScale } = useWindowDimensions()\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n const containerVerticalPadding = 16\n\n return StyleSheet.create({\n container: {\n backgroundColor: colors.surfaceColor090,\n paddingHorizontal: 24,\n paddingTop: containerVerticalPadding,\n paddingBottom: bottom + containerVerticalPadding,\n borderTopWidth: 1,\n borderTopColor: colors.borderColorDefaultDim,\n gap: 16,\n },\n buttonRow: {\n flexDirection: 'row',\n justifyContent: fontScale > 1 ? 'center' : 'space-between',\n alignItems: 'center',\n gap: 16,\n flexWrap: 'wrap-reverse',\n },\n fullWidthButton: {\n flexGrow: 1,\n },\n infoText: {\n textAlign: 'center',\n },\n warnings: {\n gap: 8,\n },\n })\n}\n"]}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import type { ViewStyle } from 'react-native';
2
3
  interface AdultRequirementNoticeProps {
3
4
  style?: ViewStyle;
4
5
  }
5
- export declare function AdultRequirementNotice({ style }: AdultRequirementNoticeProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function AdultRequirementNotice({ style }: AdultRequirementNoticeProps): React.JSX.Element;
6
7
  export {};
7
8
  //# sourceMappingURL=adult_requirement_notice.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adult_requirement_notice.d.ts","sourceRoot":"","sources":["../../../src/components/display/adult_requirement_notice.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAK7C,UAAU,2BAA2B;IACnC,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,2BAA2B,2CAW5E"}
1
+ {"version":3,"file":"adult_requirement_notice.d.ts","sourceRoot":"","sources":["../../../src/components/display/adult_requirement_notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAK7C,UAAU,2BAA2B;IACnC,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,2BAA2B,qBAW5E"}
@@ -1,8 +1,10 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { ADULT_REQUIREMENT_BODY } from '../../utils';
3
3
  import BannerPrimitive from '../primitive/banner_primitive';
4
4
  import { BannerCollapsible } from './banner_collapsible';
5
5
  export function AdultRequirementNotice({ style }) {
6
- return (_jsx(BannerCollapsible, { appearance: "warning", iconName: "general.shieldExclamation", heading: "2 adults required to chat", style: style, children: _jsx(BannerPrimitive.Text, { children: ADULT_REQUIREMENT_BODY }) }));
6
+ return (<BannerCollapsible appearance="warning" iconName="general.shieldExclamation" heading="2 adults required to chat" style={style}>
7
+ <BannerPrimitive.Text>{ADULT_REQUIREMENT_BODY}</BannerPrimitive.Text>
8
+ </BannerCollapsible>);
7
9
  }
8
10
  //# sourceMappingURL=adult_requirement_notice.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"adult_requirement_notice.js","sourceRoot":"","sources":["../../../src/components/display/adult_requirement_notice.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,eAAe,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAMxD,MAAM,UAAU,sBAAsB,CAAC,EAAE,KAAK,EAA+B;IAC3E,OAAO,CACL,KAAC,iBAAiB,IAChB,UAAU,EAAC,SAAS,EACpB,QAAQ,EAAC,2BAA2B,EACpC,OAAO,EAAC,2BAA2B,EACnC,KAAK,EAAE,KAAK,YAEZ,KAAC,eAAe,CAAC,IAAI,cAAE,sBAAsB,GAAwB,GACnD,CACrB,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport type { ViewStyle } from 'react-native'\nimport { ADULT_REQUIREMENT_BODY } from '../../utils'\nimport BannerPrimitive from '../primitive/banner_primitive'\nimport { BannerCollapsible } from './banner_collapsible'\n\ninterface AdultRequirementNoticeProps {\n style?: ViewStyle\n}\n\nexport function AdultRequirementNotice({ style }: AdultRequirementNoticeProps) {\n return (\n <BannerCollapsible\n appearance=\"warning\"\n iconName=\"general.shieldExclamation\"\n heading=\"2 adults required to chat\"\n style={style}\n >\n <BannerPrimitive.Text>{ADULT_REQUIREMENT_BODY}</BannerPrimitive.Text>\n </BannerCollapsible>\n )\n}\n"]}
1
+ {"version":3,"file":"adult_requirement_notice.js","sourceRoot":"","sources":["../../../src/components/display/adult_requirement_notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,eAAe,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAMxD,MAAM,UAAU,sBAAsB,CAAC,EAAE,KAAK,EAA+B;IAC3E,OAAO,CACL,CAAC,iBAAiB,CAChB,UAAU,CAAC,SAAS,CACpB,QAAQ,CAAC,2BAA2B,CACpC,OAAO,CAAC,2BAA2B,CACnC,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;MAAA,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,sBAAsB,CAAC,EAAE,eAAe,CAAC,IAAI,CACtE;IAAA,EAAE,iBAAiB,CAAC,CACrB,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport type { ViewStyle } from 'react-native'\nimport { ADULT_REQUIREMENT_BODY } from '../../utils'\nimport BannerPrimitive from '../primitive/banner_primitive'\nimport { BannerCollapsible } from './banner_collapsible'\n\ninterface AdultRequirementNoticeProps {\n style?: ViewStyle\n}\n\nexport function AdultRequirementNotice({ style }: AdultRequirementNoticeProps) {\n return (\n <BannerCollapsible\n appearance=\"warning\"\n iconName=\"general.shieldExclamation\"\n heading=\"2 adults required to chat\"\n style={style}\n >\n <BannerPrimitive.Text>{ADULT_REQUIREMENT_BODY}</BannerPrimitive.Text>\n </BannerCollapsible>\n )\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { type AvatarImageProps, type AvatarPresenceProps, type AvatarRootProps } from '../primitive/avatar_primitive';
2
3
  import { type IconString } from './icon';
3
4
  interface AvatarProps {
@@ -10,6 +11,6 @@ interface AvatarProps {
10
11
  maxFontSizeMultiplier?: AvatarRootProps['maxFontSizeMultiplier'];
11
12
  minFontSizeMultiplier?: AvatarRootProps['minFontSizeMultiplier'];
12
13
  }
13
- export declare function Avatar({ presence, size, sourceUri, showFallback, fallbackIconName, style, maxFontSizeMultiplier, minFontSizeMultiplier, }: AvatarProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function Avatar({ presence, size, sourceUri, showFallback, fallbackIconName, style, maxFontSizeMultiplier, minFontSizeMultiplier, }: AvatarProps): React.JSX.Element;
14
15
  export {};
15
16
  //# sourceMappingURL=avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/display/avatar.tsx"],"names":[],"mappings":"AACA,OAAwB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAA;AAExC,UAAU,WAAW;IACnB,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IACxC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAA;IAC1C,YAAY,CA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