@planningcenter/chat-react-native 3.42.2-qa-staging.1 → 3.42.2-qa-821.0
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.
- package/build/components/conversation/attachments/attachment_card.d.ts +3 -3
- package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_card.js +3 -7
- package/build/components/conversation/attachments/attachment_card.js.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +1 -2
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +12 -7
- package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +6 -23
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts +1 -2
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +2 -8
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +2 -12
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +2 -7
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +16 -53
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/video_attachment.js +3 -13
- package/build/components/conversation/attachments/video_attachment.js.map +1 -1
- package/build/components/conversation/conversation_start_banner.d.ts +1 -2
- package/build/components/conversation/conversation_start_banner.d.ts.map +1 -1
- package/build/components/conversation/conversation_start_banner.js +2 -14
- package/build/components/conversation/conversation_start_banner.js.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js +2 -9
- package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +2 -10
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message.d.ts +1 -2
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +2 -53
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +1 -2
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +17 -21
- package/build/components/conversation/message_attachments.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_file.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
- package/build/components/conversation/message_form.d.ts +5 -6
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +20 -82
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_markdown.d.ts +1 -2
- package/build/components/conversation/message_markdown.d.ts.map +1 -1
- package/build/components/conversation/message_markdown.js +8 -16
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +1 -2
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversation/message_reaction.js +3 -5
- package/build/components/conversation/message_reaction.js.map +1 -1
- package/build/components/conversation/message_read_receipts.d.ts +1 -2
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
- package/build/components/conversation/message_read_receipts.js +3 -13
- package/build/components/conversation/message_read_receipts.js.map +1 -1
- package/build/components/conversation/messages_disabled_banners.d.ts +3 -3
- package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +5 -8
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/conversation/reply_connectors.d.ts +2 -2
- package/build/components/conversation/reply_connectors.d.ts.map +1 -1
- package/build/components/conversation/reply_connectors.js +18 -50
- package/build/components/conversation/reply_connectors.js.map +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts +1 -2
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
- package/build/components/conversation/reply_shadow_message.js +16 -46
- package/build/components/conversation/reply_shadow_message.js.map +1 -1
- package/build/components/conversation/system_message.d.ts +1 -2
- package/build/components/conversation/system_message.d.ts.map +1 -1
- package/build/components/conversation/system_message.js +3 -12
- package/build/components/conversation/system_message.js.map +1 -1
- package/build/components/conversation/typing_indicator.d.ts +1 -2
- package/build/components/conversation/typing_indicator.d.ts.map +1 -1
- package/build/components/conversation/typing_indicator.js +3 -13
- package/build/components/conversation/typing_indicator.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts +2 -2
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +4 -10
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts +2 -3
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +12 -76
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.d.ts +1 -1
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +16 -17
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/conversations_blank_state.d.ts +1 -2
- package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
- package/build/components/conversations/conversations_blank_state.js +2 -12
- package/build/components/conversations/conversations_blank_state.js.map +1 -1
- package/build/components/conversations/mute_indicator.d.ts +1 -2
- package/build/components/conversations/mute_indicator.d.ts.map +1 -1
- package/build/components/conversations/mute_indicator.js +2 -2
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts +1 -2
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +3 -10
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.d.ts +2 -4
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
- package/build/components/conversations/unread_count_badge.js +7 -12
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.d.ts +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +3 -13
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/adult_requirement_notice.d.ts +1 -2
- package/build/components/display/adult_requirement_notice.d.ts.map +1 -1
- package/build/components/display/adult_requirement_notice.js +2 -4
- package/build/components/display/adult_requirement_notice.js.map +1 -1
- package/build/components/display/avatar.d.ts +1 -2
- package/build/components/display/avatar.d.ts.map +1 -1
- package/build/components/display/avatar.js +2 -7
- package/build/components/display/avatar.js.map +1 -1
- package/build/components/display/avatar_group.d.ts +1 -2
- package/build/components/display/avatar_group.d.ts.map +1 -1
- package/build/components/display/avatar_group.js +2 -9
- package/build/components/display/avatar_group.js.map +1 -1
- package/build/components/display/badge.d.ts +1 -2
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +6 -37
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/banner.d.ts +3 -3
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +4 -11
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.d.ts +2 -2
- package/build/components/display/banner_collapsible.d.ts.map +1 -1
- package/build/components/display/banner_collapsible.js +2 -10
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/button.d.ts +1 -2
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +3 -14
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.d.ts +1 -2
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +3 -15
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/conversation_avatar.d.ts +1 -2
- package/build/components/display/conversation_avatar.d.ts.map +1 -1
- package/build/components/display/conversation_avatar.js +5 -9
- package/build/components/display/conversation_avatar.js.map +1 -1
- package/build/components/display/emoji_avatar.d.ts +1 -2
- package/build/components/display/emoji_avatar.d.ts.map +1 -1
- package/build/components/display/emoji_avatar.js +2 -12
- package/build/components/display/emoji_avatar.js.map +1 -1
- package/build/components/display/file_attachment_preview.d.ts +1 -1
- package/build/components/display/file_attachment_preview.d.ts.map +1 -1
- package/build/components/display/file_attachment_preview.js +3 -17
- package/build/components/display/file_attachment_preview.js.map +1 -1
- package/build/components/display/heading.d.ts +1 -2
- package/build/components/display/heading.d.ts.map +1 -1
- package/build/components/display/heading.js +2 -4
- package/build/components/display/heading.js.map +1 -1
- package/build/components/display/icon.d.ts +1 -2
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +4 -4
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_avatar.d.ts +1 -2
- package/build/components/display/icon_avatar.d.ts.map +1 -1
- package/build/components/display/icon_avatar.js +2 -12
- package/build/components/display/icon_avatar.js.map +1 -1
- package/build/components/display/icon_button.d.ts +1 -2
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js +3 -5
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/image.d.ts +1 -2
- package/build/components/display/image.d.ts.map +1 -1
- package/build/components/display/image.js +3 -7
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/image_attachment_preview.d.ts +1 -1
- package/build/components/display/image_attachment_preview.d.ts.map +1 -1
- package/build/components/display/image_attachment_preview.js +2 -7
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/keyboard_view.d.ts +1 -2
- package/build/components/display/keyboard_view.d.ts.map +1 -1
- package/build/components/display/keyboard_view.js +4 -9
- package/build/components/display/keyboard_view.js.map +1 -1
- package/build/components/display/person.d.ts +1 -2
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +2 -12
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +3 -3
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +5 -10
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/display/pressable_row.d.ts +1 -1
- package/build/components/display/pressable_row.d.ts.map +1 -1
- package/build/components/display/pressable_row.js +2 -7
- package/build/components/display/pressable_row.js.map +1 -1
- package/build/components/display/spinner.d.ts +1 -2
- package/build/components/display/spinner.d.ts.map +1 -1
- package/build/components/display/spinner.js +3 -9
- package/build/components/display/spinner.js.map +1 -1
- package/build/components/display/switch.d.ts +1 -2
- package/build/components/display/switch.d.ts.map +1 -1
- package/build/components/display/switch.js +2 -2
- package/build/components/display/switch.js.map +1 -1
- package/build/components/display/tabs.d.ts +1 -1
- package/build/components/display/tabs.d.ts.map +1 -1
- package/build/components/display/tabs.js +21 -31
- package/build/components/display/tabs.js.map +1 -1
- package/build/components/display/text.d.ts +1 -2
- package/build/components/display/text.d.ts.map +1 -1
- package/build/components/display/text.js +2 -4
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/text_button.d.ts +1 -2
- package/build/components/display/text_button.d.ts.map +1 -1
- package/build/components/display/text_button.js +3 -8
- package/build/components/display/text_button.js.map +1 -1
- package/build/components/display/text_inline_button.d.ts +1 -2
- package/build/components/display/text_inline_button.d.ts.map +1 -1
- package/build/components/display/text_inline_button.js +4 -5
- package/build/components/display/text_inline_button.js.map +1 -1
- package/build/components/display/text_input.d.ts +1 -1
- package/build/components/display/text_input.d.ts.map +1 -1
- package/build/components/display/text_input.js +2 -1
- package/build/components/display/text_input.js.map +1 -1
- package/build/components/display/toggle_button.d.ts +1 -2
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +3 -9
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/video_attachment_preview.d.ts +1 -1
- package/build/components/display/video_attachment_preview.d.ts.map +1 -1
- package/build/components/display/video_attachment_preview.js +3 -20
- package/build/components/display/video_attachment_preview.js.map +1 -1
- package/build/components/group_conversation_list.d.ts +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +4 -14
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/page/component_error_boundary.d.ts +2 -2
- package/build/components/page/component_error_boundary.d.ts.map +1 -1
- package/build/components/page/component_error_boundary.js +2 -4
- package/build/components/page/component_error_boundary.js.map +1 -1
- package/build/components/page/loading.d.ts +1 -2
- package/build/components/page/loading.d.ts.map +1 -1
- package/build/components/page/loading.js +2 -4
- package/build/components/page/loading.js.map +1 -1
- package/build/components/page/page_error_boundary.d.ts +2 -2
- package/build/components/page/page_error_boundary.d.ts.map +1 -1
- package/build/components/page/page_error_boundary.js +11 -32
- package/build/components/page/page_error_boundary.js.map +1 -1
- package/build/components/primitive/avatar_primitive.js +14 -41
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.js +10 -18
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/components/primitive/blank_state_primitive.js +8 -12
- package/build/components/primitive/blank_state_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +1 -1
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +9 -22
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/components/safe_area_modal.d.ts +1 -1
- package/build/components/safe_area_modal.d.ts.map +1 -1
- package/build/components/safe_area_modal.js +2 -3
- package/build/components/safe_area_modal.js.map +1 -1
- package/build/contexts/api_provider.d.ts +1 -2
- package/build/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +3 -5
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +1 -1
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +2 -1
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversation_context.d.ts +2 -2
- package/build/contexts/conversation_context.d.ts.map +1 -1
- package/build/contexts/conversation_context.js +3 -2
- package/build/contexts/conversation_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +2 -2
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +3 -2
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts +1 -1
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +3 -2
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/use_animated_message_background_color.d.ts +2 -2
- package/build/hooks/use_conversation.d.ts +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +0 -2
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +19 -4
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_conversation_membership.d.ts +1 -1
- package/build/hooks/use_conversation_membership.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +1 -0
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +2 -2
- package/build/hooks/use_conversation_messages.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +36 -36
- package/build/hooks/use_conversations_actions.d.ts.map +1 -1
- package/build/hooks/use_conversations_actions.js +1 -3
- package/build/hooks/use_conversations_actions.js.map +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
- package/build/hooks/use_mark_latest_message_read.js +4 -3
- package/build/hooks/use_mark_latest_message_read.js.map +1 -1
- package/build/hooks/use_person_settings.d.ts +1 -1
- package/build/index.d.ts +2 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js.map +1 -1
- package/build/navigation/chat_access_gate.d.ts +2 -2
- package/build/navigation/chat_access_gate.d.ts.map +1 -1
- package/build/navigation/chat_access_gate.js +6 -5
- package/build/navigation/chat_access_gate.js.map +1 -1
- package/build/navigation/index.d.ts +35 -36
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +19 -21
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.d.ts +2 -2
- package/build/navigation/screenLayout.d.ts.map +1 -1
- package/build/navigation/screenLayout.js +3 -9
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/EventTarget.d.ts +1 -1
- package/build/polyfills/events/EventTarget.d.ts.map +1 -1
- package/build/polyfills/events/EventTarget.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts +1 -2
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_required_screen.js +3 -46
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts +1 -2
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +2 -25
- package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +1 -2
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js +6 -25
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts +1 -2
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +3 -5
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts +1 -2
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.js +9 -36
- package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.js +5 -9
- package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
- package/build/screens/avatar_picker/color_picker.d.ts +1 -2
- package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
- package/build/screens/avatar_picker/color_picker.js +4 -5
- package/build/screens/avatar_picker/color_picker.js.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.d.ts +1 -2
- package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.js +12 -13
- package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
- package/build/screens/avatar_picker/icon_grid.d.ts +1 -2
- package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
- package/build/screens/avatar_picker/icon_grid.js +4 -5
- package/build/screens/avatar_picker/icon_grid.js.map +1 -1
- package/build/screens/avatar_picker/upload_tab.d.ts +1 -2
- package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/upload_tab.js +3 -4
- package/build/screens/avatar_picker/upload_tab.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts +1 -2
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +11 -117
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.d.ts +1 -2
- package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.js +4 -20
- package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts +1 -2
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +43 -106
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +3 -9
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.js +2 -12
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +20 -44
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts +1 -2
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +10 -11
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +6 -6
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +7 -34
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +2 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts +1 -2
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/group_filters.js +2 -2
- package/build/screens/conversation_filters/group_filters.js.map +1 -1
- package/build/screens/conversation_filters/team_filters.d.ts +1 -2
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/team_filters.js +2 -2
- package/build/screens/conversation_filters/team_filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts +1 -2
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +4 -16
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts +2 -3
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.js +6 -16
- package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.d.ts +3 -4
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +22 -46
- package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +2 -3
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js +4 -6
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +1 -2
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.js +4 -20
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts +1 -2
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +4 -30
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts +1 -2
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +27 -61
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js +2 -3
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +1 -2
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js +4 -4
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.d.ts +1 -2
- package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +4 -6
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +2 -3
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +25 -66
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +2 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +1 -2
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +2 -15
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -2
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +2 -14
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +2 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +2 -5
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -11
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +11 -83
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +7 -14
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +15 -18
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +1 -2
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_type_screen.js +3 -10
- package/build/screens/conversation_select_type_screen.js.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.d.ts +1 -2
- package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.js +3 -4
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts +1 -2
- package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +3 -5
- package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts +1 -2
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +19 -42
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +1 -2
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +2 -6
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.d.ts +1 -2
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +35 -558
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts +1 -1
- package/build/screens/get_help_screen.d.ts.map +1 -1
- package/build/screens/get_help_screen.js +4 -25
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_level_select_screen.d.ts +1 -2
- package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/group_notification_level_select_screen.js +2 -4
- package/build/screens/group_notification_level_select_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.d.ts +1 -2
- package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
- package/build/screens/group_notification_settings_screen.js +3 -25
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts +1 -2
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js +12 -28
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +1 -2
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
- package/build/screens/message_report/components/message_preview.js +2 -22
- package/build/screens/message_report/components/message_preview.js.map +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts +1 -2
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
- package/build/screens/message_report/components/report_reason_list.js +4 -13
- package/build/screens/message_report/components/report_reason_list.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +1 -2
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +9 -61
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/not_found.d.ts +1 -2
- package/build/screens/not_found.d.ts.map +1 -1
- package/build/screens/not_found.js +2 -5
- package/build/screens/not_found.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.d.ts +1 -2
- package/build/screens/notification_settings_screen.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.js +28 -66
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.d.ts +1 -2
- package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
- package/build/screens/preferred_app_selection_screen.js +3 -21
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/reactions_screen.d.ts +1 -2
- package/build/screens/reactions_screen.d.ts.map +1 -1
- package/build/screens/reactions_screen.js +7 -19
- package/build/screens/reactions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts +1 -2
- package/build/screens/send_giphy_screen.d.ts.map +1 -1
- package/build/screens/send_giphy_screen.js +5 -31
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/settings_screen.d.ts +1 -2
- package/build/screens/settings_screen.d.ts.map +1 -1
- package/build/screens/settings_screen.js +4 -26
- package/build/screens/settings_screen.js.map +1 -1
- package/build/screens/system_message_people_screen.d.ts +1 -2
- package/build/screens/system_message_people_screen.d.ts.map +1 -1
- package/build/screens/system_message_people_screen.js +4 -10
- package/build/screens/system_message_people_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.d.ts +1 -1
- package/build/screens/team_conversation_screen.d.ts.map +1 -1
- package/build/screens/team_conversation_screen.js +4 -12
- package/build/screens/team_conversation_screen.js.map +1 -1
- package/build/types/resources/conversation.d.ts +1 -10
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +0 -2
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/sha_256.js.map +1 -1
- package/build/utils/system_messages.d.ts +1 -1
- package/build/utils/system_messages.d.ts.map +1 -1
- package/build/utils/system_messages.js.map +1 -1
- package/build/utils/theme.d.ts +2 -2
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js.map +1 -1
- package/package.json +12 -12
- package/src/__tests__/hooks/use_attachment_uploader.test.tsx +1 -0
- package/src/__tests__/hooks/use_font_scale.test.ts +7 -3
- package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
- package/src/__tests__/utils/system_messages.ts +1 -1
- package/src/__tests__/utils/uri.ts +8 -50
- package/src/__utils__/handlers.ts +5 -6
- package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +10 -3
- package/src/components/conversations/conversation_preview.tsx +23 -58
- package/src/components/conversations/unread_count_badge.tsx +4 -13
- package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
- package/src/components/page/__tests__/error_boundary.test.tsx +6 -2
- package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
- package/src/hooks/use_conversation.ts +0 -2
- package/src/hooks/use_conversation_jolt_events.ts +19 -3
- package/src/hooks/use_conversation_messages.ts +6 -5
- package/src/hooks/use_conversations_actions.ts +1 -3
- package/src/hooks/use_mark_latest_message_read.ts +4 -3
- package/src/index.tsx +2 -1
- package/src/polyfills/events/EventTarget.ts +1 -1
- package/src/screens/conversation_screen.tsx +4 -2
- package/src/screens/conversations/components/list_header_component.tsx +6 -6
- package/src/types/resources/conversation.ts +1 -11
- package/src/utils/request/conversation.ts +0 -2
- package/src/utils/sha_256.ts +24 -24
- package/src/utils/system_messages.ts +1 -1
- package/src/utils/theme.ts +3 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
3
|
import colorFunction from 'color';
|
|
3
|
-
import
|
|
4
|
+
import { useMemo } from 'react';
|
|
4
5
|
import { StyleSheet } from 'react-native';
|
|
5
6
|
import { Text } from '../../components/display';
|
|
6
7
|
import { useInteractionGhostBackgroundColor, useTheme } from '../../hooks';
|
|
@@ -25,10 +26,7 @@ export function MessageReaction({ reaction, onLongPress, message, conversationId
|
|
|
25
26
|
Haptic.impactLight();
|
|
26
27
|
handleReactionToggle({ value: reaction.value, mine: !!reaction.mine });
|
|
27
28
|
};
|
|
28
|
-
return (
|
|
29
|
-
<Text style={styles.reactionEmoji}>{REACTION_EMOJIS[reaction.value]}</Text>
|
|
30
|
-
<Text style={styles.reactionText}>{reaction.count}</Text>
|
|
31
|
-
</PlatformPressable>);
|
|
29
|
+
return (_jsxs(PlatformPressable, { style: styles.reaction, onLongPress: () => onLongPress(reaction), onPress: handlePress, android_ripple: { color: androidRippleColor, borderless: false, foreground: true }, children: [_jsx(Text, { style: styles.reactionEmoji, children: REACTION_EMOJIS[reaction.value] }), _jsx(Text, { style: styles.reactionText, children: reaction.count })] }, reaction.value));
|
|
32
30
|
}
|
|
33
31
|
export const useReactionStyles = ({ mine }) => {
|
|
34
32
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_reaction.js","sourceRoot":"","sources":["../../../src/components/conversation/message_reaction.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,aAAa,MAAM,OAAO,CAAA;AACjC,
|
|
1
|
+
{"version":3,"file":"message_reaction.js","sourceRoot":"","sources":["../../../src/components/conversation/message_reaction.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,aAAa,MAAM,OAAO,CAAA;AACjC,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAE,kCAAkC,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAA;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAA;AAGlF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAEpD,MAAM,UAAU,eAAe,CAAC,EAC9B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":["import { PlatformPressable } from '@react-navigation/elements'\nimport colorFunction from 'color'\nimport React, { useMemo } from 'react'\nimport { StyleSheet } from 'react-native'\nimport { Text } from '../../components/display'\nimport { useInteractionGhostBackgroundColor, useTheme } from '../../hooks'\nimport { useCreateAndroidRippleColor } from '../../hooks/use_create_android_ripple_color'\nimport { useMessageReactionToggle } from '../../hooks/use_message_reaction_toggle'\nimport { MessageResource } from '../../types'\nimport { ReactionCountResource } from '../../types/resources/reaction'\nimport { REACTION_EMOJIS } from '../../utils'\nimport { Haptic } from '../../utils/native_adapters'\n\nexport function MessageReaction({\n reaction,\n onLongPress,\n message,\n conversationId,\n}: {\n reaction: ReactionCountResource\n onLongPress: (_reaction: ReactionCountResource) => void\n message: MessageResource\n conversationId: number\n}) {\n const styles = useReactionStyles(reaction)\n const { handleReactionToggle } = useMessageReactionToggle({\n conversation_id: conversationId,\n message,\n })\n\n const { colors } = useTheme()\n const baseRippleColor = reaction.mine ? colors.interaction : colors.fillColorNeutral060\n const androidRippleColor = useCreateAndroidRippleColor({ color: baseRippleColor })\n\n if (!reaction.count) return null\n if (!REACTION_EMOJIS[reaction.value]) return null\n\n const handlePress = () => {\n Haptic.impactLight()\n handleReactionToggle({ value: reaction.value, mine: !!reaction.mine })\n }\n\n return (\n <PlatformPressable\n key={reaction.value}\n style={styles.reaction}\n onLongPress={() => onLongPress(reaction)}\n onPress={handlePress}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n >\n <Text style={styles.reactionEmoji}>{REACTION_EMOJIS[reaction.value]}</Text>\n <Text style={styles.reactionText}>{reaction.count}</Text>\n </PlatformPressable>\n )\n}\n\nexport const useReactionStyles = ({ mine }: { mine: number }) => {\n const { colors } = useTheme()\n const activeBorderColor = useMemo(() => {\n return colorFunction(colors.interaction)\n .hsl()\n .lightness(colors.name === 'dark' ? 20 : 80)\n .string()\n }, [colors.interaction, colors.name])\n const activeBackgroundColor = useInteractionGhostBackgroundColor()\n\n return StyleSheet.create({\n reaction: {\n borderWidth: 1,\n borderColor: mine ? activeBorderColor : 'transparent',\n backgroundColor: mine ? activeBackgroundColor : colors.fillColorNeutral060,\n borderRadius: 16,\n overflow: 'hidden',\n paddingVertical: 4,\n paddingHorizontal: 8,\n flexDirection: 'row',\n alignItems: 'center',\n gap: 2,\n },\n reactionEmoji: { fontSize: 12, paddingTop: 0 },\n reactionText: { fontSize: 12, color: colors.textColorDefaultPrimary },\n })\n}\n"]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { MessageResource } from '../../types';
|
|
3
2
|
interface Props {
|
|
4
3
|
message: MessageResource;
|
|
5
4
|
latestReadMessageSortKey?: string;
|
|
6
5
|
}
|
|
7
|
-
export declare function MessageReadReceipts({ message, latestReadMessageSortKey }: Props):
|
|
6
|
+
export declare function MessageReadReceipts({ message, latestReadMessageSortKey }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=message_read_receipts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_read_receipts.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_read_receipts.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message_read_receipts.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_read_receipts.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG7C,UAAU,KAAK;IACb,OAAO,EAAE,eAAe,CAAA;IACxB,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,EAAE,KAAK,2CAqB/E"}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { useTheme } from '../../hooks';
|
|
4
4
|
import { Icon, Text } from '../display';
|
|
5
5
|
export function MessageReadReceipts({ message, latestReadMessageSortKey }) {
|
|
6
6
|
const styles = useStyles();
|
|
7
7
|
if (!latestReadMessageSortKey || message.id > latestReadMessageSortKey) {
|
|
8
|
-
return (
|
|
9
|
-
<Icon name="general.check" style={styles.icon}/>
|
|
10
|
-
<Text style={styles.badgeText} variant="footnote">
|
|
11
|
-
Sent
|
|
12
|
-
</Text>
|
|
13
|
-
</View>);
|
|
8
|
+
return (_jsxs(View, { style: styles.badgeContainer, children: [_jsx(Icon, { name: "general.check", style: styles.icon }), _jsx(Text, { style: styles.badgeText, variant: "footnote", children: "Sent" })] }));
|
|
14
9
|
}
|
|
15
|
-
return (
|
|
16
|
-
<Icon name="general.checkDouble" style={styles.icon}/>
|
|
17
|
-
<Text style={styles.badgeText} variant="footnote">
|
|
18
|
-
Read
|
|
19
|
-
</Text>
|
|
20
|
-
</View>);
|
|
10
|
+
return (_jsxs(View, { style: styles.badgeContainer, children: [_jsx(Icon, { name: "general.checkDouble", style: styles.icon }), _jsx(Text, { style: styles.badgeText, variant: "footnote", children: "Read" })] }));
|
|
21
11
|
}
|
|
22
12
|
const useStyles = () => {
|
|
23
13
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_read_receipts.js","sourceRoot":"","sources":["../../../src/components/conversation/message_read_receipts.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message_read_receipts.js","sourceRoot":"","sources":["../../../src/components/conversation/message_read_receipts.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAOvC,MAAM,UAAU,mBAAmB,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAS;IAC9E,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,IAAI,CAAC,wBAAwB,IAAI,OAAO,CAAC,EAAE,GAAG,wBAAwB,EAAE,CAAC;QACvE,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,cAAc,aAChC,KAAC,IAAI,IAAC,IAAI,EAAC,eAAe,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,GAAI,EACjD,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,EAAC,UAAU,qBAE1C,IACF,CACR,CAAA;IACH,CAAC;IAED,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,cAAc,aAChC,KAAC,IAAI,IAAC,IAAI,EAAC,qBAAqB,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,GAAI,EACvD,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,EAAC,UAAU,qBAE1C,IACF,CACR,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,cAAc,EAAE;YACd,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,SAAS,EAAE;YACT,UAAU,EAAE,KAAK;SAClB;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { MessageResource } from '../../types'\nimport { Icon, Text } from '../display'\n\ninterface Props {\n message: MessageResource\n latestReadMessageSortKey?: string\n}\n\nexport function MessageReadReceipts({ message, latestReadMessageSortKey }: Props) {\n const styles = useStyles()\n if (!latestReadMessageSortKey || message.id > latestReadMessageSortKey) {\n return (\n <View style={styles.badgeContainer}>\n <Icon name=\"general.check\" style={styles.icon} />\n <Text style={styles.badgeText} variant=\"footnote\">\n Sent\n </Text>\n </View>\n )\n }\n\n return (\n <View style={styles.badgeContainer}>\n <Icon name=\"general.checkDouble\" style={styles.icon} />\n <Text style={styles.badgeText} variant=\"footnote\">\n Read\n </Text>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n badgeContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n badgeText: {\n fontWeight: '600',\n },\n icon: {\n color: colors.iconColorDefaultSecondary,\n },\n })\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ConversationDisabledReason } from '../../types';
|
|
2
|
-
export declare const LeaderMessagesDisabledBanner: () => import("react").JSX.Element;
|
|
3
|
-
export declare const MemberMessagesDisabledBanner: () => import("react").JSX.Element;
|
|
2
|
+
export declare const LeaderMessagesDisabledBanner: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const MemberMessagesDisabledBanner: () => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
interface ConversationDisabledBannerProps {
|
|
5
5
|
disabledReason?: ConversationDisabledReason;
|
|
6
6
|
}
|
|
7
|
-
export declare const ConversationDisabledBanner: ({ disabledReason }: ConversationDisabledBannerProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const ConversationDisabledBanner: ({ disabledReason }: ConversationDisabledBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=messages_disabled_banners.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages_disabled_banners.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/messages_disabled_banners.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAI7D,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"messages_disabled_banners.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/messages_disabled_banners.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAI7D,eAAO,MAAM,4BAA4B,+CAIxC,CAAA;AAED,eAAO,MAAM,4BAA4B,+CASxC,CAAA;AASD,UAAU,+BAA+B;IACvC,cAAc,CAAC,EAAE,0BAA0B,CAAA;CAC5C;AAED,eAAO,MAAM,0BAA0B,GAAI,oBAAoB,+BAA+B,4CAM7F,CAAA"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { StyleSheet, View } from 'react-native';
|
|
2
3
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
4
|
import { useTheme } from '../../hooks';
|
|
4
5
|
import { ADULT_REQUIREMENT_BODY } from '../../utils';
|
|
5
6
|
import { Text } from '../display';
|
|
6
7
|
export const LeaderMessagesDisabledBanner = () => {
|
|
7
|
-
return (
|
|
8
|
+
return (_jsx(MessagesDisabledBanner, { description: "Only leaders can send messages in this conversation." }));
|
|
8
9
|
};
|
|
9
10
|
export const MemberMessagesDisabledBanner = () => {
|
|
10
11
|
const styles = useStyles();
|
|
11
|
-
return (
|
|
12
|
+
return (_jsx(MessagesDisabledBanner, { description: "Only leaders can send messages, but you can still add reactions.", style: styles.memberBanner }));
|
|
12
13
|
};
|
|
13
14
|
const DISABLED_REASON_TEXT = {
|
|
14
15
|
safety_check: ADULT_REQUIREMENT_BODY,
|
|
@@ -18,15 +19,11 @@ const DEFAULT_DISABLED_TEXT = 'This conversation has been disabled.';
|
|
|
18
19
|
export const ConversationDisabledBanner = ({ disabledReason }) => {
|
|
19
20
|
const styles = useStyles();
|
|
20
21
|
const description = (disabledReason && DISABLED_REASON_TEXT[disabledReason]) ?? DEFAULT_DISABLED_TEXT;
|
|
21
|
-
return
|
|
22
|
+
return _jsx(MessagesDisabledBanner, { description: description, style: styles.memberBanner });
|
|
22
23
|
};
|
|
23
24
|
const MessagesDisabledBanner = ({ description, style }) => {
|
|
24
25
|
const styles = useStyles();
|
|
25
|
-
return (
|
|
26
|
-
<Text style={styles.text} variant="tertiary">
|
|
27
|
-
{description}
|
|
28
|
-
</Text>
|
|
29
|
-
</View>);
|
|
26
|
+
return (_jsx(View, { style: [styles.baseBanner, style], children: _jsx(Text, { style: styles.text, variant: "tertiary", children: description }) }));
|
|
30
27
|
};
|
|
31
28
|
const useStyles = () => {
|
|
32
29
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages_disabled_banners.js","sourceRoot":"","sources":["../../../src/components/conversation/messages_disabled_banners.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,EAAE;IAC/C,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"messages_disabled_banners.js","sourceRoot":"","sources":["../../../src/components/conversation/messages_disabled_banners.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,MAAM,CAAC,MAAM,4BAA4B,GAAG,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AM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,UAAU,EAAE;YACV,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,CAAC;YAClB,eAAe,EAAE,MAAM,CAAC,+BAA+B;YACvD,cAAc,EAAE,CAAC;YACjB,cAAc,EAAE,MAAM,CAAC,sBAAsB;SAC9C;QACD,IAAI,EAAE;YACJ,SAAS,EAAE,QAAQ;SACpB;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,EAAE,GAAG,MAAM;YAC1B,YAAY,EAAE,CAAC,MAAM;SACtB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StyleSheet, View, type ViewStyle } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useTheme } from '../../hooks'\nimport type { ConversationDisabledReason } from '../../types'\nimport { ADULT_REQUIREMENT_BODY } from '../../utils'\nimport { Text } from '../display'\n\nexport const LeaderMessagesDisabledBanner = () => {\n return (\n <MessagesDisabledBanner description=\"Only leaders can send messages in this conversation.\" />\n )\n}\n\nexport const MemberMessagesDisabledBanner = () => {\n const styles = useStyles()\n\n return (\n <MessagesDisabledBanner\n description=\"Only leaders can send messages, but you can still add reactions.\"\n style={styles.memberBanner}\n />\n )\n}\n\nconst DISABLED_REASON_TEXT: Record<ConversationDisabledReason, string> = {\n safety_check: ADULT_REQUIREMENT_BODY,\n direct_messages_disabled: 'Direct messages have been turned off by someone in this conversation.',\n}\n\nconst DEFAULT_DISABLED_TEXT = 'This conversation has been disabled.'\n\ninterface ConversationDisabledBannerProps {\n disabledReason?: ConversationDisabledReason\n}\n\nexport const ConversationDisabledBanner = ({ disabledReason }: ConversationDisabledBannerProps) => {\n const styles = useStyles()\n const description =\n (disabledReason && DISABLED_REASON_TEXT[disabledReason]) ?? DEFAULT_DISABLED_TEXT\n\n return <MessagesDisabledBanner description={description} style={styles.memberBanner} />\n}\n\ninterface MessagesDisabledBannerProps {\n description: string\n style?: ViewStyle\n}\n\nconst MessagesDisabledBanner = ({ description, style }: MessagesDisabledBannerProps) => {\n const styles = useStyles()\n\n return (\n <View style={[styles.baseBanner, style]}>\n <Text style={styles.text} variant=\"tertiary\">\n {description}\n </Text>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n baseBanner: {\n paddingHorizontal: 16,\n paddingVertical: 4,\n backgroundColor: colors.statusNeutralComposedBackground,\n borderTopWidth: 1,\n borderTopColor: colors.borderColorDefaultBase,\n },\n text: {\n textAlign: 'center',\n },\n memberBanner: {\n paddingTop: 16,\n paddingBottom: 16 + bottom,\n marginBottom: -bottom,\n },\n })\n}\n"]}
|
|
@@ -4,7 +4,7 @@ interface ReplyConnectorProps {
|
|
|
4
4
|
message: MessageResource;
|
|
5
5
|
messageBubbleHeight: number;
|
|
6
6
|
}
|
|
7
|
-
export declare function TheirReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps): import("react").JSX.Element | null;
|
|
8
|
-
export declare function MyReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps): import("react").JSX.Element | null;
|
|
7
|
+
export declare function TheirReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export declare function MyReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=reply_connectors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reply_connectors.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/reply_connectors.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAS7C,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC,UAAU,mBAAmB;IAC3B,OAAO,EAAE,eAAe,CAAA;IACxB,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"reply_connectors.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/reply_connectors.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAS7C,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC,UAAU,mBAAmB;IAC3B,OAAO,EAAE,eAAe,CAAA;IACxB,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE,mBAAmB,kDAiCxF;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE,mBAAmB,kDA4CrF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { StyleSheet, View } from 'react-native';
|
|
2
3
|
import Svg, { Path } from 'react-native-svg';
|
|
3
4
|
import { useTheme } from '../../hooks';
|
|
@@ -12,9 +13,9 @@ export function TheirReplyConnector({ message, messageBubbleHeight }) {
|
|
|
12
13
|
if (messageBubbleHeight === 0)
|
|
13
14
|
return null; // Prevents UI shifting
|
|
14
15
|
const connectorMap = {
|
|
15
|
-
shortTailCurve:
|
|
16
|
-
shortHeadCurve:
|
|
17
|
-
verticalLine:
|
|
16
|
+
shortTailCurve: _jsx(ShortTailCurveConnector, { height: messageBubbleHeight / 2 }),
|
|
17
|
+
shortHeadCurve: _jsx(ShortHeadCurveConnector, { height: messageBubbleHeight / 2 }),
|
|
18
|
+
verticalLine: _jsx(VerticalLineConnector, {}),
|
|
18
19
|
default: null,
|
|
19
20
|
};
|
|
20
21
|
const getConnectorKey = () => {
|
|
@@ -32,7 +33,7 @@ export function TheirReplyConnector({ message, messageBubbleHeight }) {
|
|
|
32
33
|
if (!ConnectorComponent)
|
|
33
34
|
return null;
|
|
34
35
|
const spacerStyle = nextRendersAuthor ? styles.theirReplyConnectorSpacer : null;
|
|
35
|
-
return (
|
|
36
|
+
return (_jsx(View, { style: [styles.theirReplyConnectorContainer, spacerStyle], children: ConnectorComponent }));
|
|
36
37
|
}
|
|
37
38
|
export function MyReplyConnector({ message, messageBubbleHeight }) {
|
|
38
39
|
const styles = useStyles();
|
|
@@ -40,10 +41,10 @@ export function MyReplyConnector({ message, messageBubbleHeight }) {
|
|
|
40
41
|
if (messageBubbleHeight === 0)
|
|
41
42
|
return null; // Prevents UI shifting
|
|
42
43
|
const connectorMap = {
|
|
43
|
-
longTailCurve: (
|
|
44
|
-
longHeadCurve: (
|
|
45
|
-
verticalLine:
|
|
46
|
-
swirl:
|
|
44
|
+
longTailCurve: (_jsx(LongTailCurveConnector, { height: messageBubbleHeight / 2, style: styles.myReplyConnectorPosition })),
|
|
45
|
+
longHeadCurve: (_jsx(LongHeadCurveConnector, { height: messageBubbleHeight / 2, style: styles.myReplyConnectorPosition })),
|
|
46
|
+
verticalLine: _jsx(VerticalLineConnector, { style: styles.myReplyConnectorPosition }),
|
|
47
|
+
swirl: _jsx(SwirlConnector, { style: styles.myReplyConnectorPosition, height: messageBubbleHeight }),
|
|
47
48
|
default: null,
|
|
48
49
|
};
|
|
49
50
|
const getConnectorKey = () => {
|
|
@@ -61,67 +62,36 @@ export function MyReplyConnector({ message, messageBubbleHeight }) {
|
|
|
61
62
|
if (!ConnectorComponent)
|
|
62
63
|
return null;
|
|
63
64
|
const spacerStyle = nextRendersAuthor ? styles.myReplyConnectorSpacer : null;
|
|
64
|
-
return (
|
|
65
|
-
<View style={[styles.myReplyConnectorContainer, spacerStyle]}>{ConnectorComponent}</View>
|
|
66
|
-
</EnforceLeftPositionForMyReplyConnector>);
|
|
65
|
+
return (_jsx(EnforceLeftPositionForMyReplyConnector, { children: _jsx(View, { style: [styles.myReplyConnectorContainer, spacerStyle], children: ConnectorComponent }) }));
|
|
67
66
|
}
|
|
68
67
|
function VerticalLineConnector({ style }) {
|
|
69
68
|
const styles = useStyles();
|
|
70
|
-
return
|
|
69
|
+
return _jsx(View, { style: [styles.verticalLineConnector, style] });
|
|
71
70
|
}
|
|
72
71
|
function LongHeadCurveConnector({ height, style }) {
|
|
73
72
|
const styles = useStyles();
|
|
74
73
|
const { colors } = useTheme();
|
|
75
|
-
return (
|
|
76
|
-
<Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill="none">
|
|
77
|
-
<Path d="M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 38 2" stroke={colors.borderColorDefaultBase} strokeWidth={CONNECTOR_BORDER_WIDTH}/>
|
|
78
|
-
</Svg>
|
|
79
|
-
<View style={styles.svgConnnectorVerticalLineTail}/>
|
|
80
|
-
</View>);
|
|
74
|
+
return (_jsxs(View, { style: [styles.longHeadCurveConnector, { marginTop: height }, style], children: [_jsx(Svg, { width: MY_REPLY_CONNECTOR_WIDTH, height: 18, fill: "none", children: _jsx(Path, { d: "M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 38 2", stroke: colors.borderColorDefaultBase, strokeWidth: CONNECTOR_BORDER_WIDTH }) }), _jsx(View, { style: styles.svgConnnectorVerticalLineTail })] }));
|
|
81
75
|
}
|
|
82
76
|
function LongTailCurveConnector({ height, style }) {
|
|
83
77
|
const styles = useStyles();
|
|
84
78
|
const { colors } = useTheme();
|
|
85
|
-
return (
|
|
86
|
-
<View style={styles.svgConnnectorVerticalLineHead}/>
|
|
87
|
-
<Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill="none">
|
|
88
|
-
<Path d="M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 38 16" stroke={colors.borderColorDefaultBase} strokeWidth={CONNECTOR_BORDER_WIDTH}/>
|
|
89
|
-
</Svg>
|
|
90
|
-
</View>);
|
|
79
|
+
return (_jsxs(View, { style: [{ height }, style], children: [_jsx(View, { style: styles.svgConnnectorVerticalLineHead }), _jsx(Svg, { width: MY_REPLY_CONNECTOR_WIDTH, height: 18, fill: "none", children: _jsx(Path, { d: "M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 38 16", stroke: colors.borderColorDefaultBase, strokeWidth: CONNECTOR_BORDER_WIDTH }) })] }));
|
|
91
80
|
}
|
|
92
81
|
function ShortHeadCurveConnector({ height }) {
|
|
93
82
|
const styles = useStyles();
|
|
94
83
|
const { colors } = useTheme();
|
|
95
|
-
return (
|
|
96
|
-
<Svg width={20} height={18} fill="none">
|
|
97
|
-
<Path d="M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 20 2" stroke={colors.borderColorDefaultBase} strokeWidth={CONNECTOR_BORDER_WIDTH}/>
|
|
98
|
-
</Svg>
|
|
99
|
-
<View style={styles.svgConnnectorVerticalLineTail}/>
|
|
100
|
-
</View>);
|
|
84
|
+
return (_jsxs(View, { style: [styles.shortHeadCurveConnector, { marginTop: height }], children: [_jsx(Svg, { width: 20, height: 18, fill: "none", children: _jsx(Path, { d: "M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 20 2", stroke: colors.borderColorDefaultBase, strokeWidth: CONNECTOR_BORDER_WIDTH }) }), _jsx(View, { style: styles.svgConnnectorVerticalLineTail })] }));
|
|
101
85
|
}
|
|
102
86
|
function ShortTailCurveConnector({ height }) {
|
|
103
87
|
const styles = useStyles();
|
|
104
88
|
const { colors } = useTheme();
|
|
105
|
-
return (
|
|
106
|
-
<View style={styles.svgConnnectorVerticalLineHead}/>
|
|
107
|
-
<Svg width={20} height={18} fill="none">
|
|
108
|
-
<Path d="M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 20 16" stroke={colors.borderColorDefaultBase} strokeWidth={CONNECTOR_BORDER_WIDTH}/>
|
|
109
|
-
</Svg>
|
|
110
|
-
</View>);
|
|
89
|
+
return (_jsxs(View, { style: { height }, children: [_jsx(View, { style: styles.svgConnnectorVerticalLineHead }), _jsx(Svg, { width: 20, height: 18, fill: "none", children: _jsx(Path, { d: "M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 20 16", stroke: colors.borderColorDefaultBase, strokeWidth: CONNECTOR_BORDER_WIDTH }) })] }));
|
|
111
90
|
}
|
|
112
91
|
function SwirlConnector({ style, height }) {
|
|
113
92
|
const styles = useStyles();
|
|
114
93
|
const { colors } = useTheme();
|
|
115
|
-
return (
|
|
116
|
-
<View style={{ height }}>
|
|
117
|
-
<View style={styles.svgConnnectorVerticalLineHead}/>
|
|
118
|
-
<Svg width={27} height={34} fill="none">
|
|
119
|
-
<Path stroke={colors.borderColorDefaultBase} strokeWidth={CONNECTOR_BORDER_WIDTH} d="M2.07 34c0-6.142 1.201-12.283 3.343-17m0 0c2.305-5.075 5.699-8.5 9.857-8.5 4.86 0 8.8 3.806 8.8 8.5s-3.94 8.5-8.8 8.5c-4.158 0-7.552-3.425-9.857-8.5zm0 0C3.271 12.283 2.07 6.142 2.07 0"/>
|
|
120
|
-
</Svg>
|
|
121
|
-
<View style={styles.svgConnnectorVerticalLineTail}/>
|
|
122
|
-
</View>
|
|
123
|
-
<View style={styles.svgConnnectorVerticalLineTail}/>
|
|
124
|
-
</View>);
|
|
94
|
+
return (_jsxs(View, { style: [styles.swirlConnectorContainer, style], children: [_jsxs(View, { style: { height }, children: [_jsx(View, { style: styles.svgConnnectorVerticalLineHead }), _jsx(Svg, { width: 27, height: 34, fill: "none", children: _jsx(Path, { stroke: colors.borderColorDefaultBase, strokeWidth: CONNECTOR_BORDER_WIDTH, d: "M2.07 34c0-6.142 1.201-12.283 3.343-17m0 0c2.305-5.075 5.699-8.5 9.857-8.5 4.86 0 8.8 3.806 8.8 8.5s-3.94 8.5-8.8 8.5c-4.158 0-7.552-3.425-9.857-8.5zm0 0C3.271 12.283 2.07 6.142 2.07 0" }) }), _jsx(View, { style: styles.svgConnnectorVerticalLineTail })] }), _jsx(View, { style: styles.svgConnnectorVerticalLineTail })] }));
|
|
125
95
|
}
|
|
126
96
|
// TODO: Remove when Services React Native bumps to React Native 0.74 or higher.
|
|
127
97
|
// This fixes a React Native bug where using `flexDirection: 'row-reverse'` also switches the `left`/`right` absolute positioning values.
|
|
@@ -129,10 +99,8 @@ function SwirlConnector({ style, height }) {
|
|
|
129
99
|
// Long term fix is described here: https://reactnative.dev/blog/2024/04/22/release-0.74#new-layout-behaviors
|
|
130
100
|
function EnforceLeftPositionForMyReplyConnector({ children }) {
|
|
131
101
|
const styles = useStyles();
|
|
132
|
-
return (
|
|
133
|
-
|
|
134
|
-
{children}
|
|
135
|
-
</View>);
|
|
102
|
+
return (_jsx(View, { style: styles.resetPosition, pointerEvents: "none" // ensures wrapper does not block press events
|
|
103
|
+
, children: children }));
|
|
136
104
|
}
|
|
137
105
|
const useStyles = () => {
|
|
138
106
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reply_connectors.js","sourceRoot":"","sources":["../../../src/components/conversation/reply_connectors.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EACL,4CAA4C,EAC5C,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAE3B,MAAM,wBAAwB,GAAG,EAAE,CAAA;AACnC,MAAM,sBAAsB,GAAG,CAAC,CAAA;AAChC,MAAM,0BAA0B,GAAG,sBAAsB,GAAG,CAAC,CAAA,CAAC,sFAAsF;AACpJ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAA;AAOzC,MAAM,UAAU,mBAAmB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAuB;IACvF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,oB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,UAAU;YACpB,IAAI,EAAE,4CAA4C,GAAG,0BAA0B;YAC/E,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;SACV;QACD,wBAAwB,EAAE;YACxB,IAAI,EAAE,KAAK;SACZ;QACD,sBAAsB,EAAE;YACtB,MAAM,EAAE,wBAAwB;SACjC;QACD,qBAAqB,EAAE;YACrB,IAAI,EAAE,CAAC;YACP,eAAe,EAAE,sBAAsB;YACvC,eAAe,EAAE,WAAW;SAC7B;QACD,sBAAsB,EAAE;YACtB,IAAI,EAAE,CAAC;SACR;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,CAAC;SACR;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,CAAC;SACR;QACD,6BAA6B,EAAE;YAC7B,eAAe,EAAE,WAAW;YAC5B,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,CAAC;YACP,YAAY,EAAE,CAAC,CAAC,EAAE,4EAA4E;SAC/F;QACD,6BAA6B,EAAE;YAC7B,eAAe,EAAE,WAAW;YAC5B,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,CAAC;YACP,SAAS,EAAE,CAAC,CAAC,EAAE,4EAA4E;SAC5F;QACD,gFAAgF;QAChF,aAAa,EAAE;YACb,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;SACV;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StyleSheet, View, ViewStyle } from 'react-native'\nimport Svg, { Path } from 'react-native-svg'\nimport { useTheme } from '../../hooks'\nimport { MessageResource } from '../../types'\nimport {\n CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n} from '../../utils/styles'\n\nconst MY_REPLY_CONNECTOR_WIDTH = 38\nconst CONNECTOR_BORDER_WIDTH = 4\nconst OFFSET_CONNECTOR_CONTAINER = CONNECTOR_BORDER_WIDTH / 2 // Accounts for the border width ensuring the connectors are centered under the avatar\nexport const AVATAR_CONNECTOR_SPACING = 8\n\ninterface ReplyConnectorProps {\n message: MessageResource\n messageBubbleHeight: number\n}\n\nexport function TheirReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps) {\n const styles = useStyles()\n const { nextRendersAuthor, threadPosition, renderAuthor, isReplyShadowMessage } = message\n\n if (messageBubbleHeight === 0) return null // Prevents UI shifting\n\n const connectorMap: Record<string, React.ReactNode | null> = {\n shortTailCurve: <ShortTailCurveConnector height={messageBubbleHeight / 2} />,\n shortHeadCurve: <ShortHeadCurveConnector height={messageBubbleHeight / 2} />,\n verticalLine: <VerticalLineConnector />,\n default: null,\n }\n\n const getConnectorKey = () => {\n if (threadPosition === 'first' && !renderAuthor) return 'shortHeadCurve'\n if (threadPosition === 'last' && !renderAuthor) return 'shortTailCurve'\n if (\n (threadPosition === 'first' && renderAuthor) ||\n threadPosition === 'center' ||\n isReplyShadowMessage\n )\n return 'verticalLine'\n return 'default'\n }\n\n const ConnectorComponent = connectorMap[getConnectorKey()]\n if (!ConnectorComponent) return null\n\n const spacerStyle = nextRendersAuthor ? styles.theirReplyConnectorSpacer : null\n\n return (\n <View style={[styles.theirReplyConnectorContainer, spacerStyle]}>{ConnectorComponent}</View>\n )\n}\n\nexport function MyReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps) {\n const styles = useStyles()\n const { nextRendersAuthor, threadPosition, prevIsMyReply, nextIsMyReply, isReplyShadowMessage } =\n message\n\n if (messageBubbleHeight === 0) return null // Prevents UI shifting\n\n const connectorMap: Record<string, React.ReactNode | null> = {\n longTailCurve: (\n <LongTailCurveConnector\n height={messageBubbleHeight / 2}\n style={styles.myReplyConnectorPosition}\n />\n ),\n longHeadCurve: (\n <LongHeadCurveConnector\n height={messageBubbleHeight / 2}\n style={styles.myReplyConnectorPosition}\n />\n ),\n verticalLine: <VerticalLineConnector style={styles.myReplyConnectorPosition} />,\n swirl: <SwirlConnector style={styles.myReplyConnectorPosition} height={messageBubbleHeight} />,\n default: null,\n }\n\n const getConnectorKey = () => {\n if (threadPosition === 'first' || isReplyShadowMessage) return 'longHeadCurve'\n if (threadPosition === 'center' && prevIsMyReply && nextIsMyReply) return 'verticalLine'\n if (threadPosition === 'center' && (!prevIsMyReply || !nextIsMyReply)) return 'swirl'\n if (threadPosition === 'last') return 'longTailCurve'\n\n return 'default'\n }\n\n const ConnectorComponent = connectorMap[getConnectorKey()]\n if (!ConnectorComponent) return null\n\n const spacerStyle = nextRendersAuthor ? styles.myReplyConnectorSpacer : null\n\n return (\n <EnforceLeftPositionForMyReplyConnector>\n <View style={[styles.myReplyConnectorContainer, spacerStyle]}>{ConnectorComponent}</View>\n </EnforceLeftPositionForMyReplyConnector>\n )\n}\n\nfunction VerticalLineConnector({ style }: { style?: ViewStyle }) {\n const styles = useStyles()\n return <View style={[styles.verticalLineConnector, style]} />\n}\n\nfunction LongHeadCurveConnector({ height, style }: { height: number; style?: ViewStyle }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.longHeadCurveConnector, { marginTop: height }, style]}>\n <Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill=\"none\">\n <Path\n d=\"M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 38 2\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\nfunction LongTailCurveConnector({ height, style }: { height: number; style?: ViewStyle }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[{ height }, style]}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill=\"none\">\n <Path\n d=\"M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 38 16\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n </View>\n )\n}\n\nfunction ShortHeadCurveConnector({ height }: { height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.shortHeadCurveConnector, { marginTop: height }]}>\n <Svg width={20} height={18} fill=\"none\">\n <Path\n d=\"M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 20 2\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\nfunction ShortTailCurveConnector({ height }: { height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={{ height }}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={20} height={18} fill=\"none\">\n <Path\n d=\"M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 20 16\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n </View>\n )\n}\n\nfunction SwirlConnector({ style, height }: { style?: ViewStyle; height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.swirlConnectorContainer, style]}>\n <View style={{ height }}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={27} height={34} fill=\"none\">\n <Path\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n d=\"M2.07 34c0-6.142 1.201-12.283 3.343-17m0 0c2.305-5.075 5.699-8.5 9.857-8.5 4.86 0 8.8 3.806 8.8 8.5s-3.94 8.5-8.8 8.5c-4.158 0-7.552-3.425-9.857-8.5zm0 0C3.271 12.283 2.07 6.142 2.07 0\"\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\n// TODO: Remove when Services React Native bumps to React Native 0.74 or higher.\n// This fixes a React Native bug where using `flexDirection: 'row-reverse'` also switches the `left`/`right` absolute positioning values.\n// The wrapper ensures the MyReplyConnector is always positioned to the left of the message bubble on older versions of React Native.\n// Long term fix is described here: https://reactnative.dev/blog/2024/04/22/release-0.74#new-layout-behaviors\nfunction EnforceLeftPositionForMyReplyConnector({ children }: { children: React.ReactNode }) {\n const styles = useStyles()\n return (\n <View\n style={styles.resetPosition}\n pointerEvents=\"none\" // ensures wrapper does not block press events\n >\n {children}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const borderColor = colors.borderColorDefaultBase\n\n return StyleSheet.create({\n theirReplyConnectorContainer: {\n width: '50%',\n marginRight: OFFSET_CONNECTOR_CONTAINER,\n alignSelf: 'flex-end',\n flex: 1,\n },\n theirReplyConnectorSpacer: {\n paddingBottom: AVATAR_CONNECTOR_SPACING,\n },\n myReplyConnectorContainer: {\n width: MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n position: 'absolute',\n left: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL - OFFSET_CONNECTOR_CONTAINER,\n top: 0,\n bottom: 0,\n },\n myReplyConnectorPosition: {\n left: '50%',\n },\n myReplyConnectorSpacer: {\n bottom: AVATAR_CONNECTOR_SPACING,\n },\n verticalLineConnector: {\n flex: 1,\n borderLeftWidth: CONNECTOR_BORDER_WIDTH,\n borderLeftColor: borderColor,\n },\n longHeadCurveConnector: {\n flex: 1,\n },\n shortHeadCurveConnector: {\n flex: 1,\n },\n swirlConnectorContainer: {\n flex: 1,\n },\n svgConnnectorVerticalLineHead: {\n backgroundColor: borderColor,\n width: CONNECTOR_BORDER_WIDTH,\n flex: 1,\n marginBottom: -1, // Ensures there is no gap between the vertical line and the swirl connector\n },\n svgConnnectorVerticalLineTail: {\n backgroundColor: borderColor,\n width: CONNECTOR_BORDER_WIDTH,\n flex: 1,\n marginTop: -1, // Ensures there is no gap between the vertical line and the swirl connector\n },\n // TODO: Remove when Services React Native bumps to React Native 0.74 or higher.\n resetPosition: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"reply_connectors.js","sourceRoot":"","sources":["../../../src/components/conversation/reply_connectors.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EACL,4CAA4C,EAC5C,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAE3B,MAAM,wBAAwB,GAAG,EAAE,CAAA;AACnC,MAAM,sBAAsB,GAAG,CAAC,CAAA;AAChC,MAAM,0BAA0B,GAAG,sBAAsB,GAAG,CAAC,CAAA,CAAC,sFAAsF;AACpJ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAA;AAOzC,MAAM,UAAU,mBAAmB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAuB;IACvF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAA;IAEzF,IAAI,mBAAmB,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA,CAAC,uBAAuB;IAElE,MAAM,YAAY,GAA2C;QAC3D,cAAc,EAAE,KAAC,uBAAuB,IAAC,MAAM,EAAE,mBAAmB,GAAG,CAAC,GAAI;QAC5E,cAAc,EAAE,KAAC,uBAAuB,IAAC,MAAM,EAAE,mBAAmB,GAAG,CAAC,GAAI;QAC5E,YAAY,EAAE,KAAC,qBAAqB,KAAG;QACvC,OAAO,EAAE,IAAI;KACd,CAAA;IAED,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,IAAI,cAAc,KAAK,OAAO,IAAI,CAAC,YAAY;YAAE,OAAO,gBAAgB,CAAA;QACxE,IAAI,cAAc,KA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C;QACD,qBAAqB,EAAE;YACrB,IAAI,EAAE,CAAC;YACP,eAAe,EAAE,sBAAsB;YACvC,eAAe,EAAE,WAAW;SAC7B;QACD,sBAAsB,EAAE;YACtB,IAAI,EAAE,CAAC;SACR;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,CAAC;SACR;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,CAAC;SACR;QACD,6BAA6B,EAAE;YAC7B,eAAe,EAAE,WAAW;YAC5B,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,CAAC;YACP,YAAY,EAAE,CAAC,CAAC,EAAE,4EAA4E;SAC/F;QACD,6BAA6B,EAAE;YAC7B,eAAe,EAAE,WAAW;YAC5B,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,CAAC;YACP,SAAS,EAAE,CAAC,CAAC,EAAE,4EAA4E;SAC5F;QACD,gFAAgF;QAChF,aAAa,EAAE;YACb,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;SACV;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StyleSheet, View, ViewStyle } from 'react-native'\nimport Svg, { Path } from 'react-native-svg'\nimport { useTheme } from '../../hooks'\nimport { MessageResource } from '../../types'\nimport {\n CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n} from '../../utils/styles'\n\nconst MY_REPLY_CONNECTOR_WIDTH = 38\nconst CONNECTOR_BORDER_WIDTH = 4\nconst OFFSET_CONNECTOR_CONTAINER = CONNECTOR_BORDER_WIDTH / 2 // Accounts for the border width ensuring the connectors are centered under the avatar\nexport const AVATAR_CONNECTOR_SPACING = 8\n\ninterface ReplyConnectorProps {\n message: MessageResource\n messageBubbleHeight: number\n}\n\nexport function TheirReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps) {\n const styles = useStyles()\n const { nextRendersAuthor, threadPosition, renderAuthor, isReplyShadowMessage } = message\n\n if (messageBubbleHeight === 0) return null // Prevents UI shifting\n\n const connectorMap: Record<string, React.ReactNode | null> = {\n shortTailCurve: <ShortTailCurveConnector height={messageBubbleHeight / 2} />,\n shortHeadCurve: <ShortHeadCurveConnector height={messageBubbleHeight / 2} />,\n verticalLine: <VerticalLineConnector />,\n default: null,\n }\n\n const getConnectorKey = () => {\n if (threadPosition === 'first' && !renderAuthor) return 'shortHeadCurve'\n if (threadPosition === 'last' && !renderAuthor) return 'shortTailCurve'\n if (\n (threadPosition === 'first' && renderAuthor) ||\n threadPosition === 'center' ||\n isReplyShadowMessage\n )\n return 'verticalLine'\n return 'default'\n }\n\n const ConnectorComponent = connectorMap[getConnectorKey()]\n if (!ConnectorComponent) return null\n\n const spacerStyle = nextRendersAuthor ? styles.theirReplyConnectorSpacer : null\n\n return (\n <View style={[styles.theirReplyConnectorContainer, spacerStyle]}>{ConnectorComponent}</View>\n )\n}\n\nexport function MyReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps) {\n const styles = useStyles()\n const { nextRendersAuthor, threadPosition, prevIsMyReply, nextIsMyReply, isReplyShadowMessage } =\n message\n\n if (messageBubbleHeight === 0) return null // Prevents UI shifting\n\n const connectorMap: Record<string, React.ReactNode | null> = {\n longTailCurve: (\n <LongTailCurveConnector\n height={messageBubbleHeight / 2}\n style={styles.myReplyConnectorPosition}\n />\n ),\n longHeadCurve: (\n <LongHeadCurveConnector\n height={messageBubbleHeight / 2}\n style={styles.myReplyConnectorPosition}\n />\n ),\n verticalLine: <VerticalLineConnector style={styles.myReplyConnectorPosition} />,\n swirl: <SwirlConnector style={styles.myReplyConnectorPosition} height={messageBubbleHeight} />,\n default: null,\n }\n\n const getConnectorKey = () => {\n if (threadPosition === 'first' || isReplyShadowMessage) return 'longHeadCurve'\n if (threadPosition === 'center' && prevIsMyReply && nextIsMyReply) return 'verticalLine'\n if (threadPosition === 'center' && (!prevIsMyReply || !nextIsMyReply)) return 'swirl'\n if (threadPosition === 'last') return 'longTailCurve'\n\n return 'default'\n }\n\n const ConnectorComponent = connectorMap[getConnectorKey()]\n if (!ConnectorComponent) return null\n\n const spacerStyle = nextRendersAuthor ? styles.myReplyConnectorSpacer : null\n\n return (\n <EnforceLeftPositionForMyReplyConnector>\n <View style={[styles.myReplyConnectorContainer, spacerStyle]}>{ConnectorComponent}</View>\n </EnforceLeftPositionForMyReplyConnector>\n )\n}\n\nfunction VerticalLineConnector({ style }: { style?: ViewStyle }) {\n const styles = useStyles()\n return <View style={[styles.verticalLineConnector, style]} />\n}\n\nfunction LongHeadCurveConnector({ height, style }: { height: number; style?: ViewStyle }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.longHeadCurveConnector, { marginTop: height }, style]}>\n <Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill=\"none\">\n <Path\n d=\"M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 38 2\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\nfunction LongTailCurveConnector({ height, style }: { height: number; style?: ViewStyle }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[{ height }, style]}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill=\"none\">\n <Path\n d=\"M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 38 16\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n </View>\n )\n}\n\nfunction ShortHeadCurveConnector({ height }: { height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.shortHeadCurveConnector, { marginTop: height }]}>\n <Svg width={20} height={18} fill=\"none\">\n <Path\n d=\"M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 20 2\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\nfunction ShortTailCurveConnector({ height }: { height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={{ height }}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={20} height={18} fill=\"none\">\n <Path\n d=\"M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 20 16\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n </View>\n )\n}\n\nfunction SwirlConnector({ style, height }: { style?: ViewStyle; height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.swirlConnectorContainer, style]}>\n <View style={{ height }}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={27} height={34} fill=\"none\">\n <Path\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n d=\"M2.07 34c0-6.142 1.201-12.283 3.343-17m0 0c2.305-5.075 5.699-8.5 9.857-8.5 4.86 0 8.8 3.806 8.8 8.5s-3.94 8.5-8.8 8.5c-4.158 0-7.552-3.425-9.857-8.5zm0 0C3.271 12.283 2.07 6.142 2.07 0\"\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\n// TODO: Remove when Services React Native bumps to React Native 0.74 or higher.\n// This fixes a React Native bug where using `flexDirection: 'row-reverse'` also switches the `left`/`right` absolute positioning values.\n// The wrapper ensures the MyReplyConnector is always positioned to the left of the message bubble on older versions of React Native.\n// Long term fix is described here: https://reactnative.dev/blog/2024/04/22/release-0.74#new-layout-behaviors\nfunction EnforceLeftPositionForMyReplyConnector({ children }: { children: React.ReactNode }) {\n const styles = useStyles()\n return (\n <View\n style={styles.resetPosition}\n pointerEvents=\"none\" // ensures wrapper does not block press events\n >\n {children}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const borderColor = colors.borderColorDefaultBase\n\n return StyleSheet.create({\n theirReplyConnectorContainer: {\n width: '50%',\n marginRight: OFFSET_CONNECTOR_CONTAINER,\n alignSelf: 'flex-end',\n flex: 1,\n },\n theirReplyConnectorSpacer: {\n paddingBottom: AVATAR_CONNECTOR_SPACING,\n },\n myReplyConnectorContainer: {\n width: MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n position: 'absolute',\n left: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL - OFFSET_CONNECTOR_CONTAINER,\n top: 0,\n bottom: 0,\n },\n myReplyConnectorPosition: {\n left: '50%',\n },\n myReplyConnectorSpacer: {\n bottom: AVATAR_CONNECTOR_SPACING,\n },\n verticalLineConnector: {\n flex: 1,\n borderLeftWidth: CONNECTOR_BORDER_WIDTH,\n borderLeftColor: borderColor,\n },\n longHeadCurveConnector: {\n flex: 1,\n },\n shortHeadCurveConnector: {\n flex: 1,\n },\n swirlConnectorContainer: {\n flex: 1,\n },\n svgConnnectorVerticalLineHead: {\n backgroundColor: borderColor,\n width: CONNECTOR_BORDER_WIDTH,\n flex: 1,\n marginBottom: -1, // Ensures there is no gap between the vertical line and the swirl connector\n },\n svgConnnectorVerticalLineTail: {\n backgroundColor: borderColor,\n width: CONNECTOR_BORDER_WIDTH,\n flex: 1,\n marginTop: -1, // Ensures there is no gap between the vertical line and the swirl connector\n },\n // TODO: Remove when Services React Native bumps to React Native 0.74 or higher.\n resetPosition: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { MessageResource } from '../../types';
|
|
3
2
|
interface ReplyShadowMessageProps extends MessageResource {
|
|
4
3
|
messageId: string;
|
|
@@ -7,6 +6,6 @@ interface ReplyShadowMessageProps extends MessageResource {
|
|
|
7
6
|
isReplyShadowMessage: boolean;
|
|
8
7
|
nextRendersAuthor: boolean;
|
|
9
8
|
}
|
|
10
|
-
export declare function ReplyShadowMessage({ conversation_id, inReplyScreen, messageId, isReplyShadowMessage, nextRendersAuthor, }: ReplyShadowMessageProps):
|
|
9
|
+
export declare function ReplyShadowMessage({ conversation_id, inReplyScreen, messageId, isReplyShadowMessage, nextRendersAuthor, }: ReplyShadowMessageProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
10
|
export {};
|
|
12
11
|
//# sourceMappingURL=reply_shadow_message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reply_shadow_message.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/reply_shadow_message.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reply_shadow_message.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/reply_shadow_message.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAiB7C,UAAU,uBAAwB,SAAQ,eAAe;IACvD,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,iBAAiB,EAAE,OAAO,CAAA;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,eAAe,EACf,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,uBAAuB,kDAczB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { useNavigation } from '@react-navigation/native';
|
|
2
3
|
import { some } from 'lodash';
|
|
3
4
|
import React from 'react';
|
|
@@ -15,15 +16,15 @@ export function ReplyShadowMessage({ conversation_id, inReplyScreen, messageId,
|
|
|
15
16
|
if (inReplyScreen)
|
|
16
17
|
return null;
|
|
17
18
|
if (isLoading)
|
|
18
|
-
return
|
|
19
|
+
return _jsx(ShadowMessageFallback, { text: "Loading..." });
|
|
19
20
|
if (isError || !message)
|
|
20
|
-
return
|
|
21
|
+
return _jsx(ShadowMessageFallback, { text: "Message deleted" });
|
|
21
22
|
const enrichedMessage = {
|
|
22
23
|
...message,
|
|
23
24
|
isReplyShadowMessage,
|
|
24
25
|
nextRendersAuthor,
|
|
25
26
|
};
|
|
26
|
-
return
|
|
27
|
+
return _jsx(ShadowMessageContent, { conversation_id: conversation_id, ...enrichedMessage });
|
|
27
28
|
}
|
|
28
29
|
function ShadowMessageContent({ conversation_id, ...message }) {
|
|
29
30
|
const { text, deletedAt, author, attachments } = message;
|
|
@@ -46,53 +47,30 @@ function ShadowMessageContent({ conversation_id, ...message }) {
|
|
|
46
47
|
};
|
|
47
48
|
const attachmentLabel = some(attachments) ? pluralize(attachments.length, 'attachment') : '';
|
|
48
49
|
const accessibilityLabel = `${author?.name || ''} Reply Preview ${attachmentLabel} ${messageText || ''} ${timestamp} ${replyCountText}`;
|
|
49
|
-
return (
|
|
50
|
-
<Animated.View style={[styles.message, animatedBackgroundColor]}>
|
|
51
|
-
{!message.mine && (<View>
|
|
52
|
-
<View style={[styles.avatarWrapper, !isDeleted && styles.avatarOpacity]}>
|
|
53
|
-
<Avatar size="xs" sourceUri={message.author.avatar} style={styles.avatar} maxFontSizeMultiplier={1} fallbackIconName={isDeleted ? 'publishing.trash' : 'general.person'} showFallback={isDeleted}/>
|
|
54
|
-
</View>
|
|
55
|
-
<TheirReplyConnector message={message} messageBubbleHeight={messageBubbleHeight}/>
|
|
56
|
-
</View>)}
|
|
57
|
-
<View style={styles.messageContent}>
|
|
58
|
-
<View style={styles.messageBubble} onLayout={e => setMessageBubbleHeight(e.nativeEvent.layout.height)}>
|
|
59
|
-
<MessageAttachmentImagery attachments={attachments}/>
|
|
60
|
-
{text && (<Text variant="footnote" style={styles.messageText} numberOfLines={scalableNumberOfLines}>
|
|
61
|
-
{messageText}
|
|
62
|
-
</Text>)}
|
|
63
|
-
</View>
|
|
64
|
-
<View style={styles.messageMeta}>
|
|
65
|
-
<Text variant="footnote" style={styles.replyCountText}>
|
|
66
|
-
{replyCountText}
|
|
67
|
-
</Text>
|
|
68
|
-
</View>
|
|
69
|
-
</View>
|
|
70
|
-
{message.mine && (<MyReplyConnector message={message} messageBubbleHeight={messageBubbleHeight}/>)}
|
|
71
|
-
</Animated.View>
|
|
72
|
-
</Pressable>);
|
|
50
|
+
return (_jsx(Pressable, { android_ripple: { color: colors.androidRippleNeutral }, onPress: handleNavigateToReplies, onPressIn: handleMessagePressIn, onPressOut: handleMessagePressOut, accessibilityLabel: accessibilityLabel, accessibilityHint: "Navigate to reply screen for this message", accessibilityRole: "link", children: _jsxs(Animated.View, { style: [styles.message, animatedBackgroundColor], children: [!message.mine && (_jsxs(View, { children: [_jsx(View, { style: [styles.avatarWrapper, !isDeleted && styles.avatarOpacity], children: _jsx(Avatar, { size: "xs", sourceUri: message.author.avatar, style: styles.avatar, maxFontSizeMultiplier: 1, fallbackIconName: isDeleted ? 'publishing.trash' : 'general.person', showFallback: isDeleted }) }), _jsx(TheirReplyConnector, { message: message, messageBubbleHeight: messageBubbleHeight })] })), _jsxs(View, { style: styles.messageContent, children: [_jsxs(View, { style: styles.messageBubble, onLayout: e => setMessageBubbleHeight(e.nativeEvent.layout.height), children: [_jsx(MessageAttachmentImagery, { attachments: attachments }), text && (_jsx(Text, { variant: "footnote", style: styles.messageText, numberOfLines: scalableNumberOfLines, children: messageText }))] }), _jsx(View, { style: styles.messageMeta, children: _jsx(Text, { variant: "footnote", style: styles.replyCountText, children: replyCountText }) })] }), message.mine && (_jsx(MyReplyConnector, { message: message, messageBubbleHeight: messageBubbleHeight }))] }) }));
|
|
73
51
|
}
|
|
74
52
|
function MessageAttachmentImagery({ attachments, }) {
|
|
75
53
|
if (!attachments || attachments.length === 0)
|
|
76
54
|
return null;
|
|
77
55
|
const attachment = attachments[0];
|
|
78
56
|
if (attachment.type === 'giphy') {
|
|
79
|
-
return
|
|
57
|
+
return _jsx(GiphyImage, { attachment: attachment });
|
|
80
58
|
}
|
|
81
59
|
if (attachment.type === 'ExpandedLink') {
|
|
82
|
-
return
|
|
60
|
+
return _jsx(ExpandedLinkImage, { attachment: attachment });
|
|
83
61
|
}
|
|
84
62
|
if (attachment.type === 'MessageAttachment') {
|
|
85
63
|
const contentType = attachment.attributes?.contentType;
|
|
86
64
|
const basicType = contentType?.split('/')[0];
|
|
87
65
|
switch (basicType) {
|
|
88
66
|
case 'image':
|
|
89
|
-
return
|
|
67
|
+
return _jsx(MessageAttachmentImage, { attachment: attachment });
|
|
90
68
|
case 'video':
|
|
91
|
-
return
|
|
69
|
+
return _jsx(MessageAttachmentIcon, { iconName: "general.outlinedVideoFile" });
|
|
92
70
|
case 'audio':
|
|
93
|
-
return
|
|
71
|
+
return _jsx(MessageAttachmentIcon, { iconName: "general.outlinedMusicFile" });
|
|
94
72
|
case 'application':
|
|
95
|
-
return
|
|
73
|
+
return _jsx(MessageAttachmentIcon, { iconName: "general.outlinedGenericFile" });
|
|
96
74
|
default:
|
|
97
75
|
return null;
|
|
98
76
|
}
|
|
@@ -104,34 +82,26 @@ function GiphyImage({ attachment }) {
|
|
|
104
82
|
const { url } = giphy.fixedWidth;
|
|
105
83
|
const { width, height } = assertKeysAreNumbers(giphy.fixedWidth);
|
|
106
84
|
const styles = useStyles({ imageWidth: width, imageHeight: height });
|
|
107
|
-
return (
|
|
85
|
+
return (_jsx(Image, { source: { uri: url }, wrapperStyle: styles.imageWrapper, style: styles.image, alt: title, loaderSize: 16 }));
|
|
108
86
|
}
|
|
109
87
|
function ExpandedLinkImage({ attachment, }) {
|
|
110
88
|
const { title = '', imageUrl, imageHeight, imageWidth } = attachment.attributes;
|
|
111
89
|
const styles = useStyles({ imageWidth, imageHeight });
|
|
112
|
-
return (
|
|
90
|
+
return (_jsx(Image, { source: { uri: imageUrl }, wrapperStyle: styles.imageWrapper, style: styles.image, alt: title, loaderSize: 16 }));
|
|
113
91
|
}
|
|
114
92
|
function MessageAttachmentImage({ attachment, }) {
|
|
115
93
|
const { url, urlMedium, filename, metadata = {} } = attachment.attributes;
|
|
116
94
|
const styles = useStyles({ imageWidth: metadata.width, imageHeight: metadata.height });
|
|
117
|
-
return (
|
|
95
|
+
return (_jsx(Image, { source: { uri: urlMedium || url }, style: styles.image, wrapperStyle: styles.imageWrapper, alt: filename, loaderSize: 16 }));
|
|
118
96
|
}
|
|
119
97
|
function MessageAttachmentIcon({ iconName }) {
|
|
120
98
|
const styles = useStyles();
|
|
121
|
-
return (
|
|
99
|
+
return (_jsx(Icon, { name: iconName, style: styles.attachmentIcon, maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER }));
|
|
122
100
|
}
|
|
123
101
|
// TODO: The mine prop is not used yet, but in the future we will be adding a way to find the `mine` value for this fallback.
|
|
124
102
|
function ShadowMessageFallback({ text, mine }) {
|
|
125
103
|
const styles = useStyles({ mine });
|
|
126
|
-
return (
|
|
127
|
-
<View style={styles.messageContent}>
|
|
128
|
-
<View style={styles.messageBubble}>
|
|
129
|
-
<Text variant="footnote" style={styles.messageText}>
|
|
130
|
-
{text}
|
|
131
|
-
</Text>
|
|
132
|
-
</View>
|
|
133
|
-
</View>
|
|
134
|
-
</View>);
|
|
104
|
+
return (_jsx(View, { style: styles.message, children: _jsx(View, { style: styles.messageContent, children: _jsx(View, { style: styles.messageBubble, children: _jsx(Text, { variant: "footnote", style: styles.messageText, children: text }) }) }) }));
|
|
135
105
|
}
|
|
136
106
|
const useStyles = ({ mine, imageWidth = 32, imageHeight = 32 } = {}) => {
|
|
137
107
|
const { colors } = useTheme();
|