@azure/communication-react 1.27.0-alpha-202505060018 → 1.27.0-alpha-202505080018

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/communication-react.d.ts +13 -8
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-B5W3lWxI.js → ChatMessageComponentAsRichTextEditBox-B81QX1sg.js} +18 -6
  3. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-B81QX1sg.js.map +1 -0
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DH4-wqph.js → RichTextSendBoxWrapper-BI2_fCfN.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DH4-wqph.js.map → RichTextSendBoxWrapper-BI2_fCfN.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-CDG9XlLH.js → index-DqeN0GxD.js} +43 -13
  7. package/dist/dist-cjs/communication-react/index-DqeN0GxD.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +17 -5
  12. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +10 -4
  14. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +4 -1
  16. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +9 -0
  18. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +23 -2
  19. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -4
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  22. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +4 -4
  23. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -1
  25. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  26. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +3 -1
  27. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +5 -0
  29. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-B5W3lWxI.js.map +0 -1
  32. package/dist/dist-cjs/communication-react/index-CDG9XlLH.js.map +0 -1
@@ -1052,13 +1052,13 @@ export declare interface CallAdapterCallOperations {
1052
1052
  *
1053
1053
  * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
1054
1054
  *
1055
- * @beta
1055
+ * @public
1056
1056
  */
1057
1057
  createTogetherModeStreamView(options?: TogetherModeStreamOptions): Promise<void | TogetherModeStreamViewResult>;
1058
1058
  /**
1059
1059
  * Start Together mode.
1060
1060
  *
1061
- * @beta
1061
+ * @public
1062
1062
  */
1063
1063
  startTogetherMode(): Promise<void>;
1064
1064
  /**
@@ -1070,7 +1070,7 @@ export declare interface CallAdapterCallOperations {
1070
1070
  * @param width - Width of the container
1071
1071
  * @param height - Height of the container
1072
1072
  *
1073
- * @beta
1073
+ * @public
1074
1074
  */
1075
1075
  setTogetherModeSceneSize(width: number, height: number): void;
1076
1076
  /**
@@ -1080,7 +1080,7 @@ export declare interface CallAdapterCallOperations {
1080
1080
  * This method is implemented for composite
1081
1081
  *
1082
1082
  *
1083
- * @beta
1083
+ * @public
1084
1084
  */
1085
1085
  disposeTogetherModeStreamView(): Promise<void>;
1086
1086
  /**
@@ -3839,7 +3839,7 @@ export declare interface CallWithChatAdapterManagement {
3839
3839
  *
3840
3840
  * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
3841
3841
  *
3842
- * @beta
3842
+ * @public
3843
3843
  */
3844
3844
  createTogetherModeStreamView(options?: TogetherModeStreamOptions): Promise<void | TogetherModeStreamViewResult>;
3845
3845
  /**
@@ -3849,7 +3849,7 @@ export declare interface CallWithChatAdapterManagement {
3849
3849
  * This method is implemented for composite
3850
3850
  *
3851
3851
  *
3852
- * @beta
3852
+ * @public
3853
3853
  */
3854
3854
  startTogetherMode(): Promise<void>;
3855
3855
  /**
@@ -3861,7 +3861,7 @@ export declare interface CallWithChatAdapterManagement {
3861
3861
  * @param width - Width of the container
3862
3862
  * @param height - Height of the container
3863
3863
  *
3864
- * @beta
3864
+ * @public
3865
3865
  */
3866
3866
  setTogetherModeSceneSize(width: number, height: number): void;
3867
3867
  /**
@@ -3870,7 +3870,7 @@ export declare interface CallWithChatAdapterManagement {
3870
3870
  * @remarks
3871
3871
  * This method is implemented for composite
3872
3872
  *
3873
- * @beta
3873
+ * @public
3874
3874
  */
3875
3875
  disposeTogetherModeStreamView(): Promise<void>;
3876
3876
  /**
@@ -6454,6 +6454,11 @@ export declare type CommonCallControlOptions = {
6454
6454
  * @defaultValue true
6455
6455
  */
6456
6456
  captionsButton?: boolean;
6457
+ /**
6458
+ * Show, Hide or Disable real time text during a call.
6459
+ * @defaultValue true
6460
+ */
6461
+ realTimeTextButton?: boolean;
6457
6462
  /**
6458
6463
  * Show, Hide or Disable gallery controls button during a call.
6459
6464
  * @defaultValue true
@@ -4,7 +4,7 @@ var react = require('@fluentui/react');
4
4
  var reactChat = require('@fluentui-contrib/react-chat');
5
5
  var reactComponents = require('@fluentui/react-components');
6
6
  require('@azure/communication-common');
7
- var index = require('./index-CDG9XlLH.js');
7
+ var index = require('./index-DqeN0GxD.js');
8
8
  var React = require('react');
9
9
  require('reselect');
10
10
  require('@azure/communication-calling');
@@ -91,15 +91,27 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
91
91
  // get plain text content from the editor to check if the message is empty
92
92
  // as the content may contain tags even when the content is empty
93
93
  const plainTextContent = (_b = (_a = editTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.getPlainContent()) !== null && _b !== void 0 ? _b : contentValue;
94
- return index.getMessageState(plainTextContent,
94
+ let messageLengthState = index.getMessageState(plainTextContent,
95
95
  /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata !== null && attachmentMetadata !== void 0 ? attachmentMetadata : []);
96
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
97
+ const imageIds = index.inlineImageIds(contentValue);
98
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
99
+ if (messageLengthState !== 'OK' && imageIds.length > 0) {
100
+ // Check if too long
101
+ if (index.isMessageTooLong(contentValue.length)) {
102
+ messageLengthState = 'too long';
103
+ }
104
+ else {
105
+ messageLengthState = 'OK';
106
+ }
107
+ }
108
+ return messageLengthState;
96
109
  }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, contentValue]);
97
110
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
98
111
  const imageUploadErrorMessage = React.useMemo(() => {
99
112
  var _a, _b;
100
113
  return (_b = (_a = inlineImagesWithProgress === null || inlineImagesWithProgress === void 0 ? void 0 : inlineImagesWithProgress.filter((image) => image.error).pop()) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message;
101
114
  }, [inlineImagesWithProgress]);
102
- const submitEnabled = messageState === 'OK';
103
115
  const editContainerStyles = index.useChatMessageRichTextEditContainerStyles();
104
116
  const chatMyMessageStyles = index.useChatMyMessageStyles();
105
117
  const locale = index.useLocale().strings;
@@ -135,7 +147,7 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
135
147
  return index.doesMessageContainMultipleAttachments(message);
136
148
  }, [message]);
137
149
  const onSubmitHandler = React.useCallback(() => {
138
- if (!submitEnabled) {
150
+ if (messageState !== 'OK') {
139
151
  return;
140
152
  }
141
153
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
@@ -176,7 +188,7 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
176
188
  onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);
177
189
  });
178
190
  }, [
179
- submitEnabled,
191
+ messageState,
180
192
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
181
193
  inlineImagesWithProgress,
182
194
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
@@ -276,4 +288,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
276
288
 
277
289
  exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
278
290
  exports.default = ChatMessageComponentAsRichTextEditBox;
279
- //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-B5W3lWxI.js.map
291
+ //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-B81QX1sg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-B81QX1sg.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE, modifyInlineImagesInContentString } from '../../utils/SendBoxUtils';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n hasIncompleteAttachmentUploads,\n removeBrokenImageContentAndClearImageSizeStyles,\n getContentWithUpdatedInlineImagesInfo,\n isMessageTooLong,\n inlineImageIds\n} from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n MessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { getPreviousInlineImages } from '../../utils/RichTextEditorUtils';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste?: (event: { content: DocumentFragment }) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress?: AttachmentMetadataInProgress[];\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage\n } = props;\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [initialInlineImages, setInitialInlineImages] = useState<Record<string, string>[]>([]);\n\n const initialContent = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const content = message.content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setInitialInlineImages(getPreviousInlineImages(content));\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n document.querySelectorAll('.broken-image-wrapper').forEach((brokenImage) => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n\n const [contentValue, setContentValue] = useState<string>(initialContent || '');\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [contentValueWithInlineImagesOverflow, setContentValueWithInlineImagesOverflow] = useState(false);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState: MessageState = useMemo(() => {\n // get plain text content from the editor to check if the message is empty\n // as the content may contain tags even when the content is empty\n const plainTextContent = editTextFieldRef.current?.getPlainContent() ?? contentValue;\n let messageLengthState = getMessageState(\n plainTextContent,\n /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageIds = inlineImageIds(contentValue);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (messageLengthState !== 'OK' && imageIds.length > 0) {\n // Check if too long\n if (isMessageTooLong(contentValue.length)) {\n messageLengthState = 'too long';\n } else {\n messageLengthState = 'OK';\n }\n }\n return messageLengthState;\n }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, contentValue]);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImagesWithProgress?.filter((image) => image.error).pop()?.error?.message;\n }, [inlineImagesWithProgress]);\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setContent = useCallback((newValue?: string): void => {\n setContentValue(newValue ?? '');\n }, []);\n\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n\n const textTooLongMessage = useMemo(() => {\n return messageState === 'too long' ||\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ contentValueWithInlineImagesOverflow\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n }, [\n messageState,\n strings.editBoxTextLimit,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ contentValueWithInlineImagesOverflow\n ]);\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const onSubmitHandler = useCallback((): void => {\n if (messageState !== 'OK') {\n return;\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (inlineImagesWithProgress && inlineImagesWithProgress.length > 0) {\n const contentWithUpdatedInlineImagesInfo = getContentWithUpdatedInlineImagesInfo(\n contentValue,\n inlineImagesWithProgress\n );\n const messageTooLong = isMessageTooLong(contentWithUpdatedInlineImagesInfo.length);\n // Set contentValueWithInlineImagesOverflow state to display the error bar\n setContentValueWithInlineImagesOverflow(messageTooLong);\n // The change from the setContentValueOverflow in the previous line will not kick in yet.\n // We need to rely on the local value of messageTooLong to return early if the message is too long.\n if (messageTooLong) {\n return;\n }\n }\n\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (hasIncompleteAttachmentUploads(inlineImagesWithProgress)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n let content = contentValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n let initInlineImages: Record<string, string>[] = [];\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n initInlineImages = initialInlineImages ?? [];\n modifyInlineImagesInContentString(content, initInlineImages, (content: string) => {\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n });\n }, [\n messageState,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n initialInlineImages,\n contentValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.imageUploadsPendingError,\n onSubmit,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata\n ]);\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n data-testId={'chat-message-rich-text-edit-box-cancel-button'}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n onSubmitHandler();\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={'chat-message-rich-text-edit-box-submit-button'}\n />\n </Stack>\n );\n }, [\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n onSubmitHandler\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const onChangeHandler = useCallback(\n (\n content: string | undefined,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n removedInlineImages?: Record<string, string>[]\n ) => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n removedInlineImages?.forEach((removedInlineImage: Record<string, string>) => {\n onRemoveInlineImage && onRemoveInlineImage(removedInlineImage, message.messageId);\n });\n setContent(content);\n },\n [\n setContent,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onRemoveInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ message.messageId\n ]\n );\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors\n textTooLongMessage={textTooLongMessage}\n systemMessage={message.failureReason}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n attachmentProgressError={\n imageUploadErrorMessage\n ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n }\n : undefined\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n onEnterKeyDown={onSubmitHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={initialContent}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste={onPaste}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage={\n onInsertInlineImage\n ? (imageAttributes: Record<string, string>) => {\n onInsertInlineImage(imageAttributes, message.messageId);\n }\n : undefined\n }\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachmentsInEditing : undefined\n )\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useState","useMemo","getPreviousInlineImages","BROKEN_IMAGE_SVG_DATA","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","getMessageState","inlineImageIds","isMessageTooLong","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","getContentWithUpdatedInlineImagesInfo","hasIncompleteAttachmentUploads","SendBoxErrorBarType","removeBrokenImageContentAndClearImageSizeStyles","modifyInlineImagesInContentString","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA8EA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;AACf,IAAA,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO;;IAEP,OAAO;;IAEP,mBAAmB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EACpC,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,aAAa,EAC/B,wBAAwB,EAAEC,gCAA0B,EACpD,0BAA0B,EAAE,IAAI;;AAEhC,gBAAA,yBAAyB,EAAE,yBAAyB;;AAEpD,gBAAA,OAAO,EAAE,OAAO;;AAEhB,gBAAA,mBAAmB,EACjB;AACE,sBAAE,CAAC,eAAuC,KAAI;AAC1C,wBAAA,mBAAmB,CAAC,eAAe,EAAE,OAAO,CAAC,SAAS,CAAC;;AAE3D,sBAAE,SAAS,EAEf,CAAA,CACI;AAEZ,KAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK;IACxG,QACE,oBAACC,uBAAa,EAAA,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE;AACJ,YAAA,SAAS,EAAEC,4BAAY,CACrB,mBAAmB,CAAC,IAAI;;YAExB,sBAAsB,GAAG,mBAAmB,CAAC,4BAA4B,GAAG,SAAS;AAExF,SAAA,EACD,IAAI,EAAE;YACJ,SAAS,EAAEA,4BAAY,CACrB,mBAAmB,CAAC,IAAI,EACxB,QAAQ,KAAK,KAAK,GAAG,mBAAmB,CAAC,YAAY,GAAG,SAAS;AAEpE,SAAA,EAAA,EAEA,UAAU,EAAE,CACC;AAEpB;;;;;"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var index = require('./index-CDG9XlLH.js');
4
+ var index = require('./index-DqeN0GxD.js');
5
5
  require('@fluentui/react');
6
6
  require('@azure/communication-common');
7
7
  require('@fluentui/react-components');
@@ -48,4 +48,4 @@ const RichTextSendBoxWrapper = (props) => {
48
48
  };
49
49
 
50
50
  exports.RichTextSendBoxWrapper = RichTextSendBoxWrapper;
51
- //# sourceMappingURL=RichTextSendBoxWrapper-DH4-wqph.js.map
51
+ //# sourceMappingURL=RichTextSendBoxWrapper-BI2_fCfN.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextSendBoxWrapper-DH4-wqph.js","sources":["../../../../react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport React from 'react';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { RichTextSendBox, RichTextSendBoxProps } from '@internal/react-components';\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (props: RichTextSendBoxProps): JSX.Element => {\n const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n\n return <RichTextSendBox {...richTextSendBoxProps} {...props} />;\n};\n"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAOA;AACA;;;;;AAKG;AACU,MAAA,sBAAsB,GAAG,CAAC,KAA2B,KAAiB;AACjF,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC;AAEzD,IAAA,OAAO,oBAACA,qBAAe,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,oBAAoB,EAAM,KAAK,EAAI;AACjE;;;;"}
1
+ {"version":3,"file":"RichTextSendBoxWrapper-BI2_fCfN.js","sources":["../../../../react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport React from 'react';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { RichTextSendBox, RichTextSendBoxProps } from '@internal/react-components';\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (props: RichTextSendBoxProps): JSX.Element => {\n const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n\n return <RichTextSendBox {...richTextSendBoxProps} {...props} />;\n};\n"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAOA;AACA;;;;;AAKG;AACU,MAAA,sBAAsB,GAAG,CAAC,KAA2B,KAAiB;AACjF,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC;AAEzD,IAAA,OAAO,oBAACA,qBAAe,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,oBAAoB,EAAM,KAAK,EAAI;AACjE;;;;"}
@@ -187,7 +187,7 @@ function getDefaultExportFromCjs (x) {
187
187
  // Copyright (c) Microsoft Corporation.
188
188
  // Licensed under the MIT License.
189
189
  // GENERATED FILE. DO NOT EDIT MANUALLY.
190
- var telemetryVersion = '1.27.0-alpha-202505060018';
190
+ var telemetryVersion = '1.27.0-alpha-202505080018';
191
191
 
192
192
 
193
193
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -11250,13 +11250,34 @@ const isAttachmentUploadCompleted = (attachmentsWithProgress) => {
11250
11250
  return !!(attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.find((attachment) => !attachment.error));
11251
11251
  };
11252
11252
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
11253
+ /**
11254
+ * Obtain any image nodes from the content DOM passed in
11255
+ * returns a list of image IDs
11256
+ * @internal
11257
+ */
11258
+ const inlineImageIds = (content) => {
11259
+ if (!content) {
11260
+ return [];
11261
+ }
11262
+ const document = new DOMParser().parseFromString(content, 'text/html');
11263
+ const imageTags = document.querySelectorAll('img');
11264
+ const ids = [];
11265
+ imageTags.forEach((node) => {
11266
+ const id = node.id;
11267
+ const url = node.src;
11268
+ if (id) {
11269
+ ids.push({ id, url });
11270
+ }
11271
+ });
11272
+ return ids;
11273
+ };
11274
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
11253
11275
  /**
11254
11276
  * Check if the content has inline image.
11255
11277
  * @internal
11256
11278
  */
11257
11279
  const hasInlineImageContent = (content) => {
11258
- const document = new DOMParser().parseFromString(content, 'text/html');
11259
- return !!document.querySelector('img');
11280
+ return inlineImageIds(content).length > 0;
11260
11281
  };
11261
11282
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
11262
11283
  /**
@@ -16380,7 +16401,7 @@ class _ErrorBoundary extends React.Component {
16380
16401
  // Copyright (c) Microsoft Corporation.
16381
16402
  // Licensed under the MIT License.
16382
16403
  /* @conditional-compile-remove(rich-text-editor) */
16383
- const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-B5W3lWxI.js'); }));
16404
+ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-B81QX1sg.js'); }));
16384
16405
  /**
16385
16406
  * @private
16386
16407
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -16388,7 +16409,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
16388
16409
  *
16389
16410
  * @conditional-compile-remove(rich-text-editor)
16390
16411
  */
16391
- const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-B5W3lWxI.js'); });
16412
+ const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-B81QX1sg.js'); });
16392
16413
  /**
16393
16414
  * @private
16394
16415
  */
@@ -22916,8 +22937,9 @@ const TogetherModeLayout = (props) => {
22916
22937
  * https://reactjs.org/docs/react-api.html#reactmemo
22917
22938
  */
22918
22939
  const TogetherModeStream = React.memo((props) => {
22919
- var _a, _b, _c;
22940
+ var _a, _b, _c, _d;
22920
22941
  const { startTogetherModeEnabled, isTogetherModeActive, onCreateTogetherModeStreamView, onStartTogetherMode, onSetTogetherModeSceneSize, onDisposeTogetherModeStreamView, togetherModeStreams, containerWidth, containerHeight } = props;
22942
+ const [showLoadingIndicator, setShowLoadingIndicator] = React.useState(false);
22921
22943
  React.useEffect(() => {
22922
22944
  return () => {
22923
22945
  // TODO: Isolate disposing behaviors for screenShare and videoStream
@@ -22941,14 +22963,19 @@ const TogetherModeStream = React.memo((props) => {
22941
22963
  (_b = togetherModeStreams === null || togetherModeStreams === void 0 ? void 0 : togetherModeStreams.mainVideoStream) === null || _b === void 0 ? void 0 : _b.isAvailable,
22942
22964
  onCreateTogetherModeStreamView
22943
22965
  ]);
22966
+ // Re-render the component if mainVideoStream isReceiving changes
22967
+ React.useEffect(() => {
22968
+ var _a;
22969
+ setShowLoadingIndicator(!((_a = togetherModeStreams === null || togetherModeStreams === void 0 ? void 0 : togetherModeStreams.mainVideoStream) === null || _a === void 0 ? void 0 : _a.isReceiving));
22970
+ // This effect will trigger a re-render when isReceiving changes
22971
+ }, [(_c = togetherModeStreams === null || togetherModeStreams === void 0 ? void 0 : togetherModeStreams.mainVideoStream) === null || _c === void 0 ? void 0 : _c.isReceiving]);
22944
22972
  // Update scene size only when container dimensions change
22945
22973
  React.useMemo(() => {
22946
22974
  if (onSetTogetherModeSceneSize && containerWidth && containerHeight) {
22947
22975
  onSetTogetherModeSceneSize(containerWidth, containerHeight);
22948
22976
  }
22949
22977
  }, [onSetTogetherModeSceneSize, containerWidth, containerHeight]);
22950
- const stream = (_c = props.togetherModeStreams) === null || _c === void 0 ? void 0 : _c.mainVideoStream;
22951
- const showLoadingIndicator = !(stream && stream.isAvailable && stream.isReceiving);
22978
+ const stream = (_d = props.togetherModeStreams) === null || _d === void 0 ? void 0 : _d.mainVideoStream;
22952
22979
  return containerWidth && containerHeight ? (React.createElement(react.Stack, { styles: togetherModeStreamRootStyle, horizontalAlign: "center", verticalAlign: "center", "data-ui-id": "together-mode-layout" },
22953
22980
  React.createElement(StreamMedia, { videoStreamElement: (stream === null || stream === void 0 ? void 0 : stream.renderElement) || null, isMirrored: true, loadingState: showLoadingIndicator ? 'loading' : 'none' }),
22954
22981
  React.createElement(MeetingReactionOverlay, { reactionResources: props.reactionResources || {}, localParticipant: props.localParticipant, remoteParticipants: props.remoteParticipants, togetherModeSeatPositions: props.seatingCoordinates, overlayMode: "together-mode" }))) : (React.createElement(React.Fragment, null));
@@ -32270,7 +32297,7 @@ const AttachmentDownloadErrorBar = (props) => {
32270
32297
  /**
32271
32298
  * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
32272
32299
  */
32273
- const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DH4-wqph.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
32300
+ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-BI2_fCfN.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
32274
32301
  /**
32275
32302
  * @private
32276
32303
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -32278,7 +32305,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
32278
32305
  *
32279
32306
  /* @conditional-compile-remove(rich-text-editor-composite-support)
32280
32307
  */
32281
- const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DH4-wqph.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
32308
+ const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-BI2_fCfN.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
32282
32309
  /**
32283
32310
  * @private
32284
32311
  */
@@ -36446,7 +36473,7 @@ const CommonCallControlBar = (props) => {
36446
36473
  const cameraButtonIsEnabled = isEnabled$1(options === null || options === void 0 ? void 0 : options.cameraButton);
36447
36474
  const showExitSpotlightButton = (options === null || options === void 0 ? void 0 : options.exitSpotlightButton) !== false;
36448
36475
  const showCaptionsButton = props.isCaptionsSupported && isEnabled$1(options.captionsButton);
36449
- const showRealTimeTextButton = props.isRealTimeTextSupported;
36476
+ const showRealTimeTextButton = props.isRealTimeTextSupported && isEnabled$1(options.realTimeTextButton);
36450
36477
  const showTeamsMeetingPhoneCallButton = isEnabled$1(options === null || options === void 0 ? void 0 : options.teamsMeetingPhoneCallButton);
36451
36478
  const showDesktopMoreButton = isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
36452
36479
  (isEnabled$1(options === null || options === void 0 ? void 0 : options.holdButton) ||
@@ -36798,7 +36825,9 @@ const MoreDrawer = (props) => {
36798
36825
  }, [speakers, onSelectSpeaker, onLightDismiss]);
36799
36826
  const drawerSelectionOptions = inferCallWithChatControlOptions(props.callControls);
36800
36827
  const showCaptionsButton = props.isCaptionsSupported && drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions.captionsButton);
36801
- const showRealTimeTextButton = props.isRealTimeTextSupported;
36828
+ const showRealTimeTextButton = props.isRealTimeTextSupported &&
36829
+ drawerSelectionOptions !== false &&
36830
+ isEnabled(drawerSelectionOptions.realTimeTextButton);
36802
36831
  if (props.reactionResources !== undefined) {
36803
36832
  drawerMenuItems.push({
36804
36833
  itemKey: 'reactions',
@@ -47690,6 +47719,7 @@ exports.getSelector = getSelector$1;
47690
47719
  exports.getSelector$1 = getSelector;
47691
47720
  exports.hasIncompleteAttachmentUploads = hasIncompleteAttachmentUploads;
47692
47721
  exports.imageOverlayTheme = imageOverlayTheme;
47722
+ exports.inlineImageIds = inlineImageIds;
47693
47723
  exports.isMessageTooLong = isMessageTooLong;
47694
47724
  exports.lightTheme = lightTheme;
47695
47725
  exports.modifyInlineImagesInContentString = modifyInlineImagesInContentString;
@@ -47722,4 +47752,4 @@ exports.useTeamsCall = useTeamsCall;
47722
47752
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
47723
47753
  exports.useTeamsCallAgent = useTeamsCallAgent;
47724
47754
  exports.useTheme = useTheme;
47725
- //# sourceMappingURL=index-CDG9XlLH.js.map
47755
+ //# sourceMappingURL=index-DqeN0GxD.js.map