@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
|
@@ -3,393 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ChatComposer =
|
|
7
|
-
var
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
|
-
var _RiAddLine = require("../icons/remix/RiAddLine.js");
|
|
11
|
-
var _RiCameraLine = require("../icons/remix/RiCameraLine.js");
|
|
12
|
-
var _RiEmotionLine = require("../icons/remix/RiEmotionLine.js");
|
|
13
|
-
var _RiForbidLine = require("../icons/remix/RiForbidLine.js");
|
|
14
|
-
var _RiMic2Line = require("../icons/remix/RiMic2Line.js");
|
|
15
|
-
var _RiSendPlaneLine = require("../icons/remix/RiSendPlaneLine.js");
|
|
16
|
-
var _useControllableState = require("../hooks/use-controllable-state.js");
|
|
17
|
-
var _useTextareaAutosize = require("../hooks/use-textarea-autosize.js");
|
|
18
|
-
var _useTheme = require("../theme/use-theme.js");
|
|
19
|
-
var _index = require("../typography/index.js");
|
|
20
|
-
var _scale = require("../typography/scale.js");
|
|
21
|
-
var _ComposerAttachmentStrip = require("./ComposerAttachmentStrip.js");
|
|
6
|
+
exports.ChatComposer = void 0;
|
|
7
|
+
var _ComposerAttachmentStrip = require("./ComposerAttachmentStrip");
|
|
22
8
|
var _ComposerIconButton = require("./ComposerIconButton");
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
31
|
-
/**
|
|
32
|
-
* The message input bar of a person-to-person chat: a radius-24 pill with a
|
|
33
|
-
* left attach button, an autosizing field, an emoji button and a right control
|
|
34
|
-
* that swaps between a mic (nothing to send) and an accent send disc (there is).
|
|
35
|
-
*
|
|
36
|
-
* Presentational. Every piece of state — the draft, the banners, the pending
|
|
37
|
-
* attachments, which suggestion is highlighted — arrives as a prop, because the
|
|
38
|
-
* app owns drafts per conversation and a composer that kept its own would lose
|
|
39
|
-
* them on every navigation.
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
const EASE_OUT = _reactNativeReanimated.Easing.bezier(0, 0, 0.2, 1);
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* One half of the mic ↔ send crossfade.
|
|
46
|
-
*
|
|
47
|
-
* Two things the fade must not break, neither of which the animation expresses:
|
|
48
|
-
*
|
|
49
|
-
* `pointerEvents` is a PROP, not a style entry — react-native-web drops it from
|
|
50
|
-
* a style object silently, and a hidden layer that still takes the press is a
|
|
51
|
-
* send button that fires when the field is empty.
|
|
52
|
-
*
|
|
53
|
-
* The hidden half leaves the ACCESSIBILITY TREE too. Both halves stay mounted so
|
|
54
|
-
* they can cross-fade, so without this every composer announces "Send" and
|
|
55
|
-
* "Record a voice message" side by side and only one of them does anything.
|
|
56
|
-
* `aria-hidden` is what react-native-web reads and
|
|
57
|
-
* `importantForAccessibility` is what React Native reads; a surface that sets
|
|
58
|
-
* one of the two is hidden on one platform only.
|
|
59
|
-
*/
|
|
60
|
-
function SwapLayer({
|
|
61
|
-
shown,
|
|
62
|
-
children
|
|
63
|
-
}) {
|
|
64
|
-
const reducedMotion = (0, _reactNativeReanimated.useReducedMotion)();
|
|
65
|
-
const progress = (0, _reactNativeReanimated.useSharedValue)(shown ? 1 : 0);
|
|
66
|
-
_react.default.useEffect(() => {
|
|
67
|
-
progress.value = reducedMotion ? shown ? 1 : 0 : (0, _reactNativeReanimated.withTiming)(shown ? 1 : 0, {
|
|
68
|
-
duration: _shared.SWAP_MS,
|
|
69
|
-
easing: EASE_OUT
|
|
70
|
-
});
|
|
71
|
-
}, [shown, reducedMotion, progress]);
|
|
72
|
-
const animated = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
73
|
-
opacity: progress.value
|
|
74
|
-
}), [progress]);
|
|
75
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
76
|
-
pointerEvents: shown ? 'auto' : 'none',
|
|
77
|
-
"aria-hidden": !shown,
|
|
78
|
-
accessibilityElementsHidden: !shown,
|
|
79
|
-
importantForAccessibility: shown ? 'auto' : 'no-hide-descendants',
|
|
80
|
-
style: [{
|
|
81
|
-
position: 'absolute',
|
|
82
|
-
top: 0,
|
|
83
|
-
left: 0
|
|
84
|
-
}, animated],
|
|
85
|
-
children: children
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/** A DOM keyboard event as react-native-web hands it to `onKeyPress`. */
|
|
90
|
-
|
|
91
|
-
function ChatComposer({
|
|
92
|
-
value,
|
|
93
|
-
defaultValue = '',
|
|
94
|
-
onValueChange,
|
|
95
|
-
placeholder: placeholderProp,
|
|
96
|
-
onSend,
|
|
97
|
-
sendOn = 'enter',
|
|
98
|
-
maxLines = _shared.DEFAULT_MAX_LINES,
|
|
99
|
-
minLines = 1,
|
|
100
|
-
disabled = false,
|
|
101
|
-
notice,
|
|
102
|
-
noticeIcon,
|
|
103
|
-
banner,
|
|
104
|
-
attachments,
|
|
105
|
-
onRemoveAttachment,
|
|
106
|
-
leading,
|
|
107
|
-
onAttachPress,
|
|
108
|
-
emojiSlot,
|
|
109
|
-
onEmojiPress,
|
|
110
|
-
onCameraPress,
|
|
111
|
-
onMicPress,
|
|
112
|
-
onMicPressIn,
|
|
113
|
-
onMicPressOut,
|
|
114
|
-
canSend,
|
|
115
|
-
recorder,
|
|
116
|
-
suggestions,
|
|
117
|
-
suggestionKind = 'mention',
|
|
118
|
-
activeIndex = -1,
|
|
119
|
-
onActiveIndexChange,
|
|
120
|
-
onSelectSuggestion,
|
|
121
|
-
onEscape,
|
|
122
|
-
onEditLast,
|
|
123
|
-
showKeyboardHint = false,
|
|
124
|
-
inputRef,
|
|
125
|
-
onFocus,
|
|
126
|
-
onBlur,
|
|
127
|
-
labels: labelOverrides,
|
|
128
|
-
style,
|
|
129
|
-
testID,
|
|
130
|
-
accessibilityLabel
|
|
131
|
-
}) {
|
|
132
|
-
const theme = (0, _useTheme.useTheme)();
|
|
133
|
-
const {
|
|
134
|
-
messages
|
|
135
|
-
} = (0, _messages.useMessages)(_messages2.CHAT_COMPOSER_MESSAGES);
|
|
136
|
-
const common = (0, _commonMessages.useCommonMessages)();
|
|
137
|
-
const palette = (0, _shared.resolveChatComposerPalette)(theme);
|
|
138
|
-
(0, _webHooks.useChatComposerWebCss)();
|
|
139
|
-
const labels = (0, _react.useMemo)(() => ({
|
|
140
|
-
...(0, _shared.chatComposerLabels)(messages, common.send),
|
|
141
|
-
...labelOverrides
|
|
142
|
-
}), [common.send, labelOverrides, messages]);
|
|
143
|
-
const placeholder = placeholderProp ?? messages.message;
|
|
144
|
-
const [text, setText] = (0, _useControllableState.useControllableState)({
|
|
145
|
-
value,
|
|
146
|
-
defaultValue,
|
|
147
|
-
onChange: onValueChange
|
|
148
|
-
});
|
|
149
|
-
const localRef = (0, _react.useRef)(null);
|
|
150
|
-
const setFieldRef = (0, _react.useCallback)(node => {
|
|
151
|
-
localRef.current = node;
|
|
152
|
-
if (inputRef) inputRef.current = node;
|
|
153
|
-
}, [inputRef]);
|
|
154
|
-
const minHeight = Math.max(1, minLines) * _shared.LINE_HEIGHT;
|
|
155
|
-
const maxHeight = Math.max(minLines, maxLines) * _shared.LINE_HEIGHT;
|
|
156
|
-
const [contentHeight, setContentHeight] = (0, _react.useState)(minHeight);
|
|
157
|
-
const height = Math.min(maxHeight, Math.max(minHeight, contentHeight));
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Web autosize measures the node, native reads `onContentSizeChange`.
|
|
161
|
-
*
|
|
162
|
-
* They are not interchangeable: react-native-web reports `scrollHeight`,
|
|
163
|
-
* which never falls below the height already applied, so a field grown to six
|
|
164
|
-
* lines and then emptied would stay six lines tall. `useTextareaAutosize`
|
|
165
|
-
* collapses the node to measure it only when the draft may have got SHORTER —
|
|
166
|
-
* collapsing on every keystroke re-laid-out the whole page three times a key.
|
|
167
|
-
*/
|
|
168
|
-
(0, _useTextareaAutosize.useTextareaAutosize)(localRef, text, {
|
|
169
|
-
enabled: _webHooks.IS_WEB,
|
|
170
|
-
height,
|
|
171
|
-
minHeight,
|
|
172
|
-
onMeasure: setContentHeight
|
|
173
|
-
});
|
|
174
|
-
const onContentSizeChange = (0, _react.useCallback)(event => {
|
|
175
|
-
if (_webHooks.IS_WEB) return;
|
|
176
|
-
setContentHeight(event.nativeEvent.contentSize.height);
|
|
177
|
-
}, []);
|
|
178
|
-
const trimmed = text.trim();
|
|
179
|
-
const hasAttachments = !!attachments && attachments.length > 0;
|
|
180
|
-
const showSend = canSend ?? (trimmed.length > 0 || hasAttachments);
|
|
181
|
-
const submit = (0, _react.useCallback)(() => {
|
|
182
|
-
if (disabled || !showSend) return;
|
|
183
|
-
onSend?.(text);
|
|
184
|
-
if (value === undefined) setText('');
|
|
185
|
-
}, [disabled, showSend, onSend, text, value, setText]);
|
|
186
|
-
const openSuggestions = !!suggestions && suggestions.length > 0;
|
|
187
|
-
const onKeyPress = (0, _react.useCallback)(event => {
|
|
188
|
-
if (!_webHooks.IS_WEB) return;
|
|
189
|
-
const native = event.nativeEvent;
|
|
190
|
-
// An IME candidate window is using the same keys; committing a
|
|
191
|
-
// composition must never send the half-written word behind it.
|
|
192
|
-
if (native.isComposing) return;
|
|
193
|
-
const mod = native.metaKey === true || native.ctrlKey === true;
|
|
194
|
-
if (openSuggestions && (native.key === 'ArrowDown' || native.key === 'ArrowUp')) {
|
|
195
|
-
event.preventDefault();
|
|
196
|
-
const count = suggestions?.length ?? 0;
|
|
197
|
-
const step = native.key === 'ArrowDown' ? 1 : -1;
|
|
198
|
-
const from = activeIndex < 0 ? step > 0 ? -1 : 0 : activeIndex;
|
|
199
|
-
onActiveIndexChange?.((from + step + count) % count);
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
if (native.key === 'Escape') {
|
|
203
|
-
event.preventDefault();
|
|
204
|
-
onEscape?.();
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
if (native.key === 'ArrowUp' && text.length === 0) {
|
|
208
|
-
event.preventDefault();
|
|
209
|
-
onEditLast?.();
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
if (native.key !== 'Enter') return;
|
|
213
|
-
if (openSuggestions && activeIndex >= 0) {
|
|
214
|
-
const picked = suggestions?.[activeIndex];
|
|
215
|
-
if (picked && !picked.disabled) {
|
|
216
|
-
event.preventDefault();
|
|
217
|
-
onSelectSuggestion?.(picked, activeIndex);
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
if (sendOn === 'enter' ? native.shiftKey !== true && !mod : mod) {
|
|
222
|
-
event.preventDefault();
|
|
223
|
-
submit();
|
|
224
|
-
}
|
|
225
|
-
}, [activeIndex, onActiveIndexChange, onEditLast, onEscape, onSelectSuggestion, openSuggestions, sendOn, submit, suggestions, text.length]);
|
|
226
|
-
const bar = {
|
|
227
|
-
flexDirection: 'row',
|
|
228
|
-
alignItems: 'flex-end',
|
|
229
|
-
gap: 2,
|
|
230
|
-
minHeight: _shared.CONTROL_SIZE + _shared.BAR_PADDING * 2,
|
|
231
|
-
borderRadius: _shared.BAR_RADIUS,
|
|
232
|
-
borderWidth: 1,
|
|
233
|
-
borderColor: palette.border,
|
|
234
|
-
// A disabled bar changes its FILL rather than its opacity. Dimming the
|
|
235
|
-
// container compounds with each control's own disabled opacity — 0.55 × 0.4
|
|
236
|
-
// put the send disc at 0.22, which reads as a rendering fault rather than a
|
|
237
|
-
// state.
|
|
238
|
-
backgroundColor: disabled ? palette.inset : palette.surface,
|
|
239
|
-
paddingLeft: _shared.BAR_PADDING,
|
|
240
|
-
paddingRight: _shared.BAR_PADDING,
|
|
241
|
-
paddingTop: _shared.BAR_PADDING,
|
|
242
|
-
paddingBottom: _shared.BAR_PADDING,
|
|
243
|
-
'--bloom-chat-composer-ring': palette.focusRing
|
|
244
|
-
};
|
|
245
|
-
const NoticeIcon = noticeIcon ?? _RiForbidLine.RiForbidLine;
|
|
246
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
247
|
-
accessibilityLabel: accessibilityLabel,
|
|
248
|
-
style: [{
|
|
249
|
-
width: '100%',
|
|
250
|
-
flexDirection: 'column',
|
|
251
|
-
gap: 6
|
|
252
|
-
}, style],
|
|
253
|
-
testID: testID,
|
|
254
|
-
children: [openSuggestions ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_SuggestionList.SuggestionList, {
|
|
255
|
-
kind: suggestionKind,
|
|
256
|
-
suggestions: suggestions ?? [],
|
|
257
|
-
activeIndex: activeIndex,
|
|
258
|
-
onActiveIndexChange: onActiveIndexChange,
|
|
259
|
-
onSelectSuggestion: onSelectSuggestion,
|
|
260
|
-
testID: testID ? `${testID}-suggestions` : undefined
|
|
261
|
-
}) : null, banner, hasAttachments ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComposerAttachmentStrip.ComposerAttachmentStrip, {
|
|
262
|
-
attachments: attachments ?? [],
|
|
263
|
-
onRemove: onRemoveAttachment,
|
|
264
|
-
testID: testID ? `${testID}-attachments` : undefined
|
|
265
|
-
}) : null, recorder ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
266
|
-
style: bar,
|
|
267
|
-
testID: testID ? `${testID}-bar` : undefined,
|
|
268
|
-
children: notice !== undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
269
|
-
style: {
|
|
270
|
-
flexDirection: 'row',
|
|
271
|
-
alignItems: 'center',
|
|
272
|
-
justifyContent: 'center',
|
|
273
|
-
gap: 8,
|
|
274
|
-
flexGrow: 1,
|
|
275
|
-
minHeight: _shared.CONTROL_SIZE,
|
|
276
|
-
paddingLeft: 12,
|
|
277
|
-
paddingRight: 12
|
|
278
|
-
},
|
|
279
|
-
testID: testID ? `${testID}-notice` : undefined,
|
|
280
|
-
children: typeof notice === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
281
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(NoticeIcon, {
|
|
282
|
-
width: 16,
|
|
283
|
-
height: 16,
|
|
284
|
-
fill: palette.iconSecondary
|
|
285
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Text, {
|
|
286
|
-
variant: "body-2-regular",
|
|
287
|
-
numberOfLines: 2,
|
|
288
|
-
style: {
|
|
289
|
-
color: palette.textSecondary,
|
|
290
|
-
textAlign: 'center'
|
|
291
|
-
},
|
|
292
|
-
children: notice
|
|
293
|
-
})]
|
|
294
|
-
}) : notice
|
|
295
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
296
|
-
children: [leading ?? (onAttachPress ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComposerIconButton.ComposerIconButton, {
|
|
297
|
-
icon: _RiAddLine.RiAddLine,
|
|
298
|
-
accessibilityLabel: labels.attach,
|
|
299
|
-
onPress: onAttachPress,
|
|
300
|
-
disabled: disabled,
|
|
301
|
-
iconSize: 22,
|
|
302
|
-
testID: testID ? `${testID}-attach` : undefined
|
|
303
|
-
}) : null), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
304
|
-
style: {
|
|
305
|
-
flexGrow: 1,
|
|
306
|
-
flexShrink: 1,
|
|
307
|
-
justifyContent: 'center',
|
|
308
|
-
minHeight: _shared.CONTROL_SIZE,
|
|
309
|
-
paddingLeft: 6,
|
|
310
|
-
paddingRight: 6
|
|
311
|
-
},
|
|
312
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
313
|
-
ref: setFieldRef,
|
|
314
|
-
...(0, _webHooks.dataHook)('bloomChatComposerInput'),
|
|
315
|
-
accessibilityLabel: labels.input,
|
|
316
|
-
multiline: true,
|
|
317
|
-
editable: !disabled,
|
|
318
|
-
value: text,
|
|
319
|
-
onChangeText: setText,
|
|
320
|
-
onKeyPress: onKeyPress,
|
|
321
|
-
onContentSizeChange: onContentSizeChange,
|
|
322
|
-
onFocus: onFocus,
|
|
323
|
-
onBlur: onBlur,
|
|
324
|
-
placeholder: placeholder,
|
|
325
|
-
placeholderTextColor: palette.textPlaceholder,
|
|
326
|
-
selectionColor: palette.accent,
|
|
327
|
-
cursorColor: palette.accent,
|
|
328
|
-
scrollEnabled: height >= maxHeight,
|
|
329
|
-
style: {
|
|
330
|
-
width: '100%',
|
|
331
|
-
height,
|
|
332
|
-
maxHeight,
|
|
333
|
-
padding: 0,
|
|
334
|
-
margin: 0,
|
|
335
|
-
..._scale.TYPE_SCALE['body-regular'],
|
|
336
|
-
fontFamily: _webHooks.IS_WEB ? 'var(--bloom-font-sans)' : 'Inter',
|
|
337
|
-
color: disabled ? palette.textSecondary : palette.text,
|
|
338
|
-
backgroundColor: 'transparent'
|
|
339
|
-
},
|
|
340
|
-
testID: testID ? `${testID}-input` : undefined
|
|
341
|
-
})
|
|
342
|
-
}), onCameraPress ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComposerIconButton.ComposerIconButton, {
|
|
343
|
-
icon: _RiCameraLine.RiCameraLine,
|
|
344
|
-
accessibilityLabel: labels.camera,
|
|
345
|
-
onPress: onCameraPress,
|
|
346
|
-
disabled: disabled,
|
|
347
|
-
testID: testID ? `${testID}-camera` : undefined
|
|
348
|
-
}) : null, emojiSlot ?? (onEmojiPress ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComposerIconButton.ComposerIconButton, {
|
|
349
|
-
icon: _RiEmotionLine.RiEmotionLine,
|
|
350
|
-
accessibilityLabel: labels.emoji,
|
|
351
|
-
onPress: onEmojiPress,
|
|
352
|
-
disabled: disabled,
|
|
353
|
-
testID: testID ? `${testID}-emoji` : undefined
|
|
354
|
-
}) : null), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
355
|
-
style: {
|
|
356
|
-
width: _shared.CONTROL_SIZE,
|
|
357
|
-
height: _shared.CONTROL_SIZE,
|
|
358
|
-
marginLeft: 2
|
|
359
|
-
},
|
|
360
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SwapLayer, {
|
|
361
|
-
shown: showSend,
|
|
362
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComposerIconButton.ComposerIconButton, {
|
|
363
|
-
icon: _RiSendPlaneLine.RiSendPlaneLine,
|
|
364
|
-
tone: "accent",
|
|
365
|
-
accessibilityLabel: labels.send,
|
|
366
|
-
onPress: submit,
|
|
367
|
-
disabled: disabled,
|
|
368
|
-
iconSize: 18,
|
|
369
|
-
testID: testID ? `${testID}-send` : undefined
|
|
370
|
-
})
|
|
371
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SwapLayer, {
|
|
372
|
-
shown: !showSend,
|
|
373
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComposerIconButton.ComposerIconButton, {
|
|
374
|
-
icon: _RiMic2Line.RiMic2Line,
|
|
375
|
-
accessibilityLabel: labels.mic,
|
|
376
|
-
onPress: onMicPress,
|
|
377
|
-
onPressIn: onMicPressIn,
|
|
378
|
-
onPressOut: onMicPressOut,
|
|
379
|
-
disabled: disabled,
|
|
380
|
-
testID: testID ? `${testID}-mic` : undefined
|
|
381
|
-
})
|
|
382
|
-
})]
|
|
383
|
-
})]
|
|
384
|
-
})
|
|
385
|
-
}), showKeyboardHint && _webHooks.IS_WEB && notice === undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Text, {
|
|
386
|
-
variant: "caption-2-regular",
|
|
387
|
-
style: {
|
|
388
|
-
color: palette.textPlaceholder,
|
|
389
|
-
paddingLeft: 14
|
|
390
|
-
},
|
|
391
|
-
children: sendOn === 'enter' ? labels.enterHint : labels.modEnterHint
|
|
392
|
-
}) : null]
|
|
393
|
-
});
|
|
394
|
-
}
|
|
9
|
+
var _SuggestionList = require("./SuggestionList");
|
|
10
|
+
var _createChatComposer = require("./create-chat-composer.js");
|
|
11
|
+
const ChatComposer = exports.ChatComposer = (0, _createChatComposer.createChatComposer)({
|
|
12
|
+
ComposerAttachmentStrip: _ComposerAttachmentStrip.ComposerAttachmentStrip,
|
|
13
|
+
ComposerIconButton: _ComposerIconButton.ComposerIconButton,
|
|
14
|
+
SuggestionList: _SuggestionList.SuggestionList
|
|
15
|
+
});
|
|
395
16
|
//# sourceMappingURL=ChatComposer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_RiAddLine","_RiCameraLine","_RiEmotionLine","_RiForbidLine","_RiMic2Line","_RiSendPlaneLine","_useControllableState","_useTextareaAutosize","_useTheme","_index","_scale","_ComposerAttachmentStrip","_ComposerIconButton","_shared","_SuggestionList","_webHooks","_messages","_messages2","_commonMessages","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EASE_OUT","Easing","bezier","SwapLayer","shown","children","reducedMotion","useReducedMotion","progress","useSharedValue","React","useEffect","value","withTiming","duration","SWAP_MS","easing","animated","useAnimatedStyle","opacity","jsx","View","pointerEvents","accessibilityElementsHidden","importantForAccessibility","style","position","top","left","ChatComposer","defaultValue","onValueChange","placeholder","placeholderProp","onSend","sendOn","maxLines","DEFAULT_MAX_LINES","minLines","disabled","notice","noticeIcon","banner","attachments","onRemoveAttachment","leading","onAttachPress","emojiSlot","onEmojiPress","onCameraPress","onMicPress","onMicPressIn","onMicPressOut","canSend","recorder","suggestions","suggestionKind","activeIndex","onActiveIndexChange","onSelectSuggestion","onEscape","onEditLast","showKeyboardHint","inputRef","onFocus","onBlur","labels","labelOverrides","testID","accessibilityLabel","theme","useTheme","messages","useMessages","CHAT_COMPOSER_MESSAGES","common","useCommonMessages","palette","resolveChatComposerPalette","useChatComposerWebCss","useMemo","chatComposerLabels","send","message","text","setText","useControllableState","onChange","localRef","useRef","setFieldRef","useCallback","node","current","minHeight","Math","max","LINE_HEIGHT","maxHeight","contentHeight","setContentHeight","useState","height","min","useTextareaAutosize","enabled","IS_WEB","onMeasure","onContentSizeChange","event","nativeEvent","contentSize","trimmed","trim","hasAttachments","length","showSend","submit","undefined","openSuggestions","onKeyPress","native","isComposing","mod","metaKey","ctrlKey","key","preventDefault","count","step","from","picked","shiftKey","bar","flexDirection","alignItems","gap","CONTROL_SIZE","BAR_PADDING","borderRadius","BAR_RADIUS","borderWidth","borderColor","border","backgroundColor","inset","surface","paddingLeft","paddingRight","paddingTop","paddingBottom","focusRing","NoticeIcon","RiForbidLine","jsxs","width","SuggestionList","kind","ComposerAttachmentStrip","onRemove","justifyContent","flexGrow","Fragment","fill","iconSecondary","Text","variant","numberOfLines","color","textSecondary","textAlign","ComposerIconButton","icon","RiAddLine","attach","onPress","iconSize","flexShrink","TextInput","ref","dataHook","input","multiline","editable","onChangeText","placeholderTextColor","textPlaceholder","selectionColor","accent","cursorColor","scrollEnabled","padding","margin","TYPE_SCALE","fontFamily","RiCameraLine","camera","RiEmotionLine","emoji","marginLeft","RiSendPlaneLine","tone","RiMic2Line","mic","onPressIn","onPressOut","enterHint","modEnterHint"],"sourceRoot":"../../../src","sources":["chat-composer/ChatComposer.tsx"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAQA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GA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;YAAU,CAC9C;UAAC,CACO,CAAC;QAAA,CACR,CAAC;MAAA,CACP;IACH,CACG,CACP,EAEAxD,gBAAgB,IAAI4C,gBAAM,IAAIlE,MAAM,KAAK8E,SAAS,gBACjD,IAAA1I,WAAA,CAAAwC,GAAA,EAAClD,MAAA,CAAAmM,IAAI;MACHC,OAAO,EAAC,mBAAmB;MAC3B7I,KAAK,EAAE;QAAE+I,KAAK,EAAE3F,OAAO,CAAC6G,eAAe;QAAEvC,WAAW,EAAE;MAAG,CAAE;MAAA9I,QAAA,EAC1D8B,MAAM,KAAK,OAAO,GAAG+B,MAAM,CAAC4I,SAAS,GAAG5I,MAAM,CAAC6I;IAAY,CACxD,CAAC,GACL,IAAI;EAAA,CACJ,CAAC;AAEX","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_ComposerAttachmentStrip","require","_ComposerIconButton","_SuggestionList","_createChatComposer","ChatComposer","exports","createChatComposer","ComposerAttachmentStrip","ComposerIconButton","SuggestionList"],"sourceRoot":"../../../src","sources":["chat-composer/ChatComposer.tsx"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAEO,MAAMI,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,sCAAkB,EAAC;EAAEC,uBAAuB,EAAvBA,gDAAuB;EAAEC,kBAAkB,EAAlBA,sCAAkB;EAAEC,cAAc,EAAdA;AAAe,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ChatComposer = void 0;
|
|
7
|
+
var _ComposerAttachmentStripWeb = require("./ComposerAttachmentStrip.web.js");
|
|
8
|
+
var _ComposerIconButtonWeb = require("./ComposerIconButton.web.js");
|
|
9
|
+
var _SuggestionListWeb = require("./SuggestionList.web.js");
|
|
10
|
+
var _createChatComposer = require("./create-chat-composer.js");
|
|
11
|
+
const ChatComposer = exports.ChatComposer = (0, _createChatComposer.createChatComposer)({
|
|
12
|
+
ComposerAttachmentStrip: _ComposerAttachmentStripWeb.ComposerAttachmentStrip,
|
|
13
|
+
ComposerIconButton: _ComposerIconButtonWeb.ComposerIconButton,
|
|
14
|
+
SuggestionList: _SuggestionListWeb.SuggestionList
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=ChatComposer.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_ComposerAttachmentStripWeb","require","_ComposerIconButtonWeb","_SuggestionListWeb","_createChatComposer","ChatComposer","exports","createChatComposer","ComposerAttachmentStrip","ComposerIconButton","SuggestionList"],"sourceRoot":"../../../src","sources":["chat-composer/ChatComposer.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,2BAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAEO,MAAMI,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,sCAAkB,EAAC;EAAEC,uBAAuB,EAAvBA,mDAAuB;EAAEC,kBAAkB,EAAlBA,yCAAkB;EAAEC,cAAc,EAAdA;AAAe,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,205 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ComposerAttachmentStrip =
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
|
|
10
|
-
var _shared = require("../composer-panel/shared.js");
|
|
11
|
-
var _RiCloseLine = require("../icons/remix/RiCloseLine.js");
|
|
12
|
-
var _RiFileTextLine = require("../icons/remix/RiFileTextLine.js");
|
|
13
|
-
var _context = require("../image-resolver/context.js");
|
|
14
|
-
var _useTheme = require("../theme/use-theme.js");
|
|
15
|
-
var _index = require("../typography/index.js");
|
|
6
|
+
exports.ComposerAttachmentStrip = void 0;
|
|
16
7
|
var _ComposerIconButton = require("./ComposerIconButton");
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
23
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
|
-
/**
|
|
25
|
-
* The pending-attachment strip between the banner stack and the bar.
|
|
26
|
-
*
|
|
27
|
-
* The tile geometry and the rounded-rect progress path are `composer-panel`'s —
|
|
28
|
-
* imported rather than retyped, because a second ring drawn from a second path
|
|
29
|
-
* helper is how two composers end up with rings that close at different angles.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
function isUrl(value) {
|
|
33
|
-
return /^(https?:)?\/\//.test(value) || value.startsWith('data:') || value.startsWith('file:');
|
|
34
|
-
}
|
|
35
|
-
function Tile({
|
|
36
|
-
attachment,
|
|
37
|
-
size,
|
|
38
|
-
onRemove,
|
|
39
|
-
removeLabel,
|
|
40
|
-
onOpen,
|
|
41
|
-
openLabel,
|
|
42
|
-
testID
|
|
43
|
-
}) {
|
|
44
|
-
const theme = (0, _useTheme.useTheme)();
|
|
45
|
-
const palette = (0, _shared2.resolveChatComposerPalette)(theme);
|
|
46
|
-
const resolveImage = (0, _context.useImageResolver)();
|
|
47
|
-
const Glyph = attachment.icon ?? _RiFileTextLine.RiFileTextLine;
|
|
48
|
-
const uploading = attachment.progress !== undefined;
|
|
49
|
-
const progress = Math.min(100, Math.max(0, attachment.progress ?? 0));
|
|
50
|
-
const radius = _shared2.TILE_RADIUS - 1;
|
|
51
|
-
const path = (0, _shared.ringPath)(size, size, 1, radius);
|
|
52
|
-
// No `pathLength` on native, so the dash arithmetic needs the real length:
|
|
53
|
-
// four straight runs plus one full circle of the corner radius.
|
|
54
|
-
const length = 4 * (size - 2 - 2 * radius) + 2 * Math.PI * radius;
|
|
55
|
-
const uri = attachment.source === undefined ? undefined : isUrl(attachment.source) ? attachment.source : resolveImage?.(attachment.source, 'thumb');
|
|
56
|
-
|
|
57
|
-
// The box is a button only where the caller gave it something to do. A tile
|
|
58
|
-
// that is `role="button"` with no handler announces an action that is not
|
|
59
|
-
// there, and one that opens on press without a role is unreachable.
|
|
60
|
-
const Box = onOpen === undefined ? _reactNative.View : _reactNative.Pressable;
|
|
61
|
-
const boxProps = onOpen === undefined ? {} : {
|
|
62
|
-
role: 'button',
|
|
63
|
-
accessibilityLabel: (openLabel ?? (a => a.name))(attachment),
|
|
64
|
-
onPress: () => onOpen(attachment.id)
|
|
65
|
-
};
|
|
66
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
67
|
-
style: {
|
|
68
|
-
width: size,
|
|
69
|
-
gap: 4
|
|
70
|
-
},
|
|
71
|
-
testID: testID,
|
|
72
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
73
|
-
style: {
|
|
74
|
-
position: 'relative',
|
|
75
|
-
width: size,
|
|
76
|
-
height: size
|
|
77
|
-
},
|
|
78
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
79
|
-
...boxProps,
|
|
80
|
-
style: {
|
|
81
|
-
width: size,
|
|
82
|
-
height: size,
|
|
83
|
-
borderRadius: _shared2.TILE_RADIUS,
|
|
84
|
-
borderWidth: 1,
|
|
85
|
-
borderColor: palette.border,
|
|
86
|
-
backgroundColor: palette.inset,
|
|
87
|
-
alignItems: 'center',
|
|
88
|
-
justifyContent: 'center',
|
|
89
|
-
overflow: 'hidden'
|
|
90
|
-
},
|
|
91
|
-
children: uri ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
92
|
-
source: {
|
|
93
|
-
uri
|
|
94
|
-
},
|
|
95
|
-
accessibilityIgnoresInvertColors: true,
|
|
96
|
-
style: {
|
|
97
|
-
width: size,
|
|
98
|
-
height: size,
|
|
99
|
-
opacity: uploading ? 0.6 : 1
|
|
100
|
-
}
|
|
101
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(Glyph, {
|
|
102
|
-
width: 22,
|
|
103
|
-
height: 22,
|
|
104
|
-
fill: palette.iconSecondary
|
|
105
|
-
})
|
|
106
|
-
}), uploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
107
|
-
...(0, _webHooks.dataHook)('bloomChatComposerRing'),
|
|
108
|
-
pointerEvents: "none",
|
|
109
|
-
style: {
|
|
110
|
-
position: 'absolute',
|
|
111
|
-
top: 0,
|
|
112
|
-
left: 0,
|
|
113
|
-
width: size,
|
|
114
|
-
height: size
|
|
115
|
-
},
|
|
116
|
-
testID: testID ? `${testID}-ring` : undefined,
|
|
117
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.default, {
|
|
118
|
-
width: size,
|
|
119
|
-
height: size,
|
|
120
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
121
|
-
d: path,
|
|
122
|
-
fill: "none",
|
|
123
|
-
stroke: palette.accent,
|
|
124
|
-
strokeWidth: 2,
|
|
125
|
-
strokeLinecap: "round",
|
|
126
|
-
strokeDasharray: `${length * progress / 100} ${length}`
|
|
127
|
-
})
|
|
128
|
-
})
|
|
129
|
-
}) : null]
|
|
130
|
-
}), onRemove && !uploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
131
|
-
style: {
|
|
132
|
-
position: 'absolute',
|
|
133
|
-
top: -6,
|
|
134
|
-
right: -6
|
|
135
|
-
},
|
|
136
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComposerIconButton.ComposerIconButton, {
|
|
137
|
-
icon: _RiCloseLine.RiCloseLine,
|
|
138
|
-
accessibilityLabel: removeLabel(attachment),
|
|
139
|
-
onPress: () => onRemove(attachment.id),
|
|
140
|
-
size: 20,
|
|
141
|
-
iconSize: 12,
|
|
142
|
-
style: {
|
|
143
|
-
backgroundColor: palette.surface,
|
|
144
|
-
borderWidth: 1,
|
|
145
|
-
borderColor: palette.border
|
|
146
|
-
},
|
|
147
|
-
testID: testID ? `${testID}-remove` : undefined
|
|
148
|
-
})
|
|
149
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Text, {
|
|
150
|
-
variant: "caption-2-regular",
|
|
151
|
-
numberOfLines: 1,
|
|
152
|
-
style: {
|
|
153
|
-
color: uploading ? palette.accent : palette.textSecondary
|
|
154
|
-
},
|
|
155
|
-
children: uploading ? `${Math.round(progress)}%` : attachment.caption ?? attachment.name
|
|
156
|
-
})]
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function ComposerAttachmentStrip({
|
|
160
|
-
attachments,
|
|
161
|
-
onRemove,
|
|
162
|
-
onOpen,
|
|
163
|
-
size = _shared2.TILE,
|
|
164
|
-
removeLabel: removeLabelProp,
|
|
165
|
-
openLabel,
|
|
166
|
-
style,
|
|
167
|
-
testID,
|
|
168
|
-
accessibilityLabel: accessibilityLabelProp
|
|
169
|
-
}) {
|
|
170
|
-
const {
|
|
171
|
-
messages
|
|
172
|
-
} = (0, _messages.useMessages)(_messages2.CHAT_COMPOSER_MESSAGES);
|
|
173
|
-
const removeLabel = removeLabelProp ?? (attachment => messages.removeAttachment(attachment.name));
|
|
174
|
-
const accessibilityLabel = accessibilityLabelProp ?? messages.attachments;
|
|
175
|
-
if (attachments.length === 0) return null;
|
|
176
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
177
|
-
...(0, _webHooks.dataHook)('bloomChatComposerScroll'),
|
|
178
|
-
horizontal: true,
|
|
179
|
-
showsHorizontalScrollIndicator: false,
|
|
180
|
-
accessibilityLabel: accessibilityLabel,
|
|
181
|
-
contentContainerStyle: {
|
|
182
|
-
flexDirection: 'row',
|
|
183
|
-
gap: 10,
|
|
184
|
-
// The remove disc hangs 6px past the tile on both axes and a horizontal
|
|
185
|
-
// ScrollView clips its cross axis (`overflow-y: hidden` on web), so the
|
|
186
|
-
// top pad is the disc's overhang plus its border — not a rhythm value.
|
|
187
|
-
paddingLeft: 8,
|
|
188
|
-
paddingRight: 8,
|
|
189
|
-
paddingTop: 10,
|
|
190
|
-
paddingBottom: 2
|
|
191
|
-
},
|
|
192
|
-
style: [{
|
|
193
|
-
flexGrow: 0
|
|
194
|
-
}, style],
|
|
195
|
-
testID: testID,
|
|
196
|
-
children: attachments.map(attachment => /*#__PURE__*/(0, _jsxRuntime.jsx)(Tile, {
|
|
197
|
-
attachment: attachment,
|
|
198
|
-
size: size,
|
|
199
|
-
onRemove: onRemove,
|
|
200
|
-
removeLabel: removeLabel,
|
|
201
|
-
onOpen: onOpen,
|
|
202
|
-
openLabel: openLabel,
|
|
203
|
-
testID: testID ? `${testID}-${attachment.id}` : undefined
|
|
204
|
-
}, attachment.id))
|
|
205
|
-
});
|
|
206
|
-
}
|
|
8
|
+
var _createComposerAttachmentStrip = require("./create-composer-attachment-strip.js");
|
|
9
|
+
const ComposerAttachmentStrip = exports.ComposerAttachmentStrip = (0, _createComposerAttachmentStrip.createComposerAttachmentStrip)({
|
|
10
|
+
ComposerIconButton: _ComposerIconButton.ComposerIconButton
|
|
11
|
+
});
|
|
207
12
|
//# sourceMappingURL=ComposerAttachmentStrip.js.map
|