@oxy.so/bloom 5.1.0 → 5.2.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/docs/adoption-matrix.mdx +9 -9
- package/docs/app-shell.mdx +3 -1
- package/docs/button.mdx +2 -0
- package/docs/card-form.mdx +2 -0
- package/docs/chat-composer.mdx +1 -1
- package/docs/chat-people.mdx +8 -0
- package/docs/earnings.mdx +2 -0
- package/docs/field.mdx +2 -0
- package/docs/label.mdx +2 -0
- package/docs/payment-method.mdx +2 -0
- package/docs/place-details.mdx +2 -2
- package/docs/proof-of-delivery.mdx +4 -0
- package/docs/select.mdx +2 -0
- package/docs/settings-modal.mdx +15 -0
- package/lib/commonjs/ai-chat/AiChatResizeHandle.js +166 -0
- package/lib/commonjs/ai-chat/AiChatResizeHandle.js.map +1 -0
- package/lib/commonjs/ai-chat/AiChatShell.js +6 -154
- package/lib/commonjs/ai-chat/AiChatShell.js.map +1 -1
- package/lib/commonjs/ai-chat/index.js +2 -1
- package/lib/commonjs/ai-chat/index.js.map +1 -1
- package/lib/commonjs/ai-chat/index.web.js +2 -1
- package/lib/commonjs/ai-chat/index.web.js.map +1 -1
- package/lib/commonjs/ai-chat/messages.js +15 -30
- package/lib/commonjs/ai-chat/messages.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellSplit.js +2 -2
- package/lib/commonjs/app-shell/AppShellSplit.js.map +1 -1
- package/lib/commonjs/button/Button.js +36 -3
- package/lib/commonjs/button/Button.js.map +1 -1
- package/lib/commonjs/button/GlyphButton.js +7 -3
- package/lib/commonjs/button/GlyphButton.js.map +1 -1
- package/lib/commonjs/card-form/shared.js +3 -2
- package/lib/commonjs/card-form/shared.js.map +1 -1
- package/lib/commonjs/chat-composer/AttachmentMenu.js +8 -227
- package/lib/commonjs/chat-composer/AttachmentMenu.js.map +1 -1
- package/lib/commonjs/chat-composer/AttachmentMenu.web.js +16 -0
- package/lib/commonjs/chat-composer/AttachmentMenu.web.js.map +1 -0
- package/lib/commonjs/chat-composer/ChatComposer.js +9 -388
- package/lib/commonjs/chat-composer/ChatComposer.js.map +1 -1
- package/lib/commonjs/chat-composer/ChatComposer.web.js +16 -0
- package/lib/commonjs/chat-composer/ChatComposer.web.js.map +1 -0
- package/lib/commonjs/chat-composer/ComposerAttachmentStrip.js +5 -200
- package/lib/commonjs/chat-composer/ComposerAttachmentStrip.js.map +1 -1
- package/lib/commonjs/chat-composer/ComposerAttachmentStrip.web.js +12 -0
- package/lib/commonjs/chat-composer/ComposerAttachmentStrip.web.js.map +1 -0
- package/lib/commonjs/chat-composer/ComposerBanner.js +5 -163
- package/lib/commonjs/chat-composer/ComposerBanner.js.map +1 -1
- package/lib/commonjs/chat-composer/ComposerBanner.web.js +12 -0
- package/lib/commonjs/chat-composer/ComposerBanner.web.js.map +1 -0
- package/lib/commonjs/chat-composer/EmojiPicker.js +6 -443
- package/lib/commonjs/chat-composer/EmojiPicker.js.map +1 -1
- package/lib/commonjs/chat-composer/EmojiPicker.web.js +14 -0
- package/lib/commonjs/chat-composer/EmojiPicker.web.js.map +1 -0
- package/lib/commonjs/chat-composer/MessageContextMenu.js +12 -102
- package/lib/commonjs/chat-composer/MessageContextMenu.js.map +1 -1
- package/lib/commonjs/chat-composer/MessageContextMenu.web.js +19 -0
- package/lib/commonjs/chat-composer/MessageContextMenu.web.js.map +1 -0
- package/lib/commonjs/chat-composer/ReactionPicker.js +6 -107
- package/lib/commonjs/chat-composer/ReactionPicker.js.map +1 -1
- package/lib/commonjs/chat-composer/ReactionPicker.web.js +14 -0
- package/lib/commonjs/chat-composer/ReactionPicker.web.js.map +1 -0
- package/lib/commonjs/chat-composer/SuggestionList.js +5 -222
- package/lib/commonjs/chat-composer/SuggestionList.js.map +1 -1
- package/lib/commonjs/chat-composer/SuggestionList.web.js +12 -0
- package/lib/commonjs/chat-composer/SuggestionList.web.js.map +1 -0
- package/lib/commonjs/chat-composer/VoiceRecorder.js +7 -263
- package/lib/commonjs/chat-composer/VoiceRecorder.js.map +1 -1
- package/lib/commonjs/chat-composer/VoiceRecorder.web.js +16 -0
- package/lib/commonjs/chat-composer/VoiceRecorder.web.js.map +1 -0
- package/lib/commonjs/chat-composer/create-attachment-menu.js +243 -0
- package/lib/commonjs/chat-composer/create-attachment-menu.js.map +1 -0
- package/lib/commonjs/chat-composer/create-chat-composer.js +400 -0
- package/lib/commonjs/chat-composer/create-chat-composer.js.map +1 -0
- package/lib/commonjs/chat-composer/create-composer-attachment-strip.js +212 -0
- package/lib/commonjs/chat-composer/create-composer-attachment-strip.js.map +1 -0
- package/lib/commonjs/chat-composer/create-composer-banner.js +176 -0
- package/lib/commonjs/chat-composer/create-composer-banner.js.map +1 -0
- package/lib/commonjs/chat-composer/create-emoji-picker.js +456 -0
- package/lib/commonjs/chat-composer/create-emoji-picker.js.map +1 -0
- package/lib/commonjs/chat-composer/create-message-context-menu.js +119 -0
- package/lib/commonjs/chat-composer/create-message-context-menu.js.map +1 -0
- package/lib/commonjs/chat-composer/create-reaction-picker.js +120 -0
- package/lib/commonjs/chat-composer/create-reaction-picker.js.map +1 -0
- package/lib/commonjs/chat-composer/create-suggestion-list.js +234 -0
- package/lib/commonjs/chat-composer/create-suggestion-list.js.map +1 -0
- package/lib/commonjs/chat-composer/create-voice-recorder.js +277 -0
- package/lib/commonjs/chat-composer/create-voice-recorder.js.map +1 -0
- package/lib/commonjs/chat-composer/index.js +9 -9
- package/lib/commonjs/chat-composer/index.web.js +18 -18
- package/lib/commonjs/chat-composer/index.web.js.map +1 -1
- package/lib/commonjs/chat-people/contact-row.js +13 -0
- package/lib/commonjs/chat-people/contact-row.js.map +1 -0
- package/lib/commonjs/chat-screen/ChatSplitLayout.js +2 -2
- package/lib/commonjs/chat-screen/ChatSplitLayout.js.map +1 -1
- package/lib/commonjs/earnings/EarningsSummary.js +12 -2
- package/lib/commonjs/earnings/EarningsSummary.js.map +1 -1
- package/lib/commonjs/field/Field.js +2 -0
- package/lib/commonjs/field/Field.js.map +1 -1
- package/lib/commonjs/item/Item.js +16 -8
- package/lib/commonjs/item/Item.js.map +1 -1
- package/lib/commonjs/job-board/JobCard.js +6 -2
- package/lib/commonjs/job-board/JobCard.js.map +1 -1
- package/lib/commonjs/label/Label.js +2 -1
- package/lib/commonjs/label/Label.js.map +1 -1
- package/lib/commonjs/listing-details/AmenityList.js +4 -3
- package/lib/commonjs/listing-details/AmenityList.js.map +1 -1
- package/lib/commonjs/locale/common-messages.js +30 -15
- package/lib/commonjs/locale/common-messages.js.map +1 -1
- package/lib/commonjs/mail-compose/MailComposeSurface.js +1 -1
- package/lib/commonjs/overlay/InteractionBoundary.js +28 -0
- package/lib/commonjs/overlay/InteractionBoundary.js.map +1 -0
- package/lib/commonjs/payment-method/PaymentMethodList.js +3 -2
- package/lib/commonjs/payment-method/PaymentMethodList.js.map +1 -1
- package/lib/commonjs/place-details/PlaceAmenities.js +17 -6
- package/lib/commonjs/place-details/PlaceAmenities.js.map +1 -1
- package/lib/commonjs/place-details/PlacePopularTimes.js +7 -1
- package/lib/commonjs/place-details/PlacePopularTimes.js.map +1 -1
- package/lib/commonjs/proof-of-delivery/ProofOfDelivery.js +10 -1
- package/lib/commonjs/proof-of-delivery/ProofOfDelivery.js.map +1 -1
- package/lib/commonjs/proof-of-delivery/shared.js +1 -1
- package/lib/commonjs/proof-of-delivery/shared.js.map +1 -1
- package/lib/commonjs/select/Select.js +7 -4
- package/lib/commonjs/select/Select.js.map +1 -1
- package/lib/commonjs/select/Select.web.js +7 -4
- package/lib/commonjs/select/Select.web.js.map +1 -1
- package/lib/commonjs/select/use-required-description.js +37 -0
- package/lib/commonjs/select/use-required-description.js.map +1 -0
- package/lib/commonjs/settings-modal/rows.js +37 -0
- package/lib/commonjs/settings-modal/rows.js.map +1 -0
- package/lib/module/ai-chat/AiChatResizeHandle.js +160 -0
- package/lib/module/ai-chat/AiChatResizeHandle.js.map +1 -0
- package/lib/module/ai-chat/AiChatShell.js +5 -152
- package/lib/module/ai-chat/AiChatShell.js.map +1 -1
- package/lib/module/ai-chat/index.js +2 -1
- package/lib/module/ai-chat/index.js.map +1 -1
- package/lib/module/ai-chat/index.web.js +2 -1
- package/lib/module/ai-chat/index.web.js.map +1 -1
- package/lib/module/ai-chat/messages.js +15 -30
- package/lib/module/ai-chat/messages.js.map +1 -1
- package/lib/module/app-shell/AppShellSplit.js +1 -1
- package/lib/module/app-shell/AppShellSplit.js.map +1 -1
- package/lib/module/button/Button.js +36 -3
- package/lib/module/button/Button.js.map +1 -1
- package/lib/module/button/GlyphButton.js +7 -3
- package/lib/module/button/GlyphButton.js.map +1 -1
- package/lib/module/card-form/shared.js +3 -2
- package/lib/module/card-form/shared.js.map +1 -1
- package/lib/module/chat-composer/AttachmentMenu.js +7 -226
- package/lib/module/chat-composer/AttachmentMenu.js.map +1 -1
- package/lib/module/chat-composer/AttachmentMenu.web.js +12 -0
- package/lib/module/chat-composer/AttachmentMenu.web.js.map +1 -0
- package/lib/module/chat-composer/ChatComposer.js +8 -385
- package/lib/module/chat-composer/ChatComposer.js.map +1 -1
- package/lib/module/chat-composer/ChatComposer.web.js +12 -0
- package/lib/module/chat-composer/ChatComposer.web.js.map +1 -0
- package/lib/module/chat-composer/ComposerAttachmentStrip.js +4 -196
- package/lib/module/chat-composer/ComposerAttachmentStrip.js.map +1 -1
- package/lib/module/chat-composer/ComposerAttachmentStrip.web.js +8 -0
- package/lib/module/chat-composer/ComposerAttachmentStrip.web.js.map +1 -0
- package/lib/module/chat-composer/ComposerBanner.js +4 -162
- package/lib/module/chat-composer/ComposerBanner.js.map +1 -1
- package/lib/module/chat-composer/ComposerBanner.web.js +8 -0
- package/lib/module/chat-composer/ComposerBanner.web.js.map +1 -0
- package/lib/module/chat-composer/EmojiPicker.js +5 -440
- package/lib/module/chat-composer/EmojiPicker.js.map +1 -1
- package/lib/module/chat-composer/EmojiPicker.web.js +10 -0
- package/lib/module/chat-composer/EmojiPicker.web.js.map +1 -0
- package/lib/module/chat-composer/MessageContextMenu.js +11 -99
- package/lib/module/chat-composer/MessageContextMenu.js.map +1 -1
- package/lib/module/chat-composer/MessageContextMenu.web.js +15 -0
- package/lib/module/chat-composer/MessageContextMenu.web.js.map +1 -0
- package/lib/module/chat-composer/ReactionPicker.js +5 -104
- package/lib/module/chat-composer/ReactionPicker.js.map +1 -1
- package/lib/module/chat-composer/ReactionPicker.web.js +10 -0
- package/lib/module/chat-composer/ReactionPicker.web.js.map +1 -0
- package/lib/module/chat-composer/SuggestionList.js +4 -219
- package/lib/module/chat-composer/SuggestionList.js.map +1 -1
- package/lib/module/chat-composer/SuggestionList.web.js +8 -0
- package/lib/module/chat-composer/SuggestionList.web.js.map +1 -0
- package/lib/module/chat-composer/VoiceRecorder.js +6 -260
- package/lib/module/chat-composer/VoiceRecorder.js.map +1 -1
- package/lib/module/chat-composer/VoiceRecorder.web.js +12 -0
- package/lib/module/chat-composer/VoiceRecorder.web.js.map +1 -0
- package/lib/module/chat-composer/create-attachment-menu.js +238 -0
- package/lib/module/chat-composer/create-attachment-menu.js.map +1 -0
- package/lib/module/chat-composer/create-chat-composer.js +395 -0
- package/lib/module/chat-composer/create-chat-composer.js.map +1 -0
- package/lib/module/chat-composer/create-composer-attachment-strip.js +206 -0
- package/lib/module/chat-composer/create-composer-attachment-strip.js.map +1 -0
- package/lib/module/chat-composer/create-composer-banner.js +171 -0
- package/lib/module/chat-composer/create-composer-banner.js.map +1 -0
- package/lib/module/chat-composer/create-emoji-picker.js +451 -0
- package/lib/module/chat-composer/create-emoji-picker.js.map +1 -0
- package/lib/module/chat-composer/create-message-context-menu.js +114 -0
- package/lib/module/chat-composer/create-message-context-menu.js.map +1 -0
- package/lib/module/chat-composer/create-reaction-picker.js +115 -0
- package/lib/module/chat-composer/create-reaction-picker.js.map +1 -0
- package/lib/module/chat-composer/create-suggestion-list.js +229 -0
- package/lib/module/chat-composer/create-suggestion-list.js.map +1 -0
- package/lib/module/chat-composer/create-voice-recorder.js +272 -0
- package/lib/module/chat-composer/create-voice-recorder.js.map +1 -0
- package/lib/module/chat-composer/index.js +9 -9
- package/lib/module/chat-composer/index.js.map +1 -1
- package/lib/module/chat-composer/index.web.js +9 -9
- package/lib/module/chat-composer/index.web.js.map +1 -1
- package/lib/module/chat-people/contact-row.js +10 -0
- package/lib/module/chat-people/contact-row.js.map +1 -0
- package/lib/module/chat-screen/ChatSplitLayout.js +1 -1
- package/lib/module/chat-screen/ChatSplitLayout.js.map +1 -1
- package/lib/module/earnings/EarningsSummary.js +12 -2
- package/lib/module/earnings/EarningsSummary.js.map +1 -1
- package/lib/module/field/Field.js +2 -0
- package/lib/module/field/Field.js.map +1 -1
- package/lib/module/item/Item.js +16 -8
- package/lib/module/item/Item.js.map +1 -1
- package/lib/module/job-board/JobCard.js +6 -2
- package/lib/module/job-board/JobCard.js.map +1 -1
- package/lib/module/label/Label.js +2 -1
- package/lib/module/label/Label.js.map +1 -1
- package/lib/module/listing-details/AmenityList.js +4 -3
- package/lib/module/listing-details/AmenityList.js.map +1 -1
- package/lib/module/locale/common-messages.js +30 -15
- package/lib/module/locale/common-messages.js.map +1 -1
- package/lib/module/mail-compose/MailComposeSurface.js +1 -1
- package/lib/module/mail-compose/MailComposeSurface.js.map +1 -1
- package/lib/module/overlay/InteractionBoundary.js +25 -0
- package/lib/module/overlay/InteractionBoundary.js.map +1 -0
- package/lib/module/payment-method/PaymentMethodList.js +3 -2
- package/lib/module/payment-method/PaymentMethodList.js.map +1 -1
- package/lib/module/place-details/PlaceAmenities.js +15 -4
- package/lib/module/place-details/PlaceAmenities.js.map +1 -1
- package/lib/module/place-details/PlacePopularTimes.js +7 -1
- package/lib/module/place-details/PlacePopularTimes.js.map +1 -1
- package/lib/module/proof-of-delivery/ProofOfDelivery.js +10 -1
- package/lib/module/proof-of-delivery/ProofOfDelivery.js.map +1 -1
- package/lib/module/proof-of-delivery/shared.js +1 -1
- package/lib/module/proof-of-delivery/shared.js.map +1 -1
- package/lib/module/select/Select.js +7 -4
- package/lib/module/select/Select.js.map +1 -1
- package/lib/module/select/Select.web.js +7 -4
- package/lib/module/select/Select.web.js.map +1 -1
- package/lib/module/select/use-required-description.js +33 -0
- package/lib/module/select/use-required-description.js.map +1 -0
- package/lib/module/settings-modal/rows.js +10 -0
- package/lib/module/settings-modal/rows.js.map +1 -0
- package/lib/typescript/commonjs/ai-chat/AiChatResizeHandle.d.ts +11 -0
- package/lib/typescript/commonjs/ai-chat/AiChatResizeHandle.d.ts.map +1 -0
- package/lib/typescript/commonjs/ai-chat/AiChatShell.d.ts +1 -10
- package/lib/typescript/commonjs/ai-chat/AiChatShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.d.ts +2 -1
- package/lib/typescript/commonjs/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts +2 -1
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/messages.d.ts +0 -1
- package/lib/typescript/commonjs/ai-chat/messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/card-form/shared.d.ts +2 -1
- package/lib/typescript/commonjs/card-form/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/AttachmentMenu.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/AttachmentMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/AttachmentMenu.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/AttachmentMenu.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/ChatComposer.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/ChatComposer.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/ChatComposer.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/ComposerAttachmentStrip.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/ComposerAttachmentStrip.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/ComposerAttachmentStrip.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/ComposerAttachmentStrip.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/EmojiPicker.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/EmojiPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/EmojiPicker.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/EmojiPicker.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/MessageContextMenu.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/MessageContextMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/MessageContextMenu.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/MessageContextMenu.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/ReactionPicker.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/ReactionPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/ReactionPicker.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/ReactionPicker.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/SuggestionList.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/SuggestionList.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/SuggestionList.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/SuggestionList.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/VoiceRecorder.d.ts +1 -2
- package/lib/typescript/commonjs/chat-composer/VoiceRecorder.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/VoiceRecorder.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/VoiceRecorder.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-attachment-menu.d.ts +11 -0
- package/lib/typescript/commonjs/chat-composer/create-attachment-menu.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-chat-composer.d.ts +11 -0
- package/lib/typescript/commonjs/chat-composer/create-chat-composer.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-composer-attachment-strip.d.ts +7 -0
- package/lib/typescript/commonjs/chat-composer/create-composer-attachment-strip.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-composer-banner.d.ts +7 -0
- package/lib/typescript/commonjs/chat-composer/create-composer-banner.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-emoji-picker.d.ts +9 -0
- package/lib/typescript/commonjs/chat-composer/create-emoji-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-message-context-menu.d.ts +14 -0
- package/lib/typescript/commonjs/chat-composer/create-message-context-menu.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-reaction-picker.d.ts +9 -0
- package/lib/typescript/commonjs/chat-composer/create-reaction-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-suggestion-list.d.ts +7 -0
- package/lib/typescript/commonjs/chat-composer/create-suggestion-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-voice-recorder.d.ts +11 -0
- package/lib/typescript/commonjs/chat-composer/create-voice-recorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/index.web.d.ts +9 -9
- package/lib/typescript/commonjs/chat-composer/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-people/contact-row.d.ts +9 -0
- package/lib/typescript/commonjs/chat-people/contact-row.d.ts.map +1 -0
- package/lib/typescript/commonjs/earnings/EarningsSummary.d.ts.map +1 -1
- package/lib/typescript/commonjs/field/Field.d.ts +1 -1
- package/lib/typescript/commonjs/field/Field.d.ts.map +1 -1
- package/lib/typescript/commonjs/field/types.d.ts +2 -0
- package/lib/typescript/commonjs/field/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/types.d.ts +1 -0
- package/lib/typescript/commonjs/floating/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/item/Item.d.ts.map +1 -1
- package/lib/typescript/commonjs/job-board/JobCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/label/Label.d.ts +1 -1
- package/lib/typescript/commonjs/label/Label.d.ts.map +1 -1
- package/lib/typescript/commonjs/label/types.d.ts +2 -0
- package/lib/typescript/commonjs/label/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-details/AmenityList.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/common-messages.d.ts +2 -0
- package/lib/typescript/commonjs/locale/common-messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/overlay/InteractionBoundary.d.ts +7 -0
- package/lib/typescript/commonjs/overlay/InteractionBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/payment-method/PaymentMethodList.d.ts.map +1 -1
- package/lib/typescript/commonjs/place-details/PlaceAmenities.d.ts.map +1 -1
- package/lib/typescript/commonjs/place-details/PlacePopularTimes.d.ts.map +1 -1
- package/lib/typescript/commonjs/proof-of-delivery/ProofOfDelivery.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/Select.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/Select.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/use-required-description.d.ts +7 -0
- package/lib/typescript/commonjs/select/use-required-description.d.ts.map +1 -0
- package/lib/typescript/commonjs/settings-modal/rows.d.ts +9 -0
- package/lib/typescript/commonjs/settings-modal/rows.d.ts.map +1 -0
- package/lib/typescript/module/ai-chat/AiChatResizeHandle.d.ts +11 -0
- package/lib/typescript/module/ai-chat/AiChatResizeHandle.d.ts.map +1 -0
- package/lib/typescript/module/ai-chat/AiChatShell.d.ts +1 -10
- package/lib/typescript/module/ai-chat/AiChatShell.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.d.ts +2 -1
- package/lib/typescript/module/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.web.d.ts +2 -1
- package/lib/typescript/module/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/messages.d.ts +0 -1
- package/lib/typescript/module/ai-chat/messages.d.ts.map +1 -1
- package/lib/typescript/module/button/Button.d.ts.map +1 -1
- package/lib/typescript/module/card-form/shared.d.ts +2 -1
- package/lib/typescript/module/card-form/shared.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/AttachmentMenu.d.ts +1 -2
- package/lib/typescript/module/chat-composer/AttachmentMenu.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/AttachmentMenu.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/AttachmentMenu.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/ChatComposer.d.ts +1 -2
- package/lib/typescript/module/chat-composer/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/ChatComposer.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/ChatComposer.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/ComposerAttachmentStrip.d.ts +1 -2
- package/lib/typescript/module/chat-composer/ComposerAttachmentStrip.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/ComposerAttachmentStrip.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/ComposerAttachmentStrip.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/ComposerBanner.d.ts +1 -2
- package/lib/typescript/module/chat-composer/ComposerBanner.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/ComposerBanner.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/ComposerBanner.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/EmojiPicker.d.ts +1 -2
- package/lib/typescript/module/chat-composer/EmojiPicker.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/EmojiPicker.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/EmojiPicker.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/MessageContextMenu.d.ts +1 -2
- package/lib/typescript/module/chat-composer/MessageContextMenu.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/MessageContextMenu.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/MessageContextMenu.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/ReactionPicker.d.ts +1 -2
- package/lib/typescript/module/chat-composer/ReactionPicker.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/ReactionPicker.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/ReactionPicker.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/SuggestionList.d.ts +1 -2
- package/lib/typescript/module/chat-composer/SuggestionList.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/SuggestionList.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/SuggestionList.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/VoiceRecorder.d.ts +1 -2
- package/lib/typescript/module/chat-composer/VoiceRecorder.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/VoiceRecorder.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/VoiceRecorder.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-attachment-menu.d.ts +11 -0
- package/lib/typescript/module/chat-composer/create-attachment-menu.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-chat-composer.d.ts +11 -0
- package/lib/typescript/module/chat-composer/create-chat-composer.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-composer-attachment-strip.d.ts +7 -0
- package/lib/typescript/module/chat-composer/create-composer-attachment-strip.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-composer-banner.d.ts +7 -0
- package/lib/typescript/module/chat-composer/create-composer-banner.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-emoji-picker.d.ts +9 -0
- package/lib/typescript/module/chat-composer/create-emoji-picker.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-message-context-menu.d.ts +14 -0
- package/lib/typescript/module/chat-composer/create-message-context-menu.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-reaction-picker.d.ts +9 -0
- package/lib/typescript/module/chat-composer/create-reaction-picker.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-suggestion-list.d.ts +7 -0
- package/lib/typescript/module/chat-composer/create-suggestion-list.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-voice-recorder.d.ts +11 -0
- package/lib/typescript/module/chat-composer/create-voice-recorder.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/index.web.d.ts +9 -9
- package/lib/typescript/module/chat-composer/index.web.d.ts.map +1 -1
- package/lib/typescript/module/chat-people/contact-row.d.ts +9 -0
- package/lib/typescript/module/chat-people/contact-row.d.ts.map +1 -0
- package/lib/typescript/module/earnings/EarningsSummary.d.ts.map +1 -1
- package/lib/typescript/module/field/Field.d.ts +1 -1
- package/lib/typescript/module/field/Field.d.ts.map +1 -1
- package/lib/typescript/module/field/types.d.ts +2 -0
- package/lib/typescript/module/field/types.d.ts.map +1 -1
- package/lib/typescript/module/floating/types.d.ts +1 -0
- package/lib/typescript/module/floating/types.d.ts.map +1 -1
- package/lib/typescript/module/item/Item.d.ts.map +1 -1
- package/lib/typescript/module/job-board/JobCard.d.ts.map +1 -1
- package/lib/typescript/module/label/Label.d.ts +1 -1
- package/lib/typescript/module/label/Label.d.ts.map +1 -1
- package/lib/typescript/module/label/types.d.ts +2 -0
- package/lib/typescript/module/label/types.d.ts.map +1 -1
- package/lib/typescript/module/listing-details/AmenityList.d.ts.map +1 -1
- package/lib/typescript/module/locale/common-messages.d.ts +2 -0
- package/lib/typescript/module/locale/common-messages.d.ts.map +1 -1
- package/lib/typescript/module/overlay/InteractionBoundary.d.ts +7 -0
- package/lib/typescript/module/overlay/InteractionBoundary.d.ts.map +1 -0
- package/lib/typescript/module/payment-method/PaymentMethodList.d.ts.map +1 -1
- package/lib/typescript/module/place-details/PlaceAmenities.d.ts.map +1 -1
- package/lib/typescript/module/place-details/PlacePopularTimes.d.ts.map +1 -1
- package/lib/typescript/module/proof-of-delivery/ProofOfDelivery.d.ts.map +1 -1
- package/lib/typescript/module/select/Select.d.ts.map +1 -1
- package/lib/typescript/module/select/Select.web.d.ts.map +1 -1
- package/lib/typescript/module/select/use-required-description.d.ts +7 -0
- package/lib/typescript/module/select/use-required-description.d.ts.map +1 -0
- package/lib/typescript/module/settings-modal/rows.d.ts +9 -0
- package/lib/typescript/module/settings-modal/rows.d.ts.map +1 -0
- package/package.json +35 -1
- package/src/ai-chat/AiChatResizeHandle.tsx +151 -0
- package/src/ai-chat/AiChatShell.tsx +8 -143
- package/src/ai-chat/index.ts +2 -1
- package/src/ai-chat/index.web.ts +2 -1
- package/src/ai-chat/messages.ts +0 -16
- package/src/app-shell/AppShellSplit.tsx +1 -1
- package/src/button/Button.tsx +35 -10
- package/src/button/GlyphButton.tsx +3 -3
- package/src/card-form/shared.ts +3 -2
- package/src/chat-composer/AttachmentMenu.tsx +2 -214
- package/src/chat-composer/AttachmentMenu.web.tsx +5 -0
- package/src/chat-composer/ChatComposer.tsx +2 -459
- package/src/chat-composer/ChatComposer.web.tsx +6 -0
- package/src/chat-composer/ComposerAttachmentStrip.tsx +2 -202
- package/src/chat-composer/ComposerAttachmentStrip.web.tsx +4 -0
- package/src/chat-composer/ComposerBanner.tsx +2 -157
- package/src/chat-composer/ComposerBanner.web.tsx +4 -0
- package/src/chat-composer/EmojiPicker.tsx +2 -402
- package/src/chat-composer/EmojiPicker.web.tsx +5 -0
- package/src/chat-composer/MessageContextMenu.tsx +2 -88
- package/src/chat-composer/MessageContextMenu.web.tsx +12 -0
- package/src/chat-composer/ReactionPicker.tsx +2 -100
- package/src/chat-composer/ReactionPicker.web.tsx +5 -0
- package/src/chat-composer/SuggestionList.tsx +2 -209
- package/src/chat-composer/SuggestionList.web.tsx +4 -0
- package/src/chat-composer/VoiceRecorder.tsx +2 -287
- package/src/chat-composer/VoiceRecorder.web.tsx +6 -0
- package/src/chat-composer/create-attachment-menu.tsx +228 -0
- package/src/chat-composer/create-chat-composer.tsx +473 -0
- package/src/chat-composer/create-composer-attachment-strip.tsx +212 -0
- package/src/chat-composer/create-composer-banner.tsx +167 -0
- package/src/chat-composer/create-emoji-picker.tsx +414 -0
- package/src/chat-composer/create-message-context-menu.tsx +112 -0
- package/src/chat-composer/create-reaction-picker.tsx +112 -0
- package/src/chat-composer/create-suggestion-list.tsx +219 -0
- package/src/chat-composer/create-voice-recorder.tsx +301 -0
- package/src/chat-composer/index.web.ts +9 -9
- package/src/chat-people/contact-row.ts +8 -0
- package/src/chat-screen/ChatSplitLayout.tsx +1 -1
- package/src/earnings/EarningsSummary.tsx +9 -2
- package/src/field/Field.tsx +2 -1
- package/src/field/types.ts +2 -0
- package/src/floating/types.ts +1 -0
- package/src/item/Item.tsx +16 -11
- package/src/job-board/JobCard.tsx +4 -1
- package/src/label/Label.tsx +2 -1
- package/src/label/types.ts +2 -0
- package/src/listing-details/AmenityList.tsx +4 -3
- package/src/locale/common-messages.ts +17 -0
- package/src/overlay/InteractionBoundary.tsx +24 -0
- package/src/payment-method/PaymentMethodList.tsx +2 -1
- package/src/place-details/PlaceAmenities.tsx +9 -0
- package/src/place-details/PlacePopularTimes.tsx +7 -1
- package/src/proof-of-delivery/ProofOfDelivery.tsx +9 -1
- package/src/proof-of-delivery/shared.ts +1 -1
- package/src/select/Select.tsx +5 -1
- package/src/select/Select.web.tsx +5 -1
- package/src/select/use-required-description.tsx +20 -0
- package/src/settings-modal/rows.ts +21 -0
|
@@ -1,204 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The pending-attachment strip between the banner stack and the bar.
|
|
3
|
-
*
|
|
4
|
-
* The tile geometry and the rounded-rect progress path are `composer-panel`'s —
|
|
5
|
-
* imported rather than retyped, because a second ring drawn from a second path
|
|
6
|
-
* helper is how two composers end up with rings that close at different angles.
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { Image, Pressable, ScrollView, View } from 'react-native';
|
|
10
|
-
import Svg, { Path } from 'react-native-svg';
|
|
11
|
-
|
|
12
|
-
import { ringPath } from '../composer-panel/shared';
|
|
13
|
-
import { RiCloseLine } from '../icons/remix/RiCloseLine';
|
|
14
|
-
import { RiFileTextLine } from '../icons/remix/RiFileTextLine';
|
|
15
|
-
import { useImageResolver } from '../image-resolver/context';
|
|
16
|
-
import { useTheme } from '../theme/use-theme';
|
|
17
|
-
import { Text } from '../typography';
|
|
18
1
|
import { ComposerIconButton } from './ComposerIconButton';
|
|
19
|
-
import {
|
|
20
|
-
import type { ChatComposerAttachment, ComposerAttachmentStripProps } from './types';
|
|
21
|
-
import { dataHook } from './web-hooks';
|
|
22
|
-
import { useMessages } from '../locale/messages';
|
|
23
|
-
import { CHAT_COMPOSER_MESSAGES } from './messages';
|
|
24
|
-
|
|
25
|
-
function isUrl(value: string): boolean {
|
|
26
|
-
return /^(https?:)?\/\//.test(value) || value.startsWith('data:') || value.startsWith('file:');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function Tile({
|
|
30
|
-
attachment,
|
|
31
|
-
size,
|
|
32
|
-
onRemove,
|
|
33
|
-
removeLabel,
|
|
34
|
-
onOpen,
|
|
35
|
-
openLabel,
|
|
36
|
-
testID,
|
|
37
|
-
}: {
|
|
38
|
-
attachment: ChatComposerAttachment;
|
|
39
|
-
size: number;
|
|
40
|
-
onRemove?: (id: string) => void;
|
|
41
|
-
removeLabel: (attachment: ChatComposerAttachment) => string;
|
|
42
|
-
onOpen?: (id: string) => void;
|
|
43
|
-
openLabel?: (attachment: ChatComposerAttachment) => string;
|
|
44
|
-
testID?: string;
|
|
45
|
-
}) {
|
|
46
|
-
const theme = useTheme();
|
|
47
|
-
const palette = resolveChatComposerPalette(theme);
|
|
48
|
-
const resolveImage = useImageResolver();
|
|
49
|
-
const Glyph = attachment.icon ?? RiFileTextLine;
|
|
50
|
-
const uploading = attachment.progress !== undefined;
|
|
51
|
-
const progress = Math.min(100, Math.max(0, attachment.progress ?? 0));
|
|
52
|
-
const radius = TILE_RADIUS - 1;
|
|
53
|
-
const path = ringPath(size, size, 1, radius);
|
|
54
|
-
// No `pathLength` on native, so the dash arithmetic needs the real length:
|
|
55
|
-
// four straight runs plus one full circle of the corner radius.
|
|
56
|
-
const length = 4 * (size - 2 - 2 * radius) + 2 * Math.PI * radius;
|
|
57
|
-
|
|
58
|
-
const uri =
|
|
59
|
-
attachment.source === undefined
|
|
60
|
-
? undefined
|
|
61
|
-
: isUrl(attachment.source)
|
|
62
|
-
? attachment.source
|
|
63
|
-
: resolveImage?.(attachment.source, 'thumb');
|
|
64
|
-
|
|
65
|
-
// The box is a button only where the caller gave it something to do. A tile
|
|
66
|
-
// that is `role="button"` with no handler announces an action that is not
|
|
67
|
-
// there, and one that opens on press without a role is unreachable.
|
|
68
|
-
const Box = onOpen === undefined ? View : Pressable;
|
|
69
|
-
const boxProps =
|
|
70
|
-
onOpen === undefined
|
|
71
|
-
? {}
|
|
72
|
-
: {
|
|
73
|
-
role: 'button' as const,
|
|
74
|
-
accessibilityLabel: (openLabel ?? ((a: ChatComposerAttachment) => a.name))(attachment),
|
|
75
|
-
onPress: () => onOpen(attachment.id),
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<View style={{ width: size, gap: 4 }} testID={testID}>
|
|
80
|
-
{/* The clipped box and the ring are SIBLINGS, never nested. Inside the
|
|
81
|
-
bordered box an inset-0 layer is the PADDING box — `size - 2` — so a
|
|
82
|
-
ring drawn in the tile's own `size` coordinates lands 1px off and has
|
|
83
|
-
its last edge cut away by the same `overflow: hidden` that rounds the
|
|
84
|
-
photo. The symptom is a ring that stops three quarters of the way
|
|
85
|
-
round while the dash arithmetic says it is complete. */}
|
|
86
|
-
<View style={{ position: 'relative', width: size, height: size }}>
|
|
87
|
-
<Box
|
|
88
|
-
{...boxProps}
|
|
89
|
-
style={{
|
|
90
|
-
width: size,
|
|
91
|
-
height: size,
|
|
92
|
-
borderRadius: TILE_RADIUS,
|
|
93
|
-
borderWidth: 1,
|
|
94
|
-
borderColor: palette.border,
|
|
95
|
-
backgroundColor: palette.inset,
|
|
96
|
-
alignItems: 'center',
|
|
97
|
-
justifyContent: 'center',
|
|
98
|
-
overflow: 'hidden',
|
|
99
|
-
}}>
|
|
100
|
-
{uri ? (
|
|
101
|
-
<Image
|
|
102
|
-
source={{ uri }}
|
|
103
|
-
accessibilityIgnoresInvertColors
|
|
104
|
-
style={{ width: size, height: size, opacity: uploading ? 0.6 : 1 }}
|
|
105
|
-
/>
|
|
106
|
-
) : (
|
|
107
|
-
<Glyph width={22} height={22} fill={palette.iconSecondary} />
|
|
108
|
-
)}
|
|
109
|
-
</Box>
|
|
110
|
-
{uploading ? (
|
|
111
|
-
<View
|
|
112
|
-
{...dataHook('bloomChatComposerRing')}
|
|
113
|
-
pointerEvents="none"
|
|
114
|
-
style={{ position: 'absolute', top: 0, left: 0, width: size, height: size }}
|
|
115
|
-
testID={testID ? `${testID}-ring` : undefined}>
|
|
116
|
-
<Svg width={size} height={size}>
|
|
117
|
-
<Path
|
|
118
|
-
d={path}
|
|
119
|
-
fill="none"
|
|
120
|
-
stroke={palette.accent}
|
|
121
|
-
strokeWidth={2}
|
|
122
|
-
strokeLinecap="round"
|
|
123
|
-
strokeDasharray={`${(length * progress) / 100} ${length}`}
|
|
124
|
-
/>
|
|
125
|
-
</Svg>
|
|
126
|
-
</View>
|
|
127
|
-
) : null}
|
|
128
|
-
</View>
|
|
129
|
-
{onRemove && !uploading ? (
|
|
130
|
-
<View style={{ position: 'absolute', top: -6, right: -6 }}>
|
|
131
|
-
<ComposerIconButton
|
|
132
|
-
icon={RiCloseLine}
|
|
133
|
-
accessibilityLabel={removeLabel(attachment)}
|
|
134
|
-
onPress={() => onRemove(attachment.id)}
|
|
135
|
-
size={20}
|
|
136
|
-
iconSize={12}
|
|
137
|
-
style={{
|
|
138
|
-
backgroundColor: palette.surface,
|
|
139
|
-
borderWidth: 1,
|
|
140
|
-
borderColor: palette.border,
|
|
141
|
-
}}
|
|
142
|
-
testID={testID ? `${testID}-remove` : undefined}
|
|
143
|
-
/>
|
|
144
|
-
</View>
|
|
145
|
-
) : null}
|
|
146
|
-
<Text
|
|
147
|
-
variant="caption-2-regular"
|
|
148
|
-
numberOfLines={1}
|
|
149
|
-
style={{ color: uploading ? palette.accent : palette.textSecondary }}>
|
|
150
|
-
{uploading ? `${Math.round(progress)}%` : (attachment.caption ?? attachment.name)}
|
|
151
|
-
</Text>
|
|
152
|
-
</View>
|
|
153
|
-
);
|
|
154
|
-
}
|
|
2
|
+
import { createComposerAttachmentStrip } from './create-composer-attachment-strip';
|
|
155
3
|
|
|
156
|
-
export
|
|
157
|
-
attachments,
|
|
158
|
-
onRemove,
|
|
159
|
-
onOpen,
|
|
160
|
-
size = TILE,
|
|
161
|
-
removeLabel: removeLabelProp,
|
|
162
|
-
openLabel,
|
|
163
|
-
style,
|
|
164
|
-
testID,
|
|
165
|
-
accessibilityLabel: accessibilityLabelProp,
|
|
166
|
-
}: ComposerAttachmentStripProps) {
|
|
167
|
-
const { messages } = useMessages(CHAT_COMPOSER_MESSAGES);
|
|
168
|
-
const removeLabel = removeLabelProp ?? ((attachment: ChatComposerAttachment) => messages.removeAttachment(attachment.name));
|
|
169
|
-
const accessibilityLabel = accessibilityLabelProp ?? messages.attachments;
|
|
170
|
-
if (attachments.length === 0) return null;
|
|
171
|
-
return (
|
|
172
|
-
<ScrollView
|
|
173
|
-
{...dataHook('bloomChatComposerScroll')}
|
|
174
|
-
horizontal
|
|
175
|
-
showsHorizontalScrollIndicator={false}
|
|
176
|
-
accessibilityLabel={accessibilityLabel}
|
|
177
|
-
contentContainerStyle={{
|
|
178
|
-
flexDirection: 'row',
|
|
179
|
-
gap: 10,
|
|
180
|
-
// The remove disc hangs 6px past the tile on both axes and a horizontal
|
|
181
|
-
// ScrollView clips its cross axis (`overflow-y: hidden` on web), so the
|
|
182
|
-
// top pad is the disc's overhang plus its border — not a rhythm value.
|
|
183
|
-
paddingLeft: 8,
|
|
184
|
-
paddingRight: 8,
|
|
185
|
-
paddingTop: 10,
|
|
186
|
-
paddingBottom: 2,
|
|
187
|
-
}}
|
|
188
|
-
style={[{ flexGrow: 0 }, style]}
|
|
189
|
-
testID={testID}>
|
|
190
|
-
{attachments.map((attachment) => (
|
|
191
|
-
<Tile
|
|
192
|
-
key={attachment.id}
|
|
193
|
-
attachment={attachment}
|
|
194
|
-
size={size}
|
|
195
|
-
onRemove={onRemove}
|
|
196
|
-
removeLabel={removeLabel}
|
|
197
|
-
onOpen={onOpen}
|
|
198
|
-
openLabel={openLabel}
|
|
199
|
-
testID={testID ? `${testID}-${attachment.id}` : undefined}
|
|
200
|
-
/>
|
|
201
|
-
))}
|
|
202
|
-
</ScrollView>
|
|
203
|
-
);
|
|
204
|
-
}
|
|
4
|
+
export const ComposerAttachmentStrip = createComposerAttachmentStrip({ ComposerIconButton });
|
|
@@ -1,159 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The stack above the input: a reply / edit / forward preview, or the one-line
|
|
3
|
-
* `note` a slow-mode countdown and a scheduled send use.
|
|
4
|
-
*
|
|
5
|
-
* Every banner is the same row — rail, glyph, optional thumbnail, two lines of
|
|
6
|
-
* text, a close button — because they are the same affordance ("the next
|
|
7
|
-
* message is about THIS, and here is how to get out of it"). `note` drops the
|
|
8
|
-
* rail and the surface, which is the difference between "you are in a mode" and
|
|
9
|
-
* "here is a fact about sending".
|
|
10
|
-
*/
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import { Image, View } from 'react-native';
|
|
13
|
-
|
|
14
|
-
import { RiCloseLine } from '../icons/remix/RiCloseLine';
|
|
15
|
-
import { useImageResolver } from '../image-resolver/context';
|
|
16
|
-
import { useTheme } from '../theme/use-theme';
|
|
17
|
-
import { Text } from '../typography';
|
|
18
1
|
import { ComposerIconButton } from './ComposerIconButton';
|
|
19
|
-
import {
|
|
20
|
-
BANNER_ICONS,
|
|
21
|
-
BANNER_RADIUS,
|
|
22
|
-
BANNER_RAIL_WIDTH,
|
|
23
|
-
resolveChatComposerPalette,
|
|
24
|
-
} from './shared';
|
|
25
|
-
import type { ComposerBannerProps } from './types';
|
|
26
|
-
import { useCommonMessages } from '../locale/common-messages';
|
|
27
|
-
|
|
28
|
-
/** A URL passes through; a bare id goes to the app's `ImageResolver`. */
|
|
29
|
-
function isUrl(value: string): boolean {
|
|
30
|
-
return /^(https?:)?\/\//.test(value) || value.startsWith('data:') || value.startsWith('file:');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function ComposerBanner({
|
|
34
|
-
kind,
|
|
35
|
-
title,
|
|
36
|
-
preview,
|
|
37
|
-
thumbnail,
|
|
38
|
-
icon,
|
|
39
|
-
accentColor,
|
|
40
|
-
onClose,
|
|
41
|
-
closeLabel: closeLabelProp,
|
|
42
|
-
trailing,
|
|
43
|
-
style,
|
|
44
|
-
testID,
|
|
45
|
-
accessibilityLabel,
|
|
46
|
-
}: ComposerBannerProps) {
|
|
47
|
-
const common = useCommonMessages();
|
|
48
|
-
const closeLabel = closeLabelProp ?? common.cancel;
|
|
49
|
-
const theme = useTheme();
|
|
50
|
-
const palette = resolveChatComposerPalette(theme);
|
|
51
|
-
const resolveImage = useImageResolver();
|
|
52
|
-
const Icon = icon ?? BANNER_ICONS[kind];
|
|
53
|
-
const accent = accentColor ?? palette.accent;
|
|
54
|
-
const note = kind === 'note';
|
|
55
|
-
|
|
56
|
-
const thumbUri =
|
|
57
|
-
thumbnail === undefined ? undefined : isUrl(thumbnail) ? thumbnail : resolveImage?.(thumbnail, 'thumb');
|
|
58
|
-
|
|
59
|
-
if (note) {
|
|
60
|
-
return (
|
|
61
|
-
<View
|
|
62
|
-
accessibilityRole="text"
|
|
63
|
-
accessibilityLabel={accessibilityLabel ?? (preview ? `${title}. ${preview}` : title)}
|
|
64
|
-
style={[
|
|
65
|
-
{
|
|
66
|
-
flexDirection: 'row',
|
|
67
|
-
alignItems: 'center',
|
|
68
|
-
gap: 6,
|
|
69
|
-
paddingLeft: 10,
|
|
70
|
-
paddingRight: 6,
|
|
71
|
-
paddingTop: 2,
|
|
72
|
-
paddingBottom: 2,
|
|
73
|
-
},
|
|
74
|
-
style,
|
|
75
|
-
]}
|
|
76
|
-
testID={testID}>
|
|
77
|
-
<Icon width={14} height={14} fill={palette.iconSecondary} />
|
|
78
|
-
<Text variant="caption-1-regular" numberOfLines={1} style={{ color: palette.textSecondary, flexShrink: 1 }}>
|
|
79
|
-
{title}
|
|
80
|
-
</Text>
|
|
81
|
-
{preview ? (
|
|
82
|
-
<Text variant="caption-1-regular" numberOfLines={1} style={{ color: palette.textPlaceholder, flexShrink: 1 }}>
|
|
83
|
-
{preview}
|
|
84
|
-
</Text>
|
|
85
|
-
) : null}
|
|
86
|
-
<View style={{ flexGrow: 1 }} />
|
|
87
|
-
{trailing}
|
|
88
|
-
{onClose ? (
|
|
89
|
-
<ComposerIconButton
|
|
90
|
-
icon={RiCloseLine}
|
|
91
|
-
accessibilityLabel={closeLabel}
|
|
92
|
-
onPress={onClose}
|
|
93
|
-
size={24}
|
|
94
|
-
iconSize={14}
|
|
95
|
-
/>
|
|
96
|
-
) : null}
|
|
97
|
-
</View>
|
|
98
|
-
);
|
|
99
|
-
}
|
|
2
|
+
import { createComposerBanner } from './create-composer-banner';
|
|
100
3
|
|
|
101
|
-
|
|
102
|
-
<View
|
|
103
|
-
accessibilityLabel={accessibilityLabel ?? (preview ? `${title}. ${preview}` : title)}
|
|
104
|
-
style={[
|
|
105
|
-
{
|
|
106
|
-
flexDirection: 'row',
|
|
107
|
-
alignItems: 'center',
|
|
108
|
-
gap: 10,
|
|
109
|
-
borderRadius: BANNER_RADIUS,
|
|
110
|
-
backgroundColor: palette.accentSoft,
|
|
111
|
-
paddingLeft: 8,
|
|
112
|
-
paddingRight: 4,
|
|
113
|
-
paddingTop: 6,
|
|
114
|
-
paddingBottom: 6,
|
|
115
|
-
},
|
|
116
|
-
style,
|
|
117
|
-
]}
|
|
118
|
-
testID={testID}>
|
|
119
|
-
<View
|
|
120
|
-
testID={testID ? `${testID}-rail` : undefined}
|
|
121
|
-
style={{
|
|
122
|
-
width: BANNER_RAIL_WIDTH,
|
|
123
|
-
alignSelf: 'stretch',
|
|
124
|
-
minHeight: 32,
|
|
125
|
-
borderRadius: 2,
|
|
126
|
-
backgroundColor: accent,
|
|
127
|
-
}}
|
|
128
|
-
/>
|
|
129
|
-
<Icon width={18} height={18} fill={accent} />
|
|
130
|
-
{thumbUri ? (
|
|
131
|
-
<Image
|
|
132
|
-
source={{ uri: thumbUri }}
|
|
133
|
-
accessibilityIgnoresInvertColors
|
|
134
|
-
style={{ width: 32, height: 32, borderRadius: 8, backgroundColor: palette.inset }}
|
|
135
|
-
/>
|
|
136
|
-
) : null}
|
|
137
|
-
<View style={{ flexShrink: 1, flexGrow: 1, gap: 1 }}>
|
|
138
|
-
<Text variant="body-2-medium" numberOfLines={1} style={{ color: accent }}>
|
|
139
|
-
{title}
|
|
140
|
-
</Text>
|
|
141
|
-
{preview ? (
|
|
142
|
-
<Text variant="body-2-regular" numberOfLines={1} style={{ color: palette.textSecondary }}>
|
|
143
|
-
{preview}
|
|
144
|
-
</Text>
|
|
145
|
-
) : null}
|
|
146
|
-
</View>
|
|
147
|
-
{trailing}
|
|
148
|
-
{onClose ? (
|
|
149
|
-
<ComposerIconButton
|
|
150
|
-
icon={RiCloseLine}
|
|
151
|
-
accessibilityLabel={closeLabel}
|
|
152
|
-
onPress={onClose}
|
|
153
|
-
size={28}
|
|
154
|
-
iconSize={16}
|
|
155
|
-
/>
|
|
156
|
-
) : null}
|
|
157
|
-
</View>
|
|
158
|
-
);
|
|
159
|
-
}
|
|
4
|
+
export const ComposerBanner = createComposerBanner({ ComposerIconButton });
|