11import { hooks } from 'botframework-webchat-api' ;
22import { type WebChatActivity } from 'botframework-webchat-core' ;
33import { validateProps } from 'botframework-webchat-react-valibot' ;
4- import React , { memo , useCallback , useMemo } from 'react' ;
5- import ReactSay , { SayUtterance } from 'react-say' ;
4+ import React , { Fragment , memo , useCallback , useMemo } from 'react' ;
5+ import Say , { SayUtterance } from 'react-say' ;
66import { useRefFrom } from 'use-ref-from' ;
77import { any , array , object , optional , pipe , readonly , string , type InferInput } from 'valibot' ;
88
99import useWebSpeechPonyfill from '../hooks/useWebSpeechPonyfill' ;
1010import SayAlt from './SayAlt' ;
1111
12- // TODO: [P*] Do we still need this?
13- // TODO: [P1] Interop between Babel and esbuild.
14- const Say = 'default' in ReactSay ? ( ReactSay . default as typeof ReactSay ) : ReactSay ;
1512const { useMarkActivityAsSpoken, useStyleOptions, useVoiceSelector } = hooks ;
1613
1714// TODO: [P4] Consider moving this feature into BasicActivity
@@ -104,7 +101,7 @@ function Speak(props: SpeakProps) {
104101
105102 return (
106103 ! ! activity && (
107- < React . Fragment >
104+ < Fragment >
108105 { speechSynthesisUtterance ? (
109106 < SayUtterance
110107 onEnd = { markAsSpoken }
@@ -122,7 +119,7 @@ function Speak(props: SpeakProps) {
122119 />
123120 ) }
124121 { ! ! showSpokenText && < SayAlt speak = { singleLine } /> }
125- </ React . Fragment >
122+ </ Fragment >
126123 )
127124 ) ;
128125}
0 commit comments