@@ -42,7 +42,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState, type ReactNod
4242import { Provider } from 'react-redux' ;
4343import updateIn from 'simple-update-in' ;
4444
45- import StyleOptions from '../StyleOptions' ;
45+ import type StyleOptions from '../StyleOptions' ;
4646import errorBoxTelemetryPolymiddleware from '../errorBox/errorBoxTelemetryPolymiddleware' ;
4747import PrecompiledGlobalize from '../external/PrecompiledGlobalize' ;
4848import usePonyfill from '../hooks/usePonyfill' ;
@@ -89,6 +89,7 @@ import applyMiddleware, {
8989} from './middleware/applyMiddleware' ;
9090import createDefaultCardActionMiddleware from './middleware/createDefaultCardActionMiddleware' ;
9191import useMarkAllAsAcknowledged from './useMarkAllAsAcknowledged' ;
92+ import useStyleOptions from './useStyleOptions' ;
9293import ErrorBoundary from './utils/ErrorBoundary' ;
9394import observableToPromise from './utils/observableToPromise' ;
9495import { parseUIState } from './validation/uiState' ;
@@ -285,14 +286,14 @@ const ComposerCore = ({
285286 sendBoxMiddleware,
286287 sendBoxToolbarMiddleware,
287288 sendTypingIndicator,
288- styleOptions,
289289 toastMiddleware,
290290 typingIndicatorMiddleware,
291291 uiState,
292292 userID,
293293 username
294294} : ComposerCoreProps ) => {
295295 const [ ponyfill ] = usePonyfill ( ) ;
296+ const [ styleOptions ] = useStyleOptions ( ) ;
296297 const dispatch = useDispatch ( ) ;
297298 const telemetryDimensionsRef = useRef ( { } ) ;
298299
@@ -637,7 +638,6 @@ ComposerCore.defaultProps = {
637638 scrollToEndButtonMiddleware : undefined ,
638639 selectVoice : undefined ,
639640 sendTypingIndicator : false ,
640- styleOptions : { } ,
641641 toastMiddleware : undefined ,
642642 typingIndicatorMiddleware : undefined ,
643643 uiState : undefined ,
@@ -679,7 +679,6 @@ ComposerCore.propTypes = {
679679 scrollToEndButtonMiddleware : PropTypes . oneOfType ( [ PropTypes . arrayOf ( PropTypes . func ) , PropTypes . func ] ) ,
680680 selectVoice : PropTypes . func ,
681681 sendTypingIndicator : PropTypes . bool ,
682- styleOptions : PropTypes . any ,
683682 toastMiddleware : PropTypes . oneOfType ( [ PropTypes . arrayOf ( PropTypes . func ) , PropTypes . func ] ) ,
684683 typingIndicatorMiddleware : PropTypes . oneOfType ( [ PropTypes . arrayOf ( PropTypes . func ) , PropTypes . func ] ) ,
685684 uiState : PropTypes . oneOf ( [ 'blueprint' , 'disabled' ] ) ,
@@ -693,7 +692,7 @@ type ComposerWithStoreProps = ComposerCoreProps &
693692 } > ;
694693
695694type ComposerProps = ComposerWithStoreProps & {
696- internalRenderErrorBox ?: any ;
695+ readonly internalRenderErrorBox ?: any ;
697696
698697 /**
699698 * Ponyfill to overrides specific global scope members. This prop cannot be changed after initial render.
@@ -704,7 +703,8 @@ type ComposerProps = ComposerWithStoreProps & {
704703 *
705704 * Please see [#4662](https://github.com/microsoft/BotFramework-WebChat/pull/4662) for details.
706705 */
707- ponyfill ?: Partial < GlobalScopePonyfill > ;
706+ readonly ponyfill ?: Partial < GlobalScopePonyfill > | undefined ;
707+ readonly styleOptions ?: StyleOptions | undefined ;
708708} ;
709709
710710// We will create a Redux store if it was not passed in
0 commit comments