botframework-webchat-component 4.18.1 → 4.19.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.
Files changed (1389) hide show
  1. package/LICENSE +21 -0
  2. package/boot/deprecated/component.js +7 -0
  3. package/boot/deprecated/component.mjs +5 -0
  4. package/boot/deprecated/decorator.js +7 -0
  5. package/boot/deprecated/decorator.mjs +5 -0
  6. package/boot/deprecated/hook.js +7 -0
  7. package/boot/deprecated/hook.mjs +5 -0
  8. package/boot/deprecated/internal.js +7 -0
  9. package/boot/deprecated/internal.mjs +5 -0
  10. package/component.js +3 -0
  11. package/decorator.js +3 -0
  12. package/dist/TextBox-BEU2rUID.d.mts +46 -0
  13. package/dist/TextBox-BEU2rUID.d.ts +46 -0
  14. package/dist/_dtsroll-chunks/BlpMO3PT-empty-object.d.ts +34 -0
  15. package/dist/_dtsroll-chunks/Cha1SOtx-botframework-webchat-styles.react.d.ts +38 -0
  16. package/dist/_dtsroll-chunks/DP9nda2m-botframework-webchat-react-hooks.d.ts +19 -0
  17. package/dist/botframework-webchat-component.component.css +2 -0
  18. package/dist/botframework-webchat-component.component.css.map +1 -0
  19. package/dist/botframework-webchat-component.component.d.mts +9 -0
  20. package/dist/botframework-webchat-component.component.d.ts +9 -0
  21. package/dist/botframework-webchat-component.component.js +2 -0
  22. package/dist/botframework-webchat-component.component.js.map +1 -0
  23. package/dist/botframework-webchat-component.component.mjs +2 -0
  24. package/dist/botframework-webchat-component.component.mjs.map +1 -0
  25. package/dist/botframework-webchat-component.css +2 -0
  26. package/dist/botframework-webchat-component.css.map +1 -0
  27. package/dist/botframework-webchat-component.d.mts +64 -2312
  28. package/dist/botframework-webchat-component.d.ts +90 -0
  29. package/dist/botframework-webchat-component.decorator.css +2 -0
  30. package/dist/botframework-webchat-component.decorator.css.map +1 -0
  31. package/dist/botframework-webchat-component.decorator.d.mts +28 -0
  32. package/dist/botframework-webchat-component.decorator.d.ts +28 -0
  33. package/dist/botframework-webchat-component.decorator.js +2 -0
  34. package/dist/botframework-webchat-component.decorator.js.map +1 -0
  35. package/dist/botframework-webchat-component.decorator.mjs +2 -0
  36. package/dist/botframework-webchat-component.decorator.mjs.map +1 -0
  37. package/dist/botframework-webchat-component.hook.css +2 -0
  38. package/dist/botframework-webchat-component.hook.css.map +1 -0
  39. package/dist/botframework-webchat-component.hook.d.mts +8 -0
  40. package/dist/botframework-webchat-component.hook.d.ts +8 -0
  41. package/dist/botframework-webchat-component.hook.js +2 -0
  42. package/dist/botframework-webchat-component.hook.js.map +1 -0
  43. package/dist/botframework-webchat-component.hook.mjs +2 -0
  44. package/dist/botframework-webchat-component.hook.mjs.map +1 -0
  45. package/dist/botframework-webchat-component.internal.css +2 -0
  46. package/dist/botframework-webchat-component.internal.css.map +1 -0
  47. package/dist/botframework-webchat-component.internal.d.mts +68 -3
  48. package/dist/botframework-webchat-component.internal.d.ts +70 -0
  49. package/dist/botframework-webchat-component.internal.js +2 -0
  50. package/dist/botframework-webchat-component.internal.js.map +1 -0
  51. package/dist/botframework-webchat-component.internal.mjs +1 -2
  52. package/dist/botframework-webchat-component.js +2 -0
  53. package/dist/botframework-webchat-component.js.map +1 -0
  54. package/dist/botframework-webchat-component.mjs +1 -11
  55. package/dist/botframework-webchat-component.mjs.map +1 -1
  56. package/dist/chunk-2R7BJ63Z.js +2 -0
  57. package/dist/chunk-2R7BJ63Z.js.map +1 -0
  58. package/dist/chunk-A4NDFSZM.mjs +77 -0
  59. package/dist/chunk-A4NDFSZM.mjs.map +1 -0
  60. package/dist/chunk-CNTMOACS.mjs +2 -0
  61. package/dist/chunk-CNTMOACS.mjs.map +1 -0
  62. package/dist/chunk-GTOP3WPD.mjs +2 -0
  63. package/dist/chunk-GTOP3WPD.mjs.map +1 -0
  64. package/dist/chunk-H5YR7OLF.js +2 -0
  65. package/dist/chunk-H5YR7OLF.js.map +1 -0
  66. package/dist/chunk-I6DJ35K3.mjs +2 -0
  67. package/dist/chunk-I6DJ35K3.mjs.map +1 -0
  68. package/dist/chunk-I6EXXZUN.js +2 -0
  69. package/dist/chunk-I6EXXZUN.js.map +1 -0
  70. package/dist/chunk-LVVCSDZ4.mjs +2 -0
  71. package/dist/chunk-LVVCSDZ4.mjs.map +1 -0
  72. package/dist/chunk-MOJMHOVH.js +2 -0
  73. package/dist/chunk-MOJMHOVH.js.map +1 -0
  74. package/dist/chunk-TMUNLKZW.js +2 -0
  75. package/dist/chunk-TMUNLKZW.js.map +1 -0
  76. package/dist/chunk-TYPS3H4I.mjs +2 -0
  77. package/dist/chunk-TYPS3H4I.mjs.map +1 -0
  78. package/dist/chunk-U6OWCHTQ.js +2 -0
  79. package/dist/chunk-U6OWCHTQ.js.map +1 -0
  80. package/dist/chunk-UKBRB4EA.mjs +2 -0
  81. package/dist/chunk-UKBRB4EA.mjs.map +1 -0
  82. package/dist/chunk-VDF6GQAL.js +77 -0
  83. package/dist/chunk-VDF6GQAL.js.map +1 -0
  84. package/dist/component-BtSxgJS5.d.mts +539 -0
  85. package/dist/component-Fyy8iCRE.d.ts +539 -0
  86. package/dist/hook-B7KuomGm.d.mts +2259 -0
  87. package/dist/hook-o9AgRedV.d.ts +2259 -0
  88. package/dist/metafile-cjs.json +1 -0
  89. package/dist/metafile-esm.json +1 -1
  90. package/hook.js +3 -0
  91. package/internal.js +1 -1
  92. package/package.json +146 -81
  93. package/src/Activity/AttachmentRow.tsx +56 -0
  94. package/src/Activity/Avatar.tsx +20 -23
  95. package/src/Activity/Bubble.module.css +131 -0
  96. package/src/Activity/Bubble.tsx +45 -70
  97. package/src/Activity/CarouselFilmStrip.js +31 -112
  98. package/src/Activity/CarouselFilmStrip.module.css +155 -0
  99. package/src/Activity/CarouselFilmStripAttachment.js +14 -15
  100. package/src/Activity/CarouselFilmStripAttachment.module.css +38 -0
  101. package/src/Activity/CarouselLayout.js +16 -17
  102. package/src/Activity/CarouselLayout.module.css +30 -0
  103. package/src/Activity/CodeBlockContent.module.css +40 -0
  104. package/src/Activity/CodeBlockContent.tsx +42 -0
  105. package/src/Activity/CollapsibleContent.module.css +43 -0
  106. package/src/Activity/CollapsibleContent.tsx +68 -0
  107. package/src/Activity/SayAlt.module.css +4 -0
  108. package/src/Activity/SayAlt.tsx +25 -0
  109. package/src/Activity/Speak.tsx +84 -42
  110. package/src/Activity/StackedLayout.module.css +233 -0
  111. package/src/Activity/StackedLayout.tsx +265 -198
  112. package/src/Activity/StackedLayoutMain.tsx +36 -0
  113. package/src/Activity/StackedLayoutMessageStatus.tsx +57 -0
  114. package/src/Activity/StackedLayoutRoot.tsx +71 -0
  115. package/src/Activity/StackedLayoutStatus.tsx +36 -0
  116. package/src/Activity/private/MessageStatusLoader.module.css +18 -0
  117. package/src/Activity/private/MessageStatusLoader.tsx +27 -0
  118. package/src/ActivityDebug/RestrictedActivityDebugAPI.ts +15 -0
  119. package/src/ActivityDebug/index.ts +1 -0
  120. package/src/ActivityFeedback/ActivityFeedback.tsx +88 -0
  121. package/src/ActivityFeedback/private/FeedbackForm.module.css +123 -0
  122. package/src/ActivityFeedback/private/FeedbackForm.tsx +83 -0
  123. package/src/ActivityFeedback/private/FeedbackVoteButton.tsx +88 -0
  124. package/src/ActivityFeedback/private/FeedbackVoteButtonBar.tsx +40 -0
  125. package/src/ActivityFeedback/private/ThumbButton.Image.tsx +35 -0
  126. package/src/ActivityFeedback/private/ThumbButton.module.css +91 -0
  127. package/src/ActivityFeedback/private/ThumbButton.tsx +103 -0
  128. package/src/ActivityFeedback/private/canActionResubmit.ts +6 -0
  129. package/src/ActivityFeedback/private/getDisclaimerFromFeedbackLoop.ts +10 -0
  130. package/src/ActivityFeedback/private/getDisclaimerFromReviewAction.ts +12 -0
  131. package/src/ActivityFeedback/private/hasFeedbackLoop.ts +42 -0
  132. package/src/ActivityFeedback/private/isActionRequireReview.ts +10 -0
  133. package/src/ActivityFeedback/providers/ActivityFeedbackComposer.tsx +372 -0
  134. package/src/ActivityFeedback/providers/private/ActivityFeedbackContext.ts +24 -0
  135. package/src/ActivityFeedback/providers/private/FocusPropagation.ts +10 -0
  136. package/src/ActivityFeedback/providers/useActivityFeedbackHooks.ts +6 -0
  137. package/src/ActivityStatus/AbsoluteTime.tsx +37 -0
  138. package/src/ActivityStatus/ActivityStatus.module.css +31 -0
  139. package/src/ActivityStatus/OthersActivityStatus.tsx +52 -53
  140. package/src/ActivityStatus/SelfActivityStatus.tsx +11 -8
  141. package/src/ActivityStatus/SendStatus/SendStatus.tsx +23 -23
  142. package/src/ActivityStatus/StatusSlot.tsx +17 -0
  143. package/src/ActivityStatus/Timestamp.tsx +17 -12
  144. package/src/ActivityStatus/private/Originator.tsx +33 -10
  145. package/src/ActivityStatus/private/RelativeTime.tsx +43 -0
  146. package/src/Assets/TypingAnimation.js +3 -1
  147. package/src/Attachment/AudioContent.tsx +20 -29
  148. package/src/Attachment/FileContent.tsx +46 -46
  149. package/src/Attachment/HTMLVideoContent.tsx +21 -27
  150. package/src/Attachment/ImageAttachment.tsx +58 -0
  151. package/src/Attachment/ImageContent.tsx +13 -27
  152. package/src/Attachment/Text/TextAttachment.tsx +38 -14
  153. package/src/Attachment/Text/TextContent.module.css +45 -0
  154. package/src/Attachment/Text/TextContent.tsx +40 -16
  155. package/src/Attachment/Text/private/ActivityButton.module.css +45 -0
  156. package/src/Attachment/Text/private/ActivityButton.tsx +71 -0
  157. package/src/Attachment/Text/private/ActivityCopyButton.module.css +45 -0
  158. package/src/Attachment/Text/private/ActivityCopyButton.tsx +109 -0
  159. package/src/Attachment/Text/private/ActivityViewCodeButton.tsx +66 -0
  160. package/src/Attachment/Text/private/CitationModal.module.css +9 -0
  161. package/src/Attachment/Text/private/CitationModalContent.tsx +28 -21
  162. package/src/Attachment/Text/private/CodeContent.tsx +44 -0
  163. package/src/Attachment/Text/private/MarkdownTextContent.tsx +223 -126
  164. package/src/Attachment/Text/private/Markdownable.tsx +39 -0
  165. package/src/Attachment/Text/private/MessageSensitivityLabel.tsx +47 -34
  166. package/src/Attachment/Text/private/PlainTextContent.tsx +24 -14
  167. package/src/Attachment/Text/private/ShieldIcon.tsx +52 -34
  168. package/src/Attachment/Text/private/ViewCodeDialog.module.css +59 -0
  169. package/src/Attachment/Text/private/isAIGeneratedActivity.ts +5 -0
  170. package/src/Attachment/VideoAttachment.js +1 -1
  171. package/src/Attachment/VideoContent.tsx +21 -27
  172. package/src/Attachment/VimeoContent.tsx +21 -25
  173. package/src/Attachment/YouTubeContent.tsx +21 -25
  174. package/src/Avatar/ImageAvatar.tsx +48 -0
  175. package/src/Avatar/InitialsAvatar.tsx +55 -0
  176. package/src/BasicConnectivityStatus.js +7 -7
  177. package/src/BasicToast.js +1 -1
  178. package/src/BasicToaster.js +47 -8
  179. package/src/BasicTranscript.tsx +402 -587
  180. package/src/BasicWebChat.tsx +28 -34
  181. package/src/BuiltInDecorator.tsx +17 -0
  182. package/src/ChatHistory/ChatHistoryBox.tsx +27 -0
  183. package/src/ChatHistory/ChatHistoryToolbar.tsx +36 -0
  184. package/src/ChatHistory/private/ScrollToEndButton.tsx +105 -0
  185. package/src/Composer.tsx +226 -128
  186. package/src/ConnectivityStatus/Connecting.tsx +77 -0
  187. package/src/Dictation.js +16 -24
  188. package/src/ErrorBox.tsx +54 -26
  189. package/src/Icon/ComponentIcon.module.css +113 -0
  190. package/src/Icon/ComponentIcon.tsx +59 -0
  191. package/src/Icon/index.ts +1 -0
  192. package/src/LinkDefinition/LinkDefinitionItem.tsx +51 -21
  193. package/src/LinkDefinition/LinkDefinitions.module.css +209 -0
  194. package/src/LinkDefinition/LinkDefinitions.tsx +84 -19
  195. package/src/LinkDefinition/index.ts +6 -4
  196. package/src/LinkDefinition/private/Badge.tsx +12 -1
  197. package/src/LinkDefinition/private/ItemBody.tsx +24 -15
  198. package/src/LinkDefinition/private/OpenInNewWindowIcon.tsx +20 -13
  199. package/src/LinkDefinition/private/extractHostnameWithSubdomain.spec.ts +2 -0
  200. package/src/LinkDefinition/private/extractHostnameWithSubdomain.ts +1 -1
  201. package/src/LiveRegion/LiveRegionActivity.tsx +18 -18
  202. package/src/LiveRegion/private/LiveRegionSuggestedActions.tsx +34 -25
  203. package/src/Middleware/Activity/defaultActivityPolymiddleware.tsx +104 -0
  204. package/src/Middleware/ActivityGrouping/createDefaultActivityGroupingDecoratorMiddleware.tsx +21 -0
  205. package/src/Middleware/ActivityGrouping/ui/LegacyActivityBridgeComposer.tsx +91 -0
  206. package/src/Middleware/ActivityGrouping/ui/PartGrouping/CollapsibleGrouping.module.css +76 -0
  207. package/src/Middleware/ActivityGrouping/ui/PartGrouping/CollapsibleGrouping.tsx +97 -0
  208. package/src/Middleware/ActivityGrouping/ui/PartGrouping/CollapsibleGroupingList.tsx +30 -0
  209. package/src/Middleware/ActivityGrouping/ui/PartGrouping/CollapsibleGroupingTitle.tsx +29 -0
  210. package/src/Middleware/ActivityGrouping/ui/PartGrouping/PartGrouping.tsx +52 -0
  211. package/src/Middleware/ActivityGrouping/ui/PartGrouping/private/PartGroupingActivity.module.css +29 -0
  212. package/src/Middleware/ActivityGrouping/ui/PartGrouping/private/PartGroupingActivity.tsx +258 -0
  213. package/src/Middleware/ActivityGrouping/ui/PartGrouping/private/usePartGroupingLogicalGroup.ts +41 -0
  214. package/src/Middleware/ActivityGrouping/ui/RenderActivity.tsx +37 -0
  215. package/src/Middleware/ActivityGrouping/ui/RenderActivityGrouping.tsx +41 -0
  216. package/src/Middleware/ActivityGrouping/ui/SenderGrouping/SenderGrouping.tsx +49 -0
  217. package/src/Middleware/ActivityGrouping/ui/SenderGrouping/private/SenderGroupingContext.ts +18 -0
  218. package/src/Middleware/ActivityGrouping/ui/SenderGrouping/private/useSenderGroupingContext.ts +6 -0
  219. package/src/Middleware/ActivityGrouping/ui/SenderGrouping/useFirstActivity.ts +6 -0
  220. package/src/Middleware/ActivityGrouping/ui/SenderGrouping/useLastActivity.ts +6 -0
  221. package/src/Middleware/ActivityGrouping/ui/StatusGrouping/StatusGrouping.tsx +49 -0
  222. package/src/Middleware/ActivityGrouping/ui/StatusGrouping/private/StatusGroupingContext.ts +18 -0
  223. package/src/Middleware/ActivityGrouping/ui/StatusGrouping/private/useStatusGroupingContext.ts +6 -0
  224. package/src/Middleware/ActivityGrouping/ui/StatusGrouping/useFirstActivity.ts +6 -0
  225. package/src/Middleware/ActivityGrouping/ui/StatusGrouping/useLastActivity.ts +6 -0
  226. package/src/Middleware/ActivityStatus/createTimestampMiddleware.tsx +2 -2
  227. package/src/Middleware/Avatar/DefaultAvatar.tsx +61 -0
  228. package/src/Middleware/Avatar/createDefaultAvatarPolymiddleware.tsx +22 -0
  229. package/src/Middleware/ScrollToEndButton/ScrollToEndButton.tsx +58 -0
  230. package/src/ReactWebChat.tsx +3 -8
  231. package/src/ScreenReaderText.tsx +27 -34
  232. package/src/SendBox/AttachmentBar/AttachmentBar.module.css +32 -0
  233. package/src/SendBox/AttachmentBar/AttachmentBar.tsx +71 -0
  234. package/src/SendBox/AttachmentBar/AttachmentBarItem.module.css +137 -0
  235. package/src/SendBox/AttachmentBar/AttachmentBarItem.tsx +103 -0
  236. package/src/SendBox/AttachmentBar/ItemDeleteButton.tsx +61 -0
  237. package/src/SendBox/AttachmentBar/ItemPreview.tsx +52 -0
  238. package/src/SendBox/AttachmentBar/Preview/FilePreview.module.css +35 -0
  239. package/src/SendBox/AttachmentBar/Preview/FilePreview.tsx +63 -0
  240. package/src/SendBox/AttachmentBar/Preview/ImagePreview.module.css +5 -0
  241. package/src/SendBox/AttachmentBar/Preview/ImagePreview.tsx +46 -0
  242. package/src/SendBox/AttachmentBar/Preview/sendBoxAttachment.ts +13 -0
  243. package/src/SendBox/AttachmentBar/index.ts +3 -0
  244. package/src/SendBox/AutoResizeTextArea.tsx +28 -64
  245. package/src/SendBox/BasicSendBox.tsx +99 -30
  246. package/src/SendBox/DictationInterims.tsx +32 -21
  247. package/src/SendBox/DropZone.tsx +64 -0
  248. package/src/SendBox/IconButton.tsx +32 -30
  249. package/src/SendBox/MicrophoneButton.tsx +29 -23
  250. package/src/SendBox/SendButton.tsx +26 -21
  251. package/src/SendBox/SuggestedAction.tsx +60 -72
  252. package/src/SendBox/SuggestedActions.tsx +6 -9
  253. package/src/SendBox/TextBox.tsx +57 -39
  254. package/src/SendBoxToolbar/Assets/AttachmentIcon.tsx +6 -23
  255. package/src/SendBoxToolbar/BasicSendBoxToolbar.tsx +4 -2
  256. package/src/SendBoxToolbar/UploadButton.tsx +47 -26
  257. package/src/Styles/CSSCustomPropertiesContainer.tsx +195 -0
  258. package/src/Styles/CustomPropertyNames.ts +66 -6
  259. package/src/Styles/StyleSet/ActivityButton.ts +49 -0
  260. package/src/Styles/StyleSet/ActivityCopyButton.ts +40 -0
  261. package/src/Styles/StyleSet/AudioAttachment.ts +3 -3
  262. package/src/Styles/StyleSet/Avatar.ts +4 -3
  263. package/src/Styles/StyleSet/CarouselFilmStrip.ts +9 -7
  264. package/src/Styles/StyleSet/CarouselFilmStripAttachment.ts +3 -4
  265. package/src/Styles/StyleSet/ChatHistoryBox.ts +22 -0
  266. package/src/Styles/StyleSet/CodeBlock.ts +39 -0
  267. package/src/Styles/StyleSet/CodeBlockCopyButton.ts +71 -0
  268. package/src/Styles/StyleSet/ErrorBox.ts +2 -2
  269. package/src/Styles/StyleSet/FileContent.ts +2 -1
  270. package/src/Styles/StyleSet/ImageAvatar.ts +8 -5
  271. package/src/Styles/StyleSet/InitialsAvatar.ts +4 -5
  272. package/src/Styles/StyleSet/LinkDefinitions.ts +17 -11
  273. package/src/Styles/StyleSet/MicrophoneButton.ts +1 -1
  274. package/src/Styles/StyleSet/ModalDialog.ts +14 -8
  275. package/src/Styles/StyleSet/RenderMarkdown.ts +35 -0
  276. package/src/Styles/StyleSet/ScrollToEndButton.ts +0 -11
  277. package/src/Styles/StyleSet/SendBox.ts +57 -7
  278. package/src/Styles/StyleSet/SendBoxButton.ts +7 -5
  279. package/src/Styles/StyleSet/SendBoxTextBox.ts +6 -1
  280. package/src/Styles/StyleSet/SendStatus.ts +12 -0
  281. package/src/Styles/StyleSet/SpinnerAnimation.ts +3 -1
  282. package/src/Styles/StyleSet/StackedLayout.ts +18 -9
  283. package/src/Styles/StyleSet/SuggestedAction.ts +1 -13
  284. package/src/Styles/StyleSet/TextContent.ts +17 -2
  285. package/src/Styles/StyleSet/ThumbButton.ts +77 -24
  286. package/src/Styles/StyleSet/Tooltip.ts +66 -0
  287. package/src/Styles/StyleSet/TypingAnimation.ts +3 -1
  288. package/src/Styles/StyleSet/ViewCodeDialog.ts +70 -0
  289. package/src/Styles/StyleSet/types/StyleSet.ts +11 -0
  290. package/src/Styles/createStyleSet.ts +14 -14
  291. package/src/TextArea/TextArea.module.css +75 -0
  292. package/src/TextArea/TextArea.tsx +126 -0
  293. package/src/TextArea/index.ts +1 -0
  294. package/src/Tooltip/index.ts +1 -0
  295. package/src/Tooltip/private/Tooltip.tsx +26 -0
  296. package/src/Transcript/ActivityRow.tsx +100 -39
  297. package/src/Transcript/ActivityTree.tsx +35 -0
  298. package/src/Transcript/FocusTrap.tsx +96 -38
  299. package/src/Transcript/LiveRegion/SendFailed.tsx +8 -10
  300. package/src/Transcript/LiveRegionTranscript.tsx +11 -62
  301. package/src/Transcript/TranscriptFocus/TranscriptActivityList.tsx +22 -0
  302. package/src/Transcript/TranscriptFocus/TranscriptFocus.module.css +117 -0
  303. package/src/Transcript/TranscriptFocus/TranscriptFocusArea.tsx +27 -0
  304. package/src/Transcript/TranscriptFocus/TranscriptFocusContent.tsx +34 -0
  305. package/src/Transcript/TranscriptFocus/TranscriptFocusContentActiveDescendant.tsx +26 -0
  306. package/src/Transcript/TranscriptFocus/TranscriptFocusContentBody.tsx +20 -0
  307. package/src/Transcript/TranscriptFocus/TranscriptFocusContentOverlay.tsx +20 -0
  308. package/src/Transcript/TranscriptFocus/TranscriptFocusIndicator.tsx +28 -0
  309. package/src/Transcript/TranscriptFocus/TranscriptFocusTerminator.tsx +42 -0
  310. package/src/Transcript/TranscriptFocus/TranscriptFocusTerminatorBody.tsx +20 -0
  311. package/src/Transcript/TranscriptFocus/TranscriptFocusTerminatorText.tsx +20 -0
  312. package/src/Transcript/TranscriptFocus/index.ts +25 -0
  313. package/src/Transcript/hooks/useRenderActivityProps.ts +88 -0
  314. package/src/Utils/AccessKeySink/Surface.tsx +63 -0
  315. package/src/Utils/AccessibleButton.tsx +64 -49
  316. package/src/Utils/AccessibleInputText.tsx +97 -106
  317. package/src/Utils/AccessibleTextArea.tsx +10 -41
  318. package/src/Utils/FixedWidthImage.tsx +60 -0
  319. package/src/Utils/FocusRedirector.tsx +31 -26
  320. package/src/Utils/InlineMarkdown.js +6 -1
  321. package/src/Utils/JSONLinkedData/__snapshots__/dereferenceBlankNodes.spec.ts.snap +17 -17
  322. package/src/Utils/JSONLinkedData/dereferenceBlankNodes.spec.ts +2 -0
  323. package/src/Utils/JSONLinkedData/dereferenceBlankNodes.ts +1 -1
  324. package/src/Utils/JSONLinkedData/getSafeOwnPropertyNames.ts +2 -2
  325. package/src/Utils/JSONLinkedData/isUnconnectedBlankNode.spec.ts +2 -0
  326. package/src/Utils/LocalizedString.tsx +3 -3
  327. package/src/Utils/addTargetBlankToHyperlinksMarkdown.spec.js +4 -4
  328. package/src/Utils/createIconComponent.tsx +126 -0
  329. package/src/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingBrowser.ts +2 -0
  330. package/src/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingWorker.ts +4 -4
  331. package/src/Utils/firstTabbableDescendant.js +0 -1
  332. package/src/Utils/orgSchema/getFirstBaseOfSoftwareSourceCode.ts +15 -0
  333. package/src/Utils/parseDocumentFragmentFromString.ts +9 -0
  334. package/src/Utils/readDataURIToBlob.ts +37 -0
  335. package/src/Utils/serializeDocumentFragmentIntoString.ts +3 -0
  336. package/src/Utils/supportPseudoClass.ts +1 -1
  337. package/src/Utils/tabbableElements.ts +7 -1
  338. package/src/Utils/textFormatToContentType.ts +14 -0
  339. package/src/Utils/updateMarkdownAttrs.spec.js +14 -14
  340. package/src/Utils/walkMarkdownTokens.spec.js +1 -1
  341. package/src/__tests__/addMetaTag.spec.js +8 -0
  342. package/src/__tests__/addMetaTag.spec.mjs +8 -0
  343. package/src/boot/component.ts +45 -0
  344. package/src/boot/decorator.ts +1 -0
  345. package/src/boot/hook.ts +118 -0
  346. package/src/boot/internal.ts +15 -0
  347. package/src/buildInfo.ts +9 -0
  348. package/src/decorator/index.ts +3 -0
  349. package/src/decorator/private/BorderFlair.module.css +566 -0
  350. package/src/decorator/private/BorderFlair.tsx +39 -0
  351. package/src/decorator/private/BorderLoader.module.css +53 -0
  352. package/src/decorator/private/BorderLoader.tsx +24 -0
  353. package/src/decorator/private/WebChatDecorator.tsx +64 -0
  354. package/src/decorator/stylesheet/DecoratorStylesheet.tsx +33 -0
  355. package/src/decorator/stylesheet/createDecoratorStyleElements.ts +8 -0
  356. package/src/env.d.ts +11 -0
  357. package/src/hooks/RenderMarkdown.module.css +102 -0
  358. package/src/hooks/index.ts +4 -0
  359. package/src/hooks/internal/UITracker.js +1 -1
  360. package/src/hooks/internal/WebChatUIContext.ts +19 -1
  361. package/src/hooks/internal/codeHighlighter/index.ts +3 -0
  362. package/src/hooks/internal/codeHighlighter/private/CodeHighlighterComposer.tsx +32 -0
  363. package/src/hooks/internal/codeHighlighter/private/createCodeHighlighterComposer.tsx +32 -0
  364. package/src/hooks/internal/codeHighlighter/private/defaultHighlightCode.tsx +22 -0
  365. package/src/hooks/internal/createWaitUntilable.spec.ts +4 -2
  366. package/src/hooks/internal/createWaitUntilable.ts +1 -1
  367. package/src/hooks/internal/private/createOnEventShim.spec.ts +2 -0
  368. package/src/hooks/internal/styleToEmotionObject/index.ts +1 -0
  369. package/src/hooks/internal/styleToEmotionObject/private/StyleToEmotionObjectComposer.tsx +20 -0
  370. package/src/hooks/internal/styleToEmotionObject/private/createStyleToEmotionObjectComposer.tsx +22 -0
  371. package/src/hooks/internal/useEmotion.ts +37 -0
  372. package/src/hooks/internal/useFeedbackActions.ts +120 -0
  373. package/src/hooks/internal/useForceRenderAtInterval.ts +6 -6
  374. package/src/hooks/internal/useMemoized.spec.jsx +3 -3
  375. package/src/hooks/internal/useMemoized.ts +1 -1
  376. package/src/hooks/internal/useNonce.ts +7 -0
  377. package/src/hooks/internal/useObserveFocusVisible.ts +0 -1
  378. package/src/hooks/internal/useSanitizeHrefCallback.ts +37 -0
  379. package/src/hooks/internal/useStateRef.ts +1 -1
  380. package/src/hooks/sendBoxFocus.ts +6 -2
  381. package/src/hooks/transcriptScrollRelative.ts +6 -3
  382. package/src/hooks/useObserveScrollPosition.ts +3 -0
  383. package/src/hooks/useObserveTranscriptFocus.ts +9 -3
  384. package/src/hooks/useRenderMarkdownAsHTML.ts +32 -29
  385. package/src/hooks/useSendFiles.ts +4 -1
  386. package/src/hooks/useStreamingMarkdownWithDefinitions.ts +193 -0
  387. package/src/index.ts +30 -125
  388. package/src/providers/ActivityLogicalGrouping/ActivityLogicalGroupingComposer.ts +100 -0
  389. package/src/providers/ActivityLogicalGrouping/index.ts +7 -0
  390. package/src/providers/ActivityLogicalGrouping/private/ActivityLogicalGroupingContext.ts +31 -0
  391. package/src/providers/ActivityLogicalGrouping/private/useStateWithOptimisticRef.ts +13 -0
  392. package/src/providers/ActivityLogicalGrouping/useAddLogicalGrouping.ts +5 -0
  393. package/src/providers/ActivityLogicalGrouping/useGetGroupState.ts +5 -0
  394. package/src/providers/ActivityLogicalGrouping/useGetLogicalGroupBoundaries.ts +5 -0
  395. package/src/providers/ActivityLogicalGrouping/useGetLogicalGroupKey.ts +5 -0
  396. package/src/providers/ActivityLogicalGrouping/useRemoveLogicalGrouping.ts +5 -0
  397. package/src/providers/ChatHistoryDOM/ChatHistoryDOMComposer.tsx +18 -0
  398. package/src/providers/ChatHistoryDOM/private/ChatHistoryDOMContext.ts +11 -0
  399. package/src/providers/ChatHistoryDOM/useActivityElementRef.ts +6 -0
  400. package/src/providers/CustomElements/CustomElementsComposer.tsx +58 -0
  401. package/src/providers/CustomElements/customElements/CodeBlock.module.css +35 -0
  402. package/src/providers/CustomElements/customElements/CodeBlock.ts +230 -0
  403. package/src/providers/CustomElements/customElements/CodeBlockCopyButton.module.css +63 -0
  404. package/src/providers/CustomElements/customElements/CodeBlockCopyButton.tsx +108 -0
  405. package/src/providers/CustomElements/customElements/wrapAsCustomElement.ts +85 -0
  406. package/src/providers/CustomElements/private/CustomElementsContext.ts +15 -0
  407. package/src/providers/CustomElements/private/useCustomElementsContext.ts +6 -0
  408. package/src/providers/CustomElements/useCodeBlockCopyButtonTagName.ts +8 -0
  409. package/src/providers/CustomElements/useCodeBlockTagName.ts +19 -0
  410. package/src/providers/GroupedRenderingActivities/GroupedRenderingActivities.ts +10 -0
  411. package/src/providers/GroupedRenderingActivities/GroupedRenderingActivitiesComposer.tsx +87 -0
  412. package/src/providers/GroupedRenderingActivities/private/GroupedRenderingActivitiesContext.ts +14 -0
  413. package/src/providers/GroupedRenderingActivities/private/group.spec.ts +31 -0
  414. package/src/providers/GroupedRenderingActivities/private/group.ts +19 -0
  415. package/src/providers/GroupedRenderingActivities/private/pick.spec.ts +35 -0
  416. package/src/providers/GroupedRenderingActivities/private/pick.ts +20 -0
  417. package/src/providers/GroupedRenderingActivities/useGroupedRenderingActivities.ts +6 -0
  418. package/src/providers/GroupedRenderingActivities/useNumRenderingActivities.ts +5 -0
  419. package/src/providers/HTMLContentTransformCOR/HTMLContentTransformComposer.tsx +41 -0
  420. package/src/providers/HTMLContentTransformCOR/index.ts +8 -0
  421. package/src/providers/HTMLContentTransformCOR/private/HTMLContentTransformContext.ts +34 -0
  422. package/src/providers/HTMLContentTransformCOR/private/useHTMLContentTransformContext.ts +6 -0
  423. package/src/providers/HTMLContentTransformCOR/useTransformHTMLContent.ts +187 -0
  424. package/src/providers/LiveRegionTwin/index.ts +3 -0
  425. package/src/providers/LiveRegionTwin/private/LiveRegionTwinComposer.ts +27 -0
  426. package/src/providers/LiveRegionTwin/private/LiveRegionTwinContainer.tsx +27 -39
  427. package/src/providers/LiveRegionTwin/private/createLiveRegionTwinComposer.tsx +155 -0
  428. package/src/providers/LiveRegionTwin/private/useContext.ts +2 -8
  429. package/src/providers/LiveRegionTwin/useLiveRegion.ts +27 -0
  430. package/src/providers/LiveRegionTwin/useQueueStaticElement.ts +2 -2
  431. package/src/providers/ModalDialog/private/Popover.tsx +5 -15
  432. package/src/providers/ReducedMotion/ReducedMotionComposer.tsx +35 -0
  433. package/src/providers/ReducedMotion/private/Context.ts +22 -0
  434. package/src/providers/ReducedMotion/private/useContext.ts +8 -0
  435. package/src/providers/ReducedMotion/useShouldReduceMotion.ts +5 -0
  436. package/src/providers/RenderingActivities/RenderingActivitiesComposer.tsx +103 -0
  437. package/src/providers/RenderingActivities/private/RenderingActivitiesContext.ts +15 -0
  438. package/src/providers/RenderingActivities/useActivityRendererMap.ts +9 -0
  439. package/src/providers/RenderingActivities/useRenderingActivities.ts +7 -0
  440. package/src/providers/RenderingActivities/useRenderingActivityKeys.ts +5 -0
  441. package/src/providers/RovingTabIndex/RovingTabIndexComposer.tsx +20 -23
  442. package/src/providers/Theme/ThemeProvider.tsx +119 -40
  443. package/src/providers/Theme/private/Context.ts +18 -18
  444. package/src/providers/TranscriptFocus/TranscriptFocusComposer.spec.tsx +611 -0
  445. package/src/providers/TranscriptFocus/TranscriptFocusComposer.tsx +325 -68
  446. package/src/providers/TranscriptFocus/private/Context.ts +4 -0
  447. package/src/providers/TranscriptFocus/useActiveDescendantId.ts +4 -1
  448. package/src/providers/TranscriptFocus/useFocusByGroupKey.ts +11 -0
  449. package/src/providers/TranscriptFocus/useFocusRelativeActivity.ts +1 -1
  450. package/src/providers/TranscriptFocus/useFocusedKey.ts +6 -0
  451. package/src/providers/TranscriptFocus/useGetGroupDescendantIdByActivityKey.ts +5 -0
  452. package/src/providers/createContextAndHook.ts +23 -0
  453. package/src/providers/internal/SendBox/SendBoxComposer.tsx +30 -38
  454. package/src/stylesheet/ComponentStylesheet.tsx +33 -0
  455. package/src/stylesheet/createComponentStyleElements.ts +8 -0
  456. package/src/testIds.ts +18 -0
  457. package/src/tsconfig.json +8 -14
  458. package/src/types/internal/mutableRefObject.ts +40 -0
  459. package/src/types/internal/refObject.ts +40 -0
  460. package/dist/botframework-webchat-component.internal.mjs.LEGAL.txt +0 -0
  461. package/dist/botframework-webchat-component.mjs.LEGAL.txt +0 -0
  462. package/dist/chunk-X37JABN5.mjs +0 -5
  463. package/dist/chunk-X37JABN5.mjs.LEGAL.txt +0 -0
  464. package/dist/chunk-X37JABN5.mjs.map +0 -1
  465. package/lib/Activity/Avatar.d.ts +0 -10
  466. package/lib/Activity/Avatar.d.ts.map +0 -1
  467. package/lib/Activity/Avatar.js +0 -35
  468. package/lib/Activity/Bubble.d.ts +0 -11
  469. package/lib/Activity/Bubble.d.ts.map +0 -1
  470. package/lib/Activity/Bubble.js +0 -137
  471. package/lib/Activity/CarouselFilmStrip.js +0 -264
  472. package/lib/Activity/CarouselFilmStripAttachment.js +0 -93
  473. package/lib/Activity/CarouselLayout.js +0 -133
  474. package/lib/Activity/SayAlt.js +0 -31
  475. package/lib/Activity/Speak.d.ts +0 -8
  476. package/lib/Activity/Speak.d.ts.map +0 -1
  477. package/lib/Activity/Speak.js +0 -99
  478. package/lib/Activity/StackedLayout.d.ts +0 -17
  479. package/lib/Activity/StackedLayout.d.ts.map +0 -1
  480. package/lib/Activity/StackedLayout.js +0 -233
  481. package/lib/ActivityStatus/AbsoluteTime.js +0 -38
  482. package/lib/ActivityStatus/OthersActivityStatus.d.ts +0 -8
  483. package/lib/ActivityStatus/OthersActivityStatus.d.ts.map +0 -1
  484. package/lib/ActivityStatus/OthersActivityStatus.js +0 -105
  485. package/lib/ActivityStatus/SelfActivityStatus.d.ts +0 -8
  486. package/lib/ActivityStatus/SelfActivityStatus.d.ts.map +0 -1
  487. package/lib/ActivityStatus/SelfActivityStatus.js +0 -37
  488. package/lib/ActivityStatus/SendStatus/SendStatus.d.ts +0 -10
  489. package/lib/ActivityStatus/SendStatus/SendStatus.d.ts.map +0 -1
  490. package/lib/ActivityStatus/SendStatus/SendStatus.js +0 -58
  491. package/lib/ActivityStatus/SendStatus/private/SendFailedRetry.js +0 -35
  492. package/lib/ActivityStatus/Slotted.d.ts +0 -7
  493. package/lib/ActivityStatus/Slotted.d.ts.map +0 -1
  494. package/lib/ActivityStatus/Slotted.js +0 -31
  495. package/lib/ActivityStatus/Timestamp.d.ts +0 -7
  496. package/lib/ActivityStatus/Timestamp.d.ts.map +0 -1
  497. package/lib/ActivityStatus/Timestamp.js +0 -36
  498. package/lib/ActivityStatus/private/Feedback/Feedback.d.ts +0 -8
  499. package/lib/ActivityStatus/private/Feedback/Feedback.d.ts.map +0 -1
  500. package/lib/ActivityStatus/private/Feedback/Feedback.js +0 -67
  501. package/lib/ActivityStatus/private/Feedback/private/ThumbButton.Image.d.ts +0 -9
  502. package/lib/ActivityStatus/private/Feedback/private/ThumbButton.Image.d.ts.map +0 -1
  503. package/lib/ActivityStatus/private/Feedback/private/ThumbButton.Image.js +0 -34
  504. package/lib/ActivityStatus/private/Feedback/private/ThumbButton.d.ts +0 -9
  505. package/lib/ActivityStatus/private/Feedback/private/ThumbButton.d.ts.map +0 -1
  506. package/lib/ActivityStatus/private/Feedback/private/ThumbButton.js +0 -57
  507. package/lib/ActivityStatus/private/Feedback/private/VoteButton.d.ts +0 -10
  508. package/lib/ActivityStatus/private/Feedback/private/VoteButton.d.ts.map +0 -1
  509. package/lib/ActivityStatus/private/Feedback/private/VoteButton.js +0 -43
  510. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Filled.d.ts +0 -7
  511. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Filled.d.ts.map +0 -1
  512. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Filled.js +0 -28
  513. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Regular.d.ts +0 -7
  514. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Regular.d.ts.map +0 -1
  515. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Regular.js +0 -28
  516. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbLike16Filled.d.ts +0 -7
  517. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbLike16Filled.d.ts.map +0 -1
  518. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbLike16Filled.js +0 -28
  519. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbLike16Regular.d.ts +0 -7
  520. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbLike16Regular.d.ts.map +0 -1
  521. package/lib/ActivityStatus/private/Feedback/private/icons/ThumbLike16Regular.js +0 -28
  522. package/lib/ActivityStatus/private/Originator.d.ts +0 -8
  523. package/lib/ActivityStatus/private/Originator.d.ts.map +0 -1
  524. package/lib/ActivityStatus/private/Originator.js +0 -29
  525. package/lib/ActivityStatus/private/RelativeTime.js +0 -37
  526. package/lib/Assets/TypingAnimation.js +0 -47
  527. package/lib/Attachment/Assets/DownloadIcon.js +0 -35
  528. package/lib/Attachment/AudioAttachment.js +0 -38
  529. package/lib/Attachment/AudioContent.d.ts +0 -11
  530. package/lib/Attachment/AudioContent.d.ts.map +0 -1
  531. package/lib/Attachment/AudioContent.js +0 -51
  532. package/lib/Attachment/FileAttachment.js +0 -43
  533. package/lib/Attachment/FileContent.d.ts +0 -10
  534. package/lib/Attachment/FileContent.d.ts.map +0 -1
  535. package/lib/Attachment/FileContent.js +0 -120
  536. package/lib/Attachment/HTMLVideoContent.d.ts +0 -11
  537. package/lib/Attachment/HTMLVideoContent.d.ts.map +0 -1
  538. package/lib/Attachment/HTMLVideoContent.js +0 -51
  539. package/lib/Attachment/ImageAttachment.js +0 -41
  540. package/lib/Attachment/ImageContent.d.ts +0 -8
  541. package/lib/Attachment/ImageContent.d.ts.map +0 -1
  542. package/lib/Attachment/ImageContent.js +0 -41
  543. package/lib/Attachment/Text/TextAttachment.d.ts +0 -12
  544. package/lib/Attachment/Text/TextAttachment.d.ts.map +0 -1
  545. package/lib/Attachment/Text/TextAttachment.js +0 -27
  546. package/lib/Attachment/Text/TextContent.d.ts +0 -10
  547. package/lib/Attachment/Text/TextContent.d.ts.map +0 -1
  548. package/lib/Attachment/Text/TextContent.js +0 -34
  549. package/lib/Attachment/Text/private/CitationModalContent.d.ts +0 -8
  550. package/lib/Attachment/Text/private/CitationModalContent.d.ts.map +0 -1
  551. package/lib/Attachment/Text/private/CitationModalContent.js +0 -45
  552. package/lib/Attachment/Text/private/MarkdownTextContent.d.ts +0 -9
  553. package/lib/Attachment/Text/private/MarkdownTextContent.d.ts.map +0 -1
  554. package/lib/Attachment/Text/private/MarkdownTextContent.js +0 -204
  555. package/lib/Attachment/Text/private/MessageSensitivityLabel.d.ts +0 -12
  556. package/lib/Attachment/Text/private/MessageSensitivityLabel.d.ts.map +0 -1
  557. package/lib/Attachment/Text/private/MessageSensitivityLabel.js +0 -38
  558. package/lib/Attachment/Text/private/PlainTextContent.d.ts +0 -7
  559. package/lib/Attachment/Text/private/PlainTextContent.d.ts.map +0 -1
  560. package/lib/Attachment/Text/private/PlainTextContent.js +0 -35
  561. package/lib/Attachment/Text/private/ShieldIcon.d.ts +0 -9
  562. package/lib/Attachment/Text/private/ShieldIcon.d.ts.map +0 -1
  563. package/lib/Attachment/Text/private/ShieldIcon.js +0 -39
  564. package/lib/Attachment/Text/private/isHTMLButtonElement.d.ts +0 -2
  565. package/lib/Attachment/Text/private/isHTMLButtonElement.d.ts.map +0 -1
  566. package/lib/Attachment/Text/private/isHTMLButtonElement.js +0 -10
  567. package/lib/Attachment/VideoAttachment.js +0 -45
  568. package/lib/Attachment/VideoContent.d.ts +0 -11
  569. package/lib/Attachment/VideoContent.d.ts.map +0 -1
  570. package/lib/Attachment/VideoContent.js +0 -103
  571. package/lib/Attachment/VimeoContent.d.ts +0 -10
  572. package/lib/Attachment/VimeoContent.d.ts.map +0 -1
  573. package/lib/Attachment/VimeoContent.js +0 -59
  574. package/lib/Attachment/YouTubeContent.d.ts +0 -10
  575. package/lib/Attachment/YouTubeContent.d.ts.map +0 -1
  576. package/lib/Attachment/YouTubeContent.js +0 -60
  577. package/lib/Attachment/createMiddleware.d.ts +0 -3
  578. package/lib/Attachment/createMiddleware.d.ts.map +0 -1
  579. package/lib/Attachment/createMiddleware.js +0 -64
  580. package/lib/Attachment/private/types/WebChatAttachment.d.ts +0 -9
  581. package/lib/Attachment/private/types/WebChatAttachment.d.ts.map +0 -1
  582. package/lib/Attachment/private/types/WebChatAttachment.js +0 -2
  583. package/lib/Avatar/ImageAvatar.js +0 -59
  584. package/lib/Avatar/InitialsAvatar.js +0 -57
  585. package/lib/BasicConnectivityStatus.js +0 -46
  586. package/lib/BasicToast.js +0 -103
  587. package/lib/BasicToaster.js +0 -176
  588. package/lib/BasicTranscript.d.ts +0 -7
  589. package/lib/BasicTranscript.d.ts.map +0 -1
  590. package/lib/BasicTranscript.js +0 -735
  591. package/lib/BasicTypingIndicator.d.ts +0 -6
  592. package/lib/BasicTypingIndicator.d.ts.map +0 -1
  593. package/lib/BasicTypingIndicator.js +0 -54
  594. package/lib/BasicWebChat.d.ts +0 -9
  595. package/lib/BasicWebChat.d.ts.map +0 -1
  596. package/lib/BasicWebChat.js +0 -90
  597. package/lib/Composer.d.ts +0 -50
  598. package/lib/Composer.d.ts.map +0 -1
  599. package/lib/Composer.js +0 -336
  600. package/lib/ConnectivityStatus/Assets/ErrorNotificationIcon.js +0 -47
  601. package/lib/ConnectivityStatus/Assets/SpinnerAnimation.js +0 -32
  602. package/lib/ConnectivityStatus/Assets/WarningNotificationIcon.js +0 -47
  603. package/lib/ConnectivityStatus/Connected.js +0 -20
  604. package/lib/ConnectivityStatus/Connecting.js +0 -82
  605. package/lib/ConnectivityStatus/FailedToConnect.js +0 -41
  606. package/lib/ConnectivityStatus/JavaScriptError.js +0 -41
  607. package/lib/Dictation.js +0 -158
  608. package/lib/ErrorBox.d.ts +0 -8
  609. package/lib/ErrorBox.d.ts.map +0 -1
  610. package/lib/ErrorBox.js +0 -42
  611. package/lib/LinkDefinition/LinkDefinitionItem.d.ts +0 -12
  612. package/lib/LinkDefinition/LinkDefinitionItem.d.ts.map +0 -1
  613. package/lib/LinkDefinition/LinkDefinitionItem.js +0 -57
  614. package/lib/LinkDefinition/LinkDefinitions.d.ts +0 -12
  615. package/lib/LinkDefinition/LinkDefinitions.d.ts.map +0 -1
  616. package/lib/LinkDefinition/LinkDefinitions.js +0 -69
  617. package/lib/LinkDefinition/index.d.ts +0 -4
  618. package/lib/LinkDefinition/index.d.ts.map +0 -1
  619. package/lib/LinkDefinition/index.js +0 -21
  620. package/lib/LinkDefinition/private/Badge.d.ts +0 -7
  621. package/lib/LinkDefinition/private/Badge.d.ts.map +0 -1
  622. package/lib/LinkDefinition/private/Badge.js +0 -20
  623. package/lib/LinkDefinition/private/Chevron.d.ts +0 -4
  624. package/lib/LinkDefinition/private/Chevron.d.ts.map +0 -1
  625. package/lib/LinkDefinition/private/Chevron.js +0 -27
  626. package/lib/LinkDefinition/private/ItemBody.d.ts +0 -11
  627. package/lib/LinkDefinition/private/ItemBody.d.ts.map +0 -1
  628. package/lib/LinkDefinition/private/ItemBody.js +0 -41
  629. package/lib/LinkDefinition/private/OpenInNewWindowIcon.d.ts +0 -7
  630. package/lib/LinkDefinition/private/OpenInNewWindowIcon.d.ts.map +0 -1
  631. package/lib/LinkDefinition/private/OpenInNewWindowIcon.js +0 -23
  632. package/lib/LinkDefinition/private/extractHostnameWithSubdomain.d.ts +0 -2
  633. package/lib/LinkDefinition/private/extractHostnameWithSubdomain.d.ts.map +0 -1
  634. package/lib/LinkDefinition/private/extractHostnameWithSubdomain.js +0 -24
  635. package/lib/LinkDefinition/private/extractHostnameWithSubdomain.spec.d.ts +0 -2
  636. package/lib/LinkDefinition/private/extractHostnameWithSubdomain.spec.d.ts.map +0 -1
  637. package/lib/LiveRegion/LiveRegionActivity.d.ts +0 -9
  638. package/lib/LiveRegion/LiveRegionActivity.d.ts.map +0 -1
  639. package/lib/LiveRegion/LiveRegionActivity.js +0 -70
  640. package/lib/LiveRegion/private/LiveRegionAttachments.d.ts +0 -11
  641. package/lib/LiveRegion/private/LiveRegionAttachments.d.ts.map +0 -1
  642. package/lib/LiveRegion/private/LiveRegionAttachments.js +0 -53
  643. package/lib/LiveRegion/private/LiveRegionSuggestedActions.d.ts +0 -8
  644. package/lib/LiveRegion/private/LiveRegionSuggestedActions.d.ts.map +0 -1
  645. package/lib/LiveRegion/private/LiveRegionSuggestedActions.js +0 -37
  646. package/lib/Middleware/Activity/createCoreMiddleware.d.ts +0 -3
  647. package/lib/Middleware/Activity/createCoreMiddleware.d.ts.map +0 -1
  648. package/lib/Middleware/Activity/createCoreMiddleware.js +0 -95
  649. package/lib/Middleware/ActivityStatus/createCoreMiddleware.d.ts +0 -3
  650. package/lib/Middleware/ActivityStatus/createCoreMiddleware.d.ts.map +0 -1
  651. package/lib/Middleware/ActivityStatus/createCoreMiddleware.js +0 -13
  652. package/lib/Middleware/ActivityStatus/createSendStatusMiddleware.d.ts +0 -3
  653. package/lib/Middleware/ActivityStatus/createSendStatusMiddleware.d.ts.map +0 -1
  654. package/lib/Middleware/ActivityStatus/createSendStatusMiddleware.js +0 -41
  655. package/lib/Middleware/ActivityStatus/createTimestampMiddleware.d.ts +0 -3
  656. package/lib/Middleware/ActivityStatus/createTimestampMiddleware.d.ts.map +0 -1
  657. package/lib/Middleware/ActivityStatus/createTimestampMiddleware.js +0 -48
  658. package/lib/Middleware/AttachmentForScreenReader/AudioAttachment.js +0 -18
  659. package/lib/Middleware/AttachmentForScreenReader/FileAttachment.js +0 -28
  660. package/lib/Middleware/AttachmentForScreenReader/ImageAttachment.js +0 -18
  661. package/lib/Middleware/AttachmentForScreenReader/TextAttachment.js +0 -28
  662. package/lib/Middleware/AttachmentForScreenReader/VideoAttachment.js +0 -18
  663. package/lib/Middleware/AttachmentForScreenReader/createCoreMiddleware.d.ts +0 -3
  664. package/lib/Middleware/AttachmentForScreenReader/createCoreMiddleware.d.ts.map +0 -1
  665. package/lib/Middleware/AttachmentForScreenReader/createCoreMiddleware.js +0 -61
  666. package/lib/Middleware/Avatar/createCoreMiddleware.d.ts +0 -11
  667. package/lib/Middleware/Avatar/createCoreMiddleware.d.ts.map +0 -1
  668. package/lib/Middleware/Avatar/createCoreMiddleware.js +0 -82
  669. package/lib/Middleware/CardAction/createCoreMiddleware.js +0 -108
  670. package/lib/Middleware/ScrollToEndButton/ScrollToEndButton.js +0 -52
  671. package/lib/Middleware/ScrollToEndButton/createScrollToEndButtonMiddleware.d.ts +0 -3
  672. package/lib/Middleware/ScrollToEndButton/createScrollToEndButtonMiddleware.d.ts.map +0 -1
  673. package/lib/Middleware/ScrollToEndButton/createScrollToEndButtonMiddleware.js +0 -27
  674. package/lib/Middleware/Toast/createCoreMiddleware.d.ts +0 -4
  675. package/lib/Middleware/Toast/createCoreMiddleware.d.ts.map +0 -1
  676. package/lib/Middleware/Toast/createCoreMiddleware.js +0 -27
  677. package/lib/Middleware/TypingIndicator/createCoreMiddleware.d.ts +0 -3
  678. package/lib/Middleware/TypingIndicator/createCoreMiddleware.d.ts.map +0 -1
  679. package/lib/Middleware/TypingIndicator/createCoreMiddleware.js +0 -47
  680. package/lib/ReactWebChat.d.ts +0 -42
  681. package/lib/ReactWebChat.d.ts.map +0 -1
  682. package/lib/ReactWebChat.js +0 -52
  683. package/lib/ScreenReaderText.d.ts +0 -9
  684. package/lib/ScreenReaderText.d.ts.map +0 -1
  685. package/lib/ScreenReaderText.js +0 -58
  686. package/lib/SendBox/Assets/MicrophoneIcon.js +0 -25
  687. package/lib/SendBox/Assets/SendIcon.js +0 -45
  688. package/lib/SendBox/AutoResizeTextArea.d.ts +0 -24
  689. package/lib/SendBox/AutoResizeTextArea.d.ts.map +0 -1
  690. package/lib/SendBox/AutoResizeTextArea.js +0 -113
  691. package/lib/SendBox/BasicSendBox.d.ts +0 -9
  692. package/lib/SendBox/BasicSendBox.d.ts.map +0 -1
  693. package/lib/SendBox/BasicSendBox.js +0 -123
  694. package/lib/SendBox/DictationInterims.d.ts +0 -7
  695. package/lib/SendBox/DictationInterims.d.ts.map +0 -1
  696. package/lib/SendBox/DictationInterims.js +0 -68
  697. package/lib/SendBox/IconButton.d.ts +0 -11
  698. package/lib/SendBox/IconButton.d.ts.map +0 -1
  699. package/lib/SendBox/IconButton.js +0 -73
  700. package/lib/SendBox/MicrophoneButton.d.ts +0 -10
  701. package/lib/SendBox/MicrophoneButton.d.ts.map +0 -1
  702. package/lib/SendBox/MicrophoneButton.js +0 -160
  703. package/lib/SendBox/SendButton.d.ts +0 -7
  704. package/lib/SendBox/SendButton.d.ts.map +0 -1
  705. package/lib/SendBox/SendButton.js +0 -53
  706. package/lib/SendBox/SuggestedAction.d.ts +0 -16
  707. package/lib/SendBox/SuggestedAction.d.ts.map +0 -1
  708. package/lib/SendBox/SuggestedAction.js +0 -166
  709. package/lib/SendBox/SuggestedActions.d.ts +0 -7
  710. package/lib/SendBox/SuggestedActions.d.ts.map +0 -1
  711. package/lib/SendBox/SuggestedActions.js +0 -256
  712. package/lib/SendBox/TextBox.d.ts +0 -24
  713. package/lib/SendBox/TextBox.d.ts.map +0 -1
  714. package/lib/SendBox/TextBox.js +0 -252
  715. package/lib/SendBox/createMiddleware.d.ts +0 -4
  716. package/lib/SendBox/createMiddleware.d.ts.map +0 -1
  717. package/lib/SendBox/createMiddleware.js +0 -38
  718. package/lib/SendBoxToolbar/Assets/AttachmentIcon.d.ts +0 -7
  719. package/lib/SendBoxToolbar/Assets/AttachmentIcon.d.ts.map +0 -1
  720. package/lib/SendBoxToolbar/Assets/AttachmentIcon.js +0 -63
  721. package/lib/SendBoxToolbar/BasicSendBoxToolbar.d.ts +0 -6
  722. package/lib/SendBoxToolbar/BasicSendBoxToolbar.d.ts.map +0 -1
  723. package/lib/SendBoxToolbar/BasicSendBoxToolbar.js +0 -32
  724. package/lib/SendBoxToolbar/UploadButton.d.ts +0 -7
  725. package/lib/SendBoxToolbar/UploadButton.d.ts.map +0 -1
  726. package/lib/SendBoxToolbar/UploadButton.js +0 -156
  727. package/lib/SendBoxToolbar/createMiddleware.d.ts +0 -4
  728. package/lib/SendBoxToolbar/createMiddleware.d.ts.map +0 -1
  729. package/lib/SendBoxToolbar/createMiddleware.js +0 -20
  730. package/lib/Styles/CSSTokens.d.ts +0 -16
  731. package/lib/Styles/CSSTokens.d.ts.map +0 -1
  732. package/lib/Styles/CSSTokens.js +0 -19
  733. package/lib/Styles/CustomPropertyNames.d.ts +0 -13
  734. package/lib/Styles/CustomPropertyNames.d.ts.map +0 -1
  735. package/lib/Styles/CustomPropertyNames.js +0 -24
  736. package/lib/Styles/StyleSet/Activities.d.ts +0 -5
  737. package/lib/Styles/StyleSet/Activities.d.ts.map +0 -1
  738. package/lib/Styles/StyleSet/Activities.js +0 -13
  739. package/lib/Styles/StyleSet/AudioAttachment.d.ts +0 -6
  740. package/lib/Styles/StyleSet/AudioAttachment.d.ts.map +0 -1
  741. package/lib/Styles/StyleSet/AudioAttachment.js +0 -15
  742. package/lib/Styles/StyleSet/AudioContent.d.ts +0 -4
  743. package/lib/Styles/StyleSet/AudioContent.d.ts.map +0 -1
  744. package/lib/Styles/StyleSet/AudioContent.js +0 -12
  745. package/lib/Styles/StyleSet/AutoResizeTextArea.d.ts +0 -37
  746. package/lib/Styles/StyleSet/AutoResizeTextArea.d.ts.map +0 -1
  747. package/lib/Styles/StyleSet/AutoResizeTextArea.js +0 -45
  748. package/lib/Styles/StyleSet/Avatar.d.ts +0 -9
  749. package/lib/Styles/StyleSet/Avatar.d.ts.map +0 -1
  750. package/lib/Styles/StyleSet/Avatar.js +0 -18
  751. package/lib/Styles/StyleSet/BasicTranscript.d.ts +0 -85
  752. package/lib/Styles/StyleSet/BasicTranscript.d.ts.map +0 -1
  753. package/lib/Styles/StyleSet/BasicTranscript.js +0 -110
  754. package/lib/Styles/StyleSet/Bubble.d.ts +0 -5
  755. package/lib/Styles/StyleSet/Bubble.d.ts.map +0 -1
  756. package/lib/Styles/StyleSet/Bubble.js +0 -153
  757. package/lib/Styles/StyleSet/CSSCustomProperties.d.ts +0 -16
  758. package/lib/Styles/StyleSet/CSSCustomProperties.d.ts.map +0 -1
  759. package/lib/Styles/StyleSet/CSSCustomProperties.js +0 -27
  760. package/lib/Styles/StyleSet/CarouselFilmStrip.d.ts +0 -5
  761. package/lib/Styles/StyleSet/CarouselFilmStrip.d.ts.map +0 -1
  762. package/lib/Styles/StyleSet/CarouselFilmStrip.js +0 -90
  763. package/lib/Styles/StyleSet/CarouselFilmStripAttachment.d.ts +0 -3
  764. package/lib/Styles/StyleSet/CarouselFilmStripAttachment.d.ts.map +0 -1
  765. package/lib/Styles/StyleSet/CarouselFilmStripAttachment.js +0 -57
  766. package/lib/Styles/StyleSet/CarouselFlipper.d.ts +0 -27
  767. package/lib/Styles/StyleSet/CarouselFlipper.d.ts.map +0 -1
  768. package/lib/Styles/StyleSet/CarouselFlipper.js +0 -42
  769. package/lib/Styles/StyleSet/CitationModalDialog.d.ts +0 -8
  770. package/lib/Styles/StyleSet/CitationModalDialog.d.ts.map +0 -1
  771. package/lib/Styles/StyleSet/CitationModalDialog.js +0 -16
  772. package/lib/Styles/StyleSet/ConnectivityNotification.d.ts +0 -13
  773. package/lib/Styles/StyleSet/ConnectivityNotification.d.ts.map +0 -1
  774. package/lib/Styles/StyleSet/ConnectivityNotification.js +0 -26
  775. package/lib/Styles/StyleSet/Constants.d.ts +0 -6
  776. package/lib/Styles/StyleSet/Constants.d.ts.map +0 -1
  777. package/lib/Styles/StyleSet/Constants.js +0 -15
  778. package/lib/Styles/StyleSet/DictationInterims.d.ts +0 -13
  779. package/lib/Styles/StyleSet/DictationInterims.d.ts.map +0 -1
  780. package/lib/Styles/StyleSet/DictationInterims.js +0 -22
  781. package/lib/Styles/StyleSet/ErrorBox.d.ts +0 -33
  782. package/lib/Styles/StyleSet/ErrorBox.d.ts.map +0 -1
  783. package/lib/Styles/StyleSet/ErrorBox.js +0 -43
  784. package/lib/Styles/StyleSet/ErrorNotification.d.ts +0 -23
  785. package/lib/Styles/StyleSet/ErrorNotification.d.ts.map +0 -1
  786. package/lib/Styles/StyleSet/ErrorNotification.js +0 -36
  787. package/lib/Styles/StyleSet/FileContent.d.ts +0 -32
  788. package/lib/Styles/StyleSet/FileContent.d.ts.map +0 -1
  789. package/lib/Styles/StyleSet/FileContent.js +0 -43
  790. package/lib/Styles/StyleSet/ImageAvatar.d.ts +0 -7
  791. package/lib/Styles/StyleSet/ImageAvatar.d.ts.map +0 -1
  792. package/lib/Styles/StyleSet/ImageAvatar.js +0 -15
  793. package/lib/Styles/StyleSet/InitialsAvatar.d.ts +0 -19
  794. package/lib/Styles/StyleSet/InitialsAvatar.d.ts.map +0 -1
  795. package/lib/Styles/StyleSet/InitialsAvatar.js +0 -31
  796. package/lib/Styles/StyleSet/KeyboardHelp.d.ts +0 -152
  797. package/lib/Styles/StyleSet/KeyboardHelp.d.ts.map +0 -1
  798. package/lib/Styles/StyleSet/KeyboardHelp.js +0 -168
  799. package/lib/Styles/StyleSet/LinkDefinitions.d.ts +0 -165
  800. package/lib/Styles/StyleSet/LinkDefinitions.d.ts.map +0 -1
  801. package/lib/Styles/StyleSet/LinkDefinitions.js +0 -180
  802. package/lib/Styles/StyleSet/MicrophoneButton.d.ts +0 -13
  803. package/lib/Styles/StyleSet/MicrophoneButton.d.ts.map +0 -1
  804. package/lib/Styles/StyleSet/MicrophoneButton.js +0 -21
  805. package/lib/Styles/StyleSet/ModalDialog.d.ts +0 -94
  806. package/lib/Styles/StyleSet/ModalDialog.d.ts.map +0 -1
  807. package/lib/Styles/StyleSet/ModalDialog.js +0 -98
  808. package/lib/Styles/StyleSet/RenderMarkdown.d.ts +0 -51
  809. package/lib/Styles/StyleSet/RenderMarkdown.d.ts.map +0 -1
  810. package/lib/Styles/StyleSet/RenderMarkdown.js +0 -67
  811. package/lib/Styles/StyleSet/Root.d.ts +0 -8
  812. package/lib/Styles/StyleSet/Root.d.ts.map +0 -1
  813. package/lib/Styles/StyleSet/Root.js +0 -19
  814. package/lib/Styles/StyleSet/ScrollToEndButton.d.ts +0 -36
  815. package/lib/Styles/StyleSet/ScrollToEndButton.d.ts.map +0 -1
  816. package/lib/Styles/StyleSet/ScrollToEndButton.js +0 -55
  817. package/lib/Styles/StyleSet/SendBox.d.ts +0 -24
  818. package/lib/Styles/StyleSet/SendBox.d.ts.map +0 -1
  819. package/lib/Styles/StyleSet/SendBox.js +0 -37
  820. package/lib/Styles/StyleSet/SendBoxButton.d.ts +0 -79
  821. package/lib/Styles/StyleSet/SendBoxButton.d.ts.map +0 -1
  822. package/lib/Styles/StyleSet/SendBoxButton.js +0 -112
  823. package/lib/Styles/StyleSet/SendBoxTextBox.d.ts +0 -41
  824. package/lib/Styles/StyleSet/SendBoxTextBox.d.ts.map +0 -1
  825. package/lib/Styles/StyleSet/SendBoxTextBox.js +0 -57
  826. package/lib/Styles/StyleSet/SendStatus.d.ts +0 -19
  827. package/lib/Styles/StyleSet/SendStatus.d.ts.map +0 -1
  828. package/lib/Styles/StyleSet/SendStatus.js +0 -29
  829. package/lib/Styles/StyleSet/SingleAttachmentActivity.d.ts +0 -11
  830. package/lib/Styles/StyleSet/SingleAttachmentActivity.d.ts.map +0 -1
  831. package/lib/Styles/StyleSet/SingleAttachmentActivity.js +0 -21
  832. package/lib/Styles/StyleSet/SlottedActivityStatus.d.ts +0 -12
  833. package/lib/Styles/StyleSet/SlottedActivityStatus.d.ts.map +0 -1
  834. package/lib/Styles/StyleSet/SlottedActivityStatus.js +0 -22
  835. package/lib/Styles/StyleSet/SpinnerAnimation.d.ts +0 -15
  836. package/lib/Styles/StyleSet/SpinnerAnimation.d.ts.map +0 -1
  837. package/lib/Styles/StyleSet/SpinnerAnimation.js +0 -34
  838. package/lib/Styles/StyleSet/StackedLayout.d.ts +0 -63
  839. package/lib/Styles/StyleSet/StackedLayout.d.ts.map +0 -1
  840. package/lib/Styles/StyleSet/StackedLayout.js +0 -77
  841. package/lib/Styles/StyleSet/SuggestedAction.d.ts +0 -94
  842. package/lib/Styles/StyleSet/SuggestedAction.d.ts.map +0 -1
  843. package/lib/Styles/StyleSet/SuggestedAction.js +0 -152
  844. package/lib/Styles/StyleSet/SuggestedActions.d.ts +0 -139
  845. package/lib/Styles/StyleSet/SuggestedActions.d.ts.map +0 -1
  846. package/lib/Styles/StyleSet/SuggestedActions.js +0 -165
  847. package/lib/Styles/StyleSet/TextContent.d.ts +0 -24
  848. package/lib/Styles/StyleSet/TextContent.d.ts.map +0 -1
  849. package/lib/Styles/StyleSet/TextContent.js +0 -34
  850. package/lib/Styles/StyleSet/ThumbButton.d.ts +0 -32
  851. package/lib/Styles/StyleSet/ThumbButton.d.ts.map +0 -1
  852. package/lib/Styles/StyleSet/ThumbButton.js +0 -44
  853. package/lib/Styles/StyleSet/Toast.d.ts +0 -65
  854. package/lib/Styles/StyleSet/Toast.d.ts.map +0 -1
  855. package/lib/Styles/StyleSet/Toast.js +0 -83
  856. package/lib/Styles/StyleSet/Toaster.d.ts +0 -111
  857. package/lib/Styles/StyleSet/Toaster.d.ts.map +0 -1
  858. package/lib/Styles/StyleSet/Toaster.js +0 -137
  859. package/lib/Styles/StyleSet/TypingAnimation.d.ts +0 -8
  860. package/lib/Styles/StyleSet/TypingAnimation.d.ts.map +0 -1
  861. package/lib/Styles/StyleSet/TypingAnimation.js +0 -26
  862. package/lib/Styles/StyleSet/TypingIndicator.d.ts +0 -11
  863. package/lib/Styles/StyleSet/TypingIndicator.d.ts.map +0 -1
  864. package/lib/Styles/StyleSet/TypingIndicator.js +0 -19
  865. package/lib/Styles/StyleSet/UploadButton.d.ts +0 -14
  866. package/lib/Styles/StyleSet/UploadButton.d.ts.map +0 -1
  867. package/lib/Styles/StyleSet/UploadButton.js +0 -27
  868. package/lib/Styles/StyleSet/VideoAttachment.d.ts +0 -2
  869. package/lib/Styles/StyleSet/VideoAttachment.d.ts.map +0 -1
  870. package/lib/Styles/StyleSet/VideoAttachment.js +0 -10
  871. package/lib/Styles/StyleSet/VideoContent.d.ts +0 -6
  872. package/lib/Styles/StyleSet/VideoContent.d.ts.map +0 -1
  873. package/lib/Styles/StyleSet/VideoContent.js +0 -14
  874. package/lib/Styles/StyleSet/VimeoContent.d.ts +0 -7
  875. package/lib/Styles/StyleSet/VimeoContent.d.ts.map +0 -1
  876. package/lib/Styles/StyleSet/VimeoContent.js +0 -15
  877. package/lib/Styles/StyleSet/WarningNotification.d.ts +0 -22
  878. package/lib/Styles/StyleSet/WarningNotification.d.ts.map +0 -1
  879. package/lib/Styles/StyleSet/WarningNotification.js +0 -37
  880. package/lib/Styles/StyleSet/YouTubeContent.d.ts +0 -7
  881. package/lib/Styles/StyleSet/YouTubeContent.d.ts.map +0 -1
  882. package/lib/Styles/StyleSet/YouTubeContent.js +0 -15
  883. package/lib/Styles/createStyleSet.d.ts +0 -1803
  884. package/lib/Styles/createStyleSet.d.ts.map +0 -1
  885. package/lib/Styles/createStyleSet.js +0 -121
  886. package/lib/Styles/mirrorStyle.js +0 -40
  887. package/lib/Toast/CheckMarkIcon.js +0 -36
  888. package/lib/Toast/CollapseIcon.js +0 -32
  889. package/lib/Toast/DismissIcon.js +0 -32
  890. package/lib/Toast/ExclamationMarkIcon.js +0 -34
  891. package/lib/Toast/ExpandIcon.js +0 -32
  892. package/lib/Toast/NotificationIcon.js +0 -46
  893. package/lib/Toast/createToastMiddleware.d.ts +0 -4
  894. package/lib/Toast/createToastMiddleware.d.ts.map +0 -1
  895. package/lib/Toast/createToastMiddleware.js +0 -26
  896. package/lib/Transcript/ActivityRow.d.ts +0 -9
  897. package/lib/Transcript/ActivityRow.d.ts.map +0 -1
  898. package/lib/Transcript/ActivityRow.js +0 -137
  899. package/lib/Transcript/FocusTrap.d.ts +0 -9
  900. package/lib/Transcript/FocusTrap.d.ts.map +0 -1
  901. package/lib/Transcript/FocusTrap.js +0 -76
  902. package/lib/Transcript/KeyboardHelp.d.ts +0 -4
  903. package/lib/Transcript/KeyboardHelp.d.ts.map +0 -1
  904. package/lib/Transcript/KeyboardHelp.js +0 -562
  905. package/lib/Transcript/LiveRegion/SendFailed.d.ts +0 -14
  906. package/lib/Transcript/LiveRegion/SendFailed.d.ts.map +0 -1
  907. package/lib/Transcript/LiveRegion/SendFailed.js +0 -90
  908. package/lib/Transcript/LiveRegion/isPresentational.d.ts +0 -9
  909. package/lib/Transcript/LiveRegion/isPresentational.d.ts.map +0 -1
  910. package/lib/Transcript/LiveRegion/isPresentational.js +0 -30
  911. package/lib/Transcript/LiveRegionTranscript.d.ts +0 -8
  912. package/lib/Transcript/LiveRegionTranscript.d.ts.map +0 -1
  913. package/lib/Transcript/LiveRegionTranscript.js +0 -178
  914. package/lib/Transcript/types.d.ts +0 -2
  915. package/lib/Transcript/types.d.ts.map +0 -1
  916. package/lib/Transcript/types.js +0 -2
  917. package/lib/Transcript/useActivityAccessibleName.d.ts +0 -11
  918. package/lib/Transcript/useActivityAccessibleName.d.ts.map +0 -1
  919. package/lib/Transcript/useActivityAccessibleName.js +0 -103
  920. package/lib/Transcript/useTypistNames.d.ts +0 -3
  921. package/lib/Transcript/useTypistNames.d.ts.map +0 -1
  922. package/lib/Transcript/useTypistNames.js +0 -50
  923. package/lib/TranscriptActivity.d.ts +0 -17
  924. package/lib/TranscriptActivity.d.ts.map +0 -1
  925. package/lib/TranscriptActivity.js +0 -48
  926. package/lib/Utils/AccessKeySink/Surface.js +0 -74
  927. package/lib/Utils/AccessKeySink/internal/Context.js +0 -11
  928. package/lib/Utils/AccessKeySink/internal/useContext.js +0 -13
  929. package/lib/Utils/AccessKeySink/useFocusAccessKeyEffect.js +0 -34
  930. package/lib/Utils/AccessibleButton.d.ts +0 -11
  931. package/lib/Utils/AccessibleButton.d.ts.map +0 -1
  932. package/lib/Utils/AccessibleButton.js +0 -78
  933. package/lib/Utils/AccessibleInputText.d.ts +0 -22
  934. package/lib/Utils/AccessibleInputText.d.ts.map +0 -1
  935. package/lib/Utils/AccessibleInputText.js +0 -114
  936. package/lib/Utils/AccessibleTextArea.d.ts +0 -20
  937. package/lib/Utils/AccessibleTextArea.d.ts.map +0 -1
  938. package/lib/Utils/AccessibleTextArea.js +0 -105
  939. package/lib/Utils/CroppedImage.js +0 -61
  940. package/lib/Utils/FocusRedirector.d.ts +0 -9
  941. package/lib/Utils/FocusRedirector.d.ts.map +0 -1
  942. package/lib/Utils/FocusRedirector.js +0 -61
  943. package/lib/Utils/InlineMarkdown.js +0 -166
  944. package/lib/Utils/JSONLinkedData/BlankNode.d.ts +0 -15
  945. package/lib/Utils/JSONLinkedData/BlankNode.d.ts.map +0 -1
  946. package/lib/Utils/JSONLinkedData/BlankNode.js +0 -2
  947. package/lib/Utils/JSONLinkedData/__snapshots__/dereferenceBlankNodes.spec.ts.snap +0 -92
  948. package/lib/Utils/JSONLinkedData/dereferenceBlankNodes.d.ts +0 -16
  949. package/lib/Utils/JSONLinkedData/dereferenceBlankNodes.d.ts.map +0 -1
  950. package/lib/Utils/JSONLinkedData/dereferenceBlankNodes.js +0 -96
  951. package/lib/Utils/JSONLinkedData/dereferenceBlankNodes.spec.d.ts +0 -2
  952. package/lib/Utils/JSONLinkedData/dereferenceBlankNodes.spec.d.ts.map +0 -1
  953. package/lib/Utils/JSONLinkedData/getSafeOwnPropertyNames.d.ts +0 -10
  954. package/lib/Utils/JSONLinkedData/getSafeOwnPropertyNames.d.ts.map +0 -1
  955. package/lib/Utils/JSONLinkedData/getSafeOwnPropertyNames.js +0 -22
  956. package/lib/Utils/JSONLinkedData/isBlankNode.d.ts +0 -10
  957. package/lib/Utils/JSONLinkedData/isBlankNode.d.ts.map +0 -1
  958. package/lib/Utils/JSONLinkedData/isBlankNode.js +0 -22
  959. package/lib/Utils/JSONLinkedData/isBlankNode.spec.d.ts +0 -2
  960. package/lib/Utils/JSONLinkedData/isBlankNode.spec.d.ts.map +0 -1
  961. package/lib/Utils/JSONLinkedData/isUnconnectedBlankNode.d.ts +0 -10
  962. package/lib/Utils/JSONLinkedData/isUnconnectedBlankNode.d.ts.map +0 -1
  963. package/lib/Utils/JSONLinkedData/isUnconnectedBlankNode.js +0 -21
  964. package/lib/Utils/JSONLinkedData/isUnconnectedBlankNode.spec.d.ts +0 -2
  965. package/lib/Utils/JSONLinkedData/isUnconnectedBlankNode.spec.d.ts.map +0 -1
  966. package/lib/Utils/JSONLinkedData/visitOnce.d.ts +0 -2
  967. package/lib/Utils/JSONLinkedData/visitOnce.d.ts.map +0 -1
  968. package/lib/Utils/JSONLinkedData/visitOnce.js +0 -17
  969. package/lib/Utils/LocalizedString.d.ts +0 -26
  970. package/lib/Utils/LocalizedString.d.ts.map +0 -1
  971. package/lib/Utils/LocalizedString.js +0 -138
  972. package/lib/Utils/TypeFocusSink/Context.js +0 -14
  973. package/lib/Utils/TypeFocusSink/FocusBox.js +0 -91
  974. package/lib/Utils/TypeFocusSink/getTabIndex.d.ts +0 -2
  975. package/lib/Utils/TypeFocusSink/getTabIndex.d.ts.map +0 -1
  976. package/lib/Utils/TypeFocusSink/getTabIndex.js +0 -27
  977. package/lib/Utils/TypeFocusSink/index.js +0 -18
  978. package/lib/Utils/TypeFocusSink/inputtableKey.d.ts +0 -2
  979. package/lib/Utils/TypeFocusSink/inputtableKey.d.ts.map +0 -1
  980. package/lib/Utils/TypeFocusSink/inputtableKey.js +0 -28
  981. package/lib/Utils/TypeFocusSink/navigableEvent.js +0 -59
  982. package/lib/Utils/activityAltText.d.ts +0 -8
  983. package/lib/Utils/activityAltText.d.ts.map +0 -1
  984. package/lib/Utils/activityAltText.js +0 -79
  985. package/lib/Utils/addTargetBlankToHyperlinksMarkdown.js +0 -34
  986. package/lib/Utils/betterLinks.d.ts +0 -28
  987. package/lib/Utils/betterLinks.d.ts.map +0 -1
  988. package/lib/Utils/betterLinks.js +0 -142
  989. package/lib/Utils/computeSuggestedActionText.d.ts +0 -3
  990. package/lib/Utils/computeSuggestedActionText.d.ts.map +0 -1
  991. package/lib/Utils/computeSuggestedActionText.js +0 -24
  992. package/lib/Utils/createCSSKey.js +0 -16
  993. package/lib/Utils/createCustomEvent.js +0 -34
  994. package/lib/Utils/detectBrowser.js +0 -27
  995. package/lib/Utils/downscaleImageToDataURL/WorkerJob.d.ts +0 -16
  996. package/lib/Utils/downscaleImageToDataURL/WorkerJob.d.ts.map +0 -1
  997. package/lib/Utils/downscaleImageToDataURL/WorkerJob.js +0 -2
  998. package/lib/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingBrowser.d.ts +0 -2
  999. package/lib/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingBrowser.d.ts.map +0 -1
  1000. package/lib/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingBrowser.js +0 -90
  1001. package/lib/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingWorker.d.ts +0 -4
  1002. package/lib/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingWorker.d.ts.map +0 -1
  1003. package/lib/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingWorker.js +0 -198
  1004. package/lib/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingWorker.worker.js +0 -96
  1005. package/lib/Utils/downscaleImageToDataURL/index.d.ts +0 -2
  1006. package/lib/Utils/downscaleImageToDataURL/index.d.ts.map +0 -1
  1007. package/lib/Utils/downscaleImageToDataURL/index.js +0 -44
  1008. package/lib/Utils/filterMap.js +0 -28
  1009. package/lib/Utils/findAncestor.d.ts +0 -2
  1010. package/lib/Utils/findAncestor.d.ts.map +0 -1
  1011. package/lib/Utils/findAncestor.js +0 -15
  1012. package/lib/Utils/firstTabbableDescendant.js +0 -40
  1013. package/lib/Utils/getActivityUniqueId.d.ts +0 -3
  1014. package/lib/Utils/getActivityUniqueId.d.ts.map +0 -1
  1015. package/lib/Utils/getActivityUniqueId.js +0 -11
  1016. package/lib/Utils/intersectionOf.d.ts +0 -5
  1017. package/lib/Utils/intersectionOf.d.ts.map +0 -1
  1018. package/lib/Utils/intersectionOf.js +0 -27
  1019. package/lib/Utils/isZeroOrPositive.d.ts +0 -5
  1020. package/lib/Utils/isZeroOrPositive.d.ts.map +0 -1
  1021. package/lib/Utils/isZeroOrPositive.js +0 -14
  1022. package/lib/Utils/mapMap.js +0 -27
  1023. package/lib/Utils/parseDocumentFromString.d.ts +0 -2
  1024. package/lib/Utils/parseDocumentFromString.d.ts.map +0 -1
  1025. package/lib/Utils/parseDocumentFromString.js +0 -11
  1026. package/lib/Utils/randomId.js +0 -15
  1027. package/lib/Utils/readDataURIToBlob.js +0 -44
  1028. package/lib/Utils/removeInline.js +0 -18
  1029. package/lib/Utils/scrollIntoViewWithBlockNearest.d.ts +0 -7
  1030. package/lib/Utils/scrollIntoViewWithBlockNearest.d.ts.map +0 -1
  1031. package/lib/Utils/scrollIntoViewWithBlockNearest.js +0 -38
  1032. package/lib/Utils/serializeDocumentIntoString.d.ts +0 -2
  1033. package/lib/Utils/serializeDocumentIntoString.d.ts.map +0 -1
  1034. package/lib/Utils/serializeDocumentIntoString.js +0 -27
  1035. package/lib/Utils/shallowEquals.js +0 -21
  1036. package/lib/Utils/singleToArray.d.ts +0 -2
  1037. package/lib/Utils/singleToArray.d.ts.map +0 -1
  1038. package/lib/Utils/singleToArray.js +0 -10
  1039. package/lib/Utils/supportPseudoClass.d.ts +0 -2
  1040. package/lib/Utils/supportPseudoClass.d.ts.map +0 -1
  1041. package/lib/Utils/supportPseudoClass.js +0 -21
  1042. package/lib/Utils/tabbableElements.d.ts +0 -2
  1043. package/lib/Utils/tabbableElements.d.ts.map +0 -1
  1044. package/lib/Utils/tabbableElements.js +0 -20
  1045. package/lib/Utils/textFormatToContentType.js +0 -17
  1046. package/lib/Utils/updateMarkdownAttrs.js +0 -16
  1047. package/lib/Utils/walkMarkdownTokens.js +0 -19
  1048. package/lib/hooks/index.d.ts +0 -22
  1049. package/lib/hooks/index.d.ts.map +0 -1
  1050. package/lib/hooks/index.js +0 -152
  1051. package/lib/hooks/internal/BypassSpeechSynthesisPonyfill.js +0 -278
  1052. package/lib/hooks/internal/UITracker.js +0 -39
  1053. package/lib/hooks/internal/WebChatUIContext.d.ts +0 -8
  1054. package/lib/hooks/internal/WebChatUIContext.d.ts.map +0 -1
  1055. package/lib/hooks/internal/WebChatUIContext.js +0 -11
  1056. package/lib/hooks/internal/createWaitUntilable.d.ts +0 -5
  1057. package/lib/hooks/internal/createWaitUntilable.d.ts.map +0 -1
  1058. package/lib/hooks/internal/createWaitUntilable.js +0 -50
  1059. package/lib/hooks/internal/createWaitUntilable.spec.d.ts +0 -2
  1060. package/lib/hooks/internal/createWaitUntilable.spec.d.ts.map +0 -1
  1061. package/lib/hooks/internal/private/createOnEventShim.d.ts +0 -5
  1062. package/lib/hooks/internal/private/createOnEventShim.d.ts.map +0 -1
  1063. package/lib/hooks/internal/private/createOnEventShim.js +0 -25
  1064. package/lib/hooks/internal/private/createOnEventShim.spec.d.ts +0 -2
  1065. package/lib/hooks/internal/private/createOnEventShim.spec.d.ts.map +0 -1
  1066. package/lib/hooks/internal/useChanged.d.ts +0 -9
  1067. package/lib/hooks/internal/useChanged.d.ts.map +0 -1
  1068. package/lib/hooks/internal/useChanged.js +0 -21
  1069. package/lib/hooks/internal/useDispatchScrollPosition.js +0 -12
  1070. package/lib/hooks/internal/useDispatchTranscriptFocusByActivityKey.d.ts +0 -2
  1071. package/lib/hooks/internal/useDispatchTranscriptFocusByActivityKey.d.ts.map +0 -1
  1072. package/lib/hooks/internal/useDispatchTranscriptFocusByActivityKey.js +0 -12
  1073. package/lib/hooks/internal/useEnterKeyHint.js +0 -18
  1074. package/lib/hooks/internal/useFocusVisible.d.ts +0 -3
  1075. package/lib/hooks/internal/useFocusVisible.d.ts.map +0 -1
  1076. package/lib/hooks/internal/useFocusVisible.js +0 -37
  1077. package/lib/hooks/internal/useFocusWithin.d.ts +0 -3
  1078. package/lib/hooks/internal/useFocusWithin.d.ts.map +0 -1
  1079. package/lib/hooks/internal/useFocusWithin.js +0 -38
  1080. package/lib/hooks/internal/useForceRender.js +0 -24
  1081. package/lib/hooks/internal/useForceRenderAtInterval.d.ts +0 -3
  1082. package/lib/hooks/internal/useForceRenderAtInterval.d.ts.map +0 -1
  1083. package/lib/hooks/internal/useForceRenderAtInterval.js +0 -57
  1084. package/lib/hooks/internal/useInternalMarkdownIt.js +0 -14
  1085. package/lib/hooks/internal/useInternalRenderMarkdownInline.js +0 -16
  1086. package/lib/hooks/internal/useLocalizeAccessKey.d.ts +0 -2
  1087. package/lib/hooks/internal/useLocalizeAccessKey.d.ts.map +0 -1
  1088. package/lib/hooks/internal/useLocalizeAccessKey.js +0 -38
  1089. package/lib/hooks/internal/useMemoWithPrevious.d.ts +0 -3
  1090. package/lib/hooks/internal/useMemoWithPrevious.d.ts.map +0 -1
  1091. package/lib/hooks/internal/useMemoWithPrevious.js +0 -20
  1092. package/lib/hooks/internal/useMemoized.d.ts +0 -11
  1093. package/lib/hooks/internal/useMemoized.d.ts.map +0 -1
  1094. package/lib/hooks/internal/useMemoized.js +0 -82
  1095. package/lib/hooks/internal/useMemoized.spec.jsx +0 -159
  1096. package/lib/hooks/internal/useNavigatorPlatform.js +0 -31
  1097. package/lib/hooks/internal/useNonce.js +0 -14
  1098. package/lib/hooks/internal/useObserveFocusVisible.d.ts +0 -3
  1099. package/lib/hooks/internal/useObserveFocusVisible.d.ts.map +0 -1
  1100. package/lib/hooks/internal/useObserveFocusVisible.js +0 -201
  1101. package/lib/hooks/internal/usePrevious.d.ts +0 -2
  1102. package/lib/hooks/internal/usePrevious.d.ts.map +0 -1
  1103. package/lib/hooks/internal/usePrevious.js +0 -17
  1104. package/lib/hooks/internal/useRegisterFocusTranscript.js +0 -27
  1105. package/lib/hooks/internal/useRegisterScrollTo.js +0 -27
  1106. package/lib/hooks/internal/useRegisterScrollToEnd.js +0 -25
  1107. package/lib/hooks/internal/useReplaceEmoticon.js +0 -58
  1108. package/lib/hooks/internal/useResumeAudioContext.d.ts +0 -2
  1109. package/lib/hooks/internal/useResumeAudioContext.d.ts.map +0 -1
  1110. package/lib/hooks/internal/useResumeAudioContext.js +0 -23
  1111. package/lib/hooks/internal/useSendBoxFocusRef.js +0 -12
  1112. package/lib/hooks/internal/useSettableDictateAbortable.js +0 -15
  1113. package/lib/hooks/internal/useStateRef.d.ts +0 -3
  1114. package/lib/hooks/internal/useStateRef.d.ts.map +0 -1
  1115. package/lib/hooks/internal/useStateRef.js +0 -30
  1116. package/lib/hooks/internal/useStyleToEmotionObject.js +0 -12
  1117. package/lib/hooks/internal/useSuggestedActionsAccessKey.js +0 -14
  1118. package/lib/hooks/internal/useTimer.d.ts +0 -5
  1119. package/lib/hooks/internal/useTimer.d.ts.map +0 -1
  1120. package/lib/hooks/internal/useTimer.js +0 -46
  1121. package/lib/hooks/internal/useTranscriptActivityElementsRef.js +0 -12
  1122. package/lib/hooks/internal/useTranscriptFocusRef.js +0 -12
  1123. package/lib/hooks/internal/useUniqueId.d.ts +0 -2
  1124. package/lib/hooks/internal/useUniqueId.d.ts.map +0 -1
  1125. package/lib/hooks/internal/useUniqueId.js +0 -19
  1126. package/lib/hooks/internal/useValueRef.d.ts +0 -3
  1127. package/lib/hooks/internal/useValueRef.d.ts.map +0 -1
  1128. package/lib/hooks/internal/useValueRef.js +0 -24
  1129. package/lib/hooks/internal/useWebChatUIContext.js +0 -17
  1130. package/lib/hooks/sendBoxFocus.d.ts +0 -7
  1131. package/lib/hooks/sendBoxFocus.d.ts.map +0 -1
  1132. package/lib/hooks/sendBoxFocus.js +0 -13
  1133. package/lib/hooks/transcriptScrollRelative.d.ts +0 -7
  1134. package/lib/hooks/transcriptScrollRelative.d.ts.map +0 -1
  1135. package/lib/hooks/transcriptScrollRelative.js +0 -13
  1136. package/lib/hooks/useDictateAbortable.d.ts +0 -2
  1137. package/lib/hooks/useDictateAbortable.d.ts.map +0 -1
  1138. package/lib/hooks/useDictateAbortable.js +0 -22
  1139. package/lib/hooks/useFocus.d.ts +0 -2
  1140. package/lib/hooks/useFocus.d.ts.map +0 -1
  1141. package/lib/hooks/useFocus.js +0 -65
  1142. package/lib/hooks/useMakeThumbnail.d.ts +0 -2
  1143. package/lib/hooks/useMakeThumbnail.d.ts.map +0 -1
  1144. package/lib/hooks/useMakeThumbnail.js +0 -74
  1145. package/lib/hooks/useObserveScrollPosition.d.ts +0 -3
  1146. package/lib/hooks/useObserveScrollPosition.d.ts.map +0 -1
  1147. package/lib/hooks/useObserveScrollPosition.js +0 -31
  1148. package/lib/hooks/useObserveTranscriptFocus.d.ts +0 -5
  1149. package/lib/hooks/useObserveTranscriptFocus.d.ts.map +0 -1
  1150. package/lib/hooks/useObserveTranscriptFocus.js +0 -31
  1151. package/lib/hooks/useRenderMarkdownAsHTML.d.ts +0 -5
  1152. package/lib/hooks/useRenderMarkdownAsHTML.d.ts.map +0 -1
  1153. package/lib/hooks/useRenderMarkdownAsHTML.js +0 -62
  1154. package/lib/hooks/useScrollDown.d.ts +0 -4
  1155. package/lib/hooks/useScrollDown.d.ts.map +0 -1
  1156. package/lib/hooks/useScrollDown.js +0 -20
  1157. package/lib/hooks/useScrollTo.d.ts +0 -5
  1158. package/lib/hooks/useScrollTo.d.ts.map +0 -1
  1159. package/lib/hooks/useScrollTo.js +0 -22
  1160. package/lib/hooks/useScrollToEnd.d.ts +0 -2
  1161. package/lib/hooks/useScrollToEnd.d.ts.map +0 -1
  1162. package/lib/hooks/useScrollToEnd.js +0 -21
  1163. package/lib/hooks/useScrollUp.d.ts +0 -4
  1164. package/lib/hooks/useScrollUp.d.ts.map +0 -1
  1165. package/lib/hooks/useScrollUp.js +0 -20
  1166. package/lib/hooks/useSendFiles.d.ts +0 -5
  1167. package/lib/hooks/useSendFiles.d.ts.map +0 -1
  1168. package/lib/hooks/useSendFiles.js +0 -63
  1169. package/lib/hooks/useSendMessage.d.ts +0 -8
  1170. package/lib/hooks/useSendMessage.d.ts.map +0 -1
  1171. package/lib/hooks/useSendMessage.js +0 -102
  1172. package/lib/hooks/useStyleSet.d.ts +0 -3
  1173. package/lib/hooks/useStyleSet.d.ts.map +0 -1
  1174. package/lib/hooks/useStyleSet.js +0 -13
  1175. package/lib/hooks/useWebSpeechPonyfill.d.ts +0 -3
  1176. package/lib/hooks/useWebSpeechPonyfill.d.ts.map +0 -1
  1177. package/lib/hooks/useWebSpeechPonyfill.js +0 -12
  1178. package/lib/index.d.ts +0 -330
  1179. package/lib/index.d.ts.map +0 -1
  1180. package/lib/index.js +0 -164
  1181. package/lib/internal.d.ts +0 -4
  1182. package/lib/internal.d.ts.map +0 -1
  1183. package/lib/internal.js +0 -21
  1184. package/lib/providers/ActivityTree/ActivityTreeComposer.d.ts +0 -7
  1185. package/lib/providers/ActivityTree/ActivityTreeComposer.d.ts.map +0 -1
  1186. package/lib/providers/ActivityTree/ActivityTreeComposer.js +0 -90
  1187. package/lib/providers/ActivityTree/private/Context.d.ts +0 -9
  1188. package/lib/providers/ActivityTree/private/Context.d.ts.map +0 -1
  1189. package/lib/providers/ActivityTree/private/Context.js +0 -10
  1190. package/lib/providers/ActivityTree/private/types.d.ts +0 -10
  1191. package/lib/providers/ActivityTree/private/types.d.ts.map +0 -1
  1192. package/lib/providers/ActivityTree/private/types.js +0 -2
  1193. package/lib/providers/ActivityTree/private/useActivitiesWithRenderer.d.ts +0 -4
  1194. package/lib/providers/ActivityTree/private/useActivitiesWithRenderer.d.ts.map +0 -1
  1195. package/lib/providers/ActivityTree/private/useActivitiesWithRenderer.js +0 -36
  1196. package/lib/providers/ActivityTree/private/useActivityTreeWithRenderer.d.ts +0 -5
  1197. package/lib/providers/ActivityTree/private/useActivityTreeWithRenderer.d.ts.map +0 -1
  1198. package/lib/providers/ActivityTree/private/useActivityTreeWithRenderer.js +0 -147
  1199. package/lib/providers/ActivityTree/private/useContext.d.ts +0 -3
  1200. package/lib/providers/ActivityTree/private/useContext.d.ts.map +0 -1
  1201. package/lib/providers/ActivityTree/private/useContext.js +0 -18
  1202. package/lib/providers/ActivityTree/useActivityTreeWithRenderer.d.ts +0 -8
  1203. package/lib/providers/ActivityTree/useActivityTreeWithRenderer.d.ts.map +0 -1
  1204. package/lib/providers/ActivityTree/useActivityTreeWithRenderer.js +0 -14
  1205. package/lib/providers/LiveRegionTwin/LiveRegionTwinComposer.d.ts +0 -37
  1206. package/lib/providers/LiveRegionTwin/LiveRegionTwinComposer.d.ts.map +0 -1
  1207. package/lib/providers/LiveRegionTwin/LiveRegionTwinComposer.js +0 -145
  1208. package/lib/providers/LiveRegionTwin/private/Context.d.ts +0 -10
  1209. package/lib/providers/LiveRegionTwin/private/Context.d.ts.map +0 -1
  1210. package/lib/providers/LiveRegionTwin/private/Context.js +0 -11
  1211. package/lib/providers/LiveRegionTwin/private/LiveRegionTwinContainer.d.ts +0 -12
  1212. package/lib/providers/LiveRegionTwin/private/LiveRegionTwinContainer.d.ts.map +0 -1
  1213. package/lib/providers/LiveRegionTwin/private/LiveRegionTwinContainer.js +0 -77
  1214. package/lib/providers/LiveRegionTwin/private/types.d.ts +0 -8
  1215. package/lib/providers/LiveRegionTwin/private/types.d.ts.map +0 -1
  1216. package/lib/providers/LiveRegionTwin/private/types.js +0 -2
  1217. package/lib/providers/LiveRegionTwin/private/useContext.d.ts +0 -3
  1218. package/lib/providers/LiveRegionTwin/private/useContext.d.ts.map +0 -1
  1219. package/lib/providers/LiveRegionTwin/private/useContext.js +0 -18
  1220. package/lib/providers/LiveRegionTwin/private/useMarkAllAsRenderedEffect.d.ts +0 -2
  1221. package/lib/providers/LiveRegionTwin/private/useMarkAllAsRenderedEffect.d.ts.map +0 -1
  1222. package/lib/providers/LiveRegionTwin/private/useMarkAllAsRenderedEffect.js +0 -20
  1223. package/lib/providers/LiveRegionTwin/private/useStaticElementEntries.d.ts +0 -3
  1224. package/lib/providers/LiveRegionTwin/private/useStaticElementEntries.d.ts.map +0 -1
  1225. package/lib/providers/LiveRegionTwin/private/useStaticElementEntries.js +0 -12
  1226. package/lib/providers/LiveRegionTwin/useQueueStaticElement.d.ts +0 -8
  1227. package/lib/providers/LiveRegionTwin/useQueueStaticElement.d.ts.map +0 -1
  1228. package/lib/providers/LiveRegionTwin/useQueueStaticElement.js +0 -17
  1229. package/lib/providers/ModalDialog/ModalDialogComposer.d.ts +0 -7
  1230. package/lib/providers/ModalDialog/ModalDialogComposer.d.ts.map +0 -1
  1231. package/lib/providers/ModalDialog/ModalDialogComposer.js +0 -51
  1232. package/lib/providers/ModalDialog/private/Context.d.ts +0 -13
  1233. package/lib/providers/ModalDialog/private/Context.d.ts.map +0 -1
  1234. package/lib/providers/ModalDialog/private/Context.js +0 -24
  1235. package/lib/providers/ModalDialog/private/Popover.d.ts +0 -10
  1236. package/lib/providers/ModalDialog/private/Popover.d.ts.map +0 -1
  1237. package/lib/providers/ModalDialog/private/Popover.js +0 -79
  1238. package/lib/providers/ModalDialog/private/useContext.d.ts +0 -4
  1239. package/lib/providers/ModalDialog/private/useContext.d.ts.map +0 -1
  1240. package/lib/providers/ModalDialog/private/useContext.js +0 -13
  1241. package/lib/providers/ModalDialog/useClose.d.ts +0 -3
  1242. package/lib/providers/ModalDialog/useClose.d.ts.map +0 -1
  1243. package/lib/providers/ModalDialog/useClose.js +0 -12
  1244. package/lib/providers/ModalDialog/useShowModal.d.ts +0 -3
  1245. package/lib/providers/ModalDialog/useShowModal.d.ts.map +0 -1
  1246. package/lib/providers/ModalDialog/useShowModal.js +0 -12
  1247. package/lib/providers/RovingTabIndex/RovingTabIndexComposer.d.ts +0 -8
  1248. package/lib/providers/RovingTabIndex/RovingTabIndexComposer.d.ts.map +0 -1
  1249. package/lib/providers/RovingTabIndex/RovingTabIndexComposer.js +0 -163
  1250. package/lib/providers/RovingTabIndex/private/Context.d.ts +0 -8
  1251. package/lib/providers/RovingTabIndex/private/Context.d.ts.map +0 -1
  1252. package/lib/providers/RovingTabIndex/private/Context.js +0 -17
  1253. package/lib/providers/RovingTabIndex/private/useContext.d.ts +0 -2
  1254. package/lib/providers/RovingTabIndex/private/useContext.d.ts.map +0 -1
  1255. package/lib/providers/RovingTabIndex/private/useContext.js +0 -18
  1256. package/lib/providers/RovingTabIndex/useItemRef.d.ts +0 -3
  1257. package/lib/providers/RovingTabIndex/useItemRef.d.ts.map +0 -1
  1258. package/lib/providers/RovingTabIndex/useItemRef.js +0 -19
  1259. package/lib/providers/Theme/ThemeProvider.d.ts +0 -7
  1260. package/lib/providers/Theme/ThemeProvider.d.ts.map +0 -1
  1261. package/lib/providers/Theme/ThemeProvider.js +0 -103
  1262. package/lib/providers/Theme/private/Context.d.ts +0 -19
  1263. package/lib/providers/Theme/private/Context.d.ts.map +0 -1
  1264. package/lib/providers/Theme/private/Context.js +0 -26
  1265. package/lib/providers/Theme/useTheme.d.ts +0 -2
  1266. package/lib/providers/Theme/useTheme.d.ts.map +0 -1
  1267. package/lib/providers/Theme/useTheme.js +0 -13
  1268. package/lib/providers/TranscriptFocus/TranscriptFocusComposer.d.ts +0 -7
  1269. package/lib/providers/TranscriptFocus/TranscriptFocusComposer.d.ts.map +0 -1
  1270. package/lib/providers/TranscriptFocus/TranscriptFocusComposer.js +0 -153
  1271. package/lib/providers/TranscriptFocus/private/Context.d.ts +0 -12
  1272. package/lib/providers/TranscriptFocus/private/Context.d.ts.map +0 -1
  1273. package/lib/providers/TranscriptFocus/private/Context.js +0 -11
  1274. package/lib/providers/TranscriptFocus/private/useContext.d.ts +0 -2
  1275. package/lib/providers/TranscriptFocus/private/useContext.d.ts.map +0 -1
  1276. package/lib/providers/TranscriptFocus/private/useContext.js +0 -18
  1277. package/lib/providers/TranscriptFocus/useActiveDescendantId.d.ts +0 -2
  1278. package/lib/providers/TranscriptFocus/useActiveDescendantId.d.ts.map +0 -1
  1279. package/lib/providers/TranscriptFocus/useActiveDescendantId.js +0 -12
  1280. package/lib/providers/TranscriptFocus/useFocusByActivityKey.d.ts +0 -8
  1281. package/lib/providers/TranscriptFocus/useFocusByActivityKey.d.ts.map +0 -1
  1282. package/lib/providers/TranscriptFocus/useFocusByActivityKey.js +0 -18
  1283. package/lib/providers/TranscriptFocus/useFocusRelativeActivity.d.ts +0 -2
  1284. package/lib/providers/TranscriptFocus/useFocusRelativeActivity.d.ts.map +0 -1
  1285. package/lib/providers/TranscriptFocus/useFocusRelativeActivity.js +0 -12
  1286. package/lib/providers/TranscriptFocus/useFocusedActivityKey.d.ts +0 -2
  1287. package/lib/providers/TranscriptFocus/useFocusedActivityKey.d.ts.map +0 -1
  1288. package/lib/providers/TranscriptFocus/useFocusedActivityKey.js +0 -12
  1289. package/lib/providers/TranscriptFocus/useFocusedExplicitly.d.ts +0 -2
  1290. package/lib/providers/TranscriptFocus/useFocusedExplicitly.d.ts.map +0 -1
  1291. package/lib/providers/TranscriptFocus/useFocusedExplicitly.js +0 -12
  1292. package/lib/providers/TranscriptFocus/useGetDescendantIdByActivityKey.d.ts +0 -2
  1293. package/lib/providers/TranscriptFocus/useGetDescendantIdByActivityKey.d.ts.map +0 -1
  1294. package/lib/providers/TranscriptFocus/useGetDescendantIdByActivityKey.js +0 -12
  1295. package/lib/providers/internal/SendBox/SendBoxComposer.d.ts +0 -4
  1296. package/lib/providers/internal/SendBox/SendBoxComposer.d.ts.map +0 -1
  1297. package/lib/providers/internal/SendBox/SendBoxComposer.js +0 -161
  1298. package/lib/providers/internal/SendBox/private/Context.d.ts +0 -4
  1299. package/lib/providers/internal/SendBox/private/Context.d.ts.map +0 -1
  1300. package/lib/providers/internal/SendBox/private/Context.js +0 -11
  1301. package/lib/providers/internal/SendBox/private/types.d.ts +0 -8
  1302. package/lib/providers/internal/SendBox/private/types.d.ts.map +0 -1
  1303. package/lib/providers/internal/SendBox/private/types.js +0 -2
  1304. package/lib/providers/internal/SendBox/private/useContext.d.ts +0 -3
  1305. package/lib/providers/internal/SendBox/private/useContext.d.ts.map +0 -1
  1306. package/lib/providers/internal/SendBox/private/useContext.js +0 -17
  1307. package/lib/providers/internal/SendBox/useErrorMessageId.d.ts +0 -12
  1308. package/lib/providers/internal/SendBox/useErrorMessageId.d.ts.map +0 -1
  1309. package/lib/providers/internal/SendBox/useErrorMessageId.js +0 -22
  1310. package/lib/providers/internal/SendBox/useSubmit.d.ts +0 -14
  1311. package/lib/providers/internal/SendBox/useSubmit.d.ts.map +0 -1
  1312. package/lib/providers/internal/SendBox/useSubmit.js +0 -20
  1313. package/lib/tsconfig.json +0 -18
  1314. package/lib/types/ContextOf.d.ts +0 -4
  1315. package/lib/types/ContextOf.d.ts.map +0 -1
  1316. package/lib/types/ContextOf.js +0 -2
  1317. package/lib/types/PropsOf.d.ts +0 -3
  1318. package/lib/types/PropsOf.d.ts.map +0 -1
  1319. package/lib/types/PropsOf.js +0 -2
  1320. package/lib/types/ScrollPosition.d.ts +0 -6
  1321. package/lib/types/ScrollPosition.d.ts.map +0 -1
  1322. package/lib/types/ScrollPosition.js +0 -2
  1323. package/lib/types/internal/FocusTranscriptInit.d.ts +0 -4
  1324. package/lib/types/internal/FocusTranscriptInit.d.ts.map +0 -1
  1325. package/lib/types/internal/FocusTranscriptInit.js +0 -2
  1326. package/lib/types/internal/SendStatus.d.ts +0 -7
  1327. package/lib/types/internal/SendStatus.d.ts.map +0 -1
  1328. package/lib/types/internal/SendStatus.js +0 -19
  1329. package/lib/types/internal/TypeOfArray.d.ts +0 -2
  1330. package/lib/types/internal/TypeOfArray.d.ts.map +0 -1
  1331. package/lib/types/internal/TypeOfArray.js +0 -2
  1332. package/lib/withEmoji/private/UndoEntry.d.ts +0 -9
  1333. package/lib/withEmoji/private/UndoEntry.d.ts.map +0 -1
  1334. package/lib/withEmoji/private/UndoEntry.js +0 -69
  1335. package/lib/withEmoji/private/useUndoStack.d.ts +0 -6
  1336. package/lib/withEmoji/private/useUndoStack.d.ts.map +0 -1
  1337. package/lib/withEmoji/private/useUndoStack.js +0 -64
  1338. package/lib/withEmoji/withEmoji.d.ts +0 -15
  1339. package/lib/withEmoji/withEmoji.d.ts.map +0 -1
  1340. package/lib/withEmoji/withEmoji.js +0 -128
  1341. package/src/Activity/SayAlt.js +0 -26
  1342. package/src/ActivityStatus/AbsoluteTime.js +0 -32
  1343. package/src/ActivityStatus/Slotted.tsx +0 -26
  1344. package/src/ActivityStatus/private/Feedback/Feedback.tsx +0 -60
  1345. package/src/ActivityStatus/private/Feedback/private/ThumbButton.Image.tsx +0 -30
  1346. package/src/ActivityStatus/private/Feedback/private/ThumbButton.tsx +0 -54
  1347. package/src/ActivityStatus/private/Feedback/private/VoteButton.tsx +0 -36
  1348. package/src/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Filled.tsx +0 -16
  1349. package/src/ActivityStatus/private/Feedback/private/icons/ThumbDislike16Regular.tsx +0 -16
  1350. package/src/ActivityStatus/private/Feedback/private/icons/ThumbLike16Filled.tsx +0 -16
  1351. package/src/ActivityStatus/private/Feedback/private/icons/ThumbLike16Regular.tsx +0 -16
  1352. package/src/ActivityStatus/private/RelativeTime.js +0 -31
  1353. package/src/Attachment/Assets/DownloadIcon.js +0 -29
  1354. package/src/Attachment/ImageAttachment.js +0 -37
  1355. package/src/Avatar/ImageAvatar.js +0 -49
  1356. package/src/Avatar/InitialsAvatar.js +0 -50
  1357. package/src/ConnectivityStatus/Connecting.js +0 -72
  1358. package/src/LinkDefinition/private/Chevron.tsx +0 -21
  1359. package/src/Middleware/Activity/createCoreMiddleware.tsx +0 -102
  1360. package/src/Middleware/Avatar/createCoreMiddleware.tsx +0 -76
  1361. package/src/Middleware/ScrollToEndButton/ScrollToEndButton.js +0 -45
  1362. package/src/SendBox/Assets/MicrophoneIcon.js +0 -12
  1363. package/src/SendBox/Assets/SendIcon.js +0 -36
  1364. package/src/Styles/StyleSet/CSSCustomProperties.ts +0 -46
  1365. package/src/Styles/StyleSet/KeyboardHelp.ts +0 -204
  1366. package/src/Styles/StyleSet/SingleAttachmentActivity.ts +0 -18
  1367. package/src/Styles/StyleSet/SlottedActivityStatus.ts +0 -16
  1368. package/src/Transcript/KeyboardHelp.tsx +0 -319
  1369. package/src/TranscriptActivity.tsx +0 -64
  1370. package/src/Utils/AccessKeySink/Surface.js +0 -56
  1371. package/src/Utils/CroppedImage.js +0 -45
  1372. package/src/Utils/parseDocumentFromString.ts +0 -5
  1373. package/src/Utils/readDataURIToBlob.js +0 -31
  1374. package/src/Utils/serializeDocumentIntoString.ts +0 -10
  1375. package/src/Utils/singleToArray.ts +0 -3
  1376. package/src/Utils/textFormatToContentType.js +0 -12
  1377. package/src/hooks/internal/useMemoWithPrevious.ts +0 -16
  1378. package/src/hooks/internal/useNonce.js +0 -7
  1379. package/src/hooks/internal/useStyleToEmotionObject.js +0 -5
  1380. package/src/internal.ts +0 -4
  1381. package/src/providers/ActivityTree/ActivityTreeComposer.tsx +0 -90
  1382. package/src/providers/ActivityTree/private/Context.ts +0 -12
  1383. package/src/providers/ActivityTree/private/types.ts +0 -12
  1384. package/src/providers/ActivityTree/private/useActivitiesWithRenderer.ts +0 -40
  1385. package/src/providers/ActivityTree/private/useActivityTreeWithRenderer.ts +0 -140
  1386. package/src/providers/ActivityTree/private/useContext.ts +0 -15
  1387. package/src/providers/ActivityTree/useActivityTreeWithRenderer.ts +0 -16
  1388. package/src/providers/LiveRegionTwin/LiveRegionTwinComposer.tsx +0 -172
  1389. package/src/providers/LiveRegionTwin/private/Context.ts +0 -15
@@ -1,65 +1,73 @@
1
+ // TODO: [P2] Fix ESLint error `no-use-before-define`
2
+ /* eslint-disable @typescript-eslint/no-use-before-define */
3
+
1
4
  import { hooks } from 'botframework-webchat-api';
5
+ import classNames from 'classnames';
6
+ import React, {
7
+ forwardRef,
8
+ Fragment,
9
+ memo,
10
+ useCallback,
11
+ useMemo,
12
+ useRef,
13
+ type KeyboardEventHandler,
14
+ type MutableRefObject,
15
+ type ReactNode
16
+ } from 'react';
2
17
  import {
3
18
  Composer as ReactScrollToBottomComposer,
4
19
  Panel as ReactScrollToBottomPanel,
5
- useAnimatingToEnd,
6
- useAtEnd,
7
20
  useObserveScrollPosition,
8
21
  useScrollTo,
9
22
  useScrollToEnd,
10
23
  useSticky
11
24
  } from 'react-scroll-to-bottom';
12
- import classNames from 'classnames';
13
- import PropTypes from 'prop-types';
14
- import React, { forwardRef, Fragment, memo, useCallback, useMemo, useRef } from 'react';
15
-
16
- import type { ActivityElementMap } from './Transcript/types';
17
- import type { FC, KeyboardEventHandler, MutableRefObject, ReactNode } from 'react';
18
- import type { WebChatActivity } from 'botframework-webchat-core';
25
+ import { wrapWith } from 'react-wrap-with';
19
26
 
20
- import { android } from './Utils/detectBrowser';
21
27
  import BasicTypingIndicator from './BasicTypingIndicator';
28
+ import ChatHistoryBox from './ChatHistory/ChatHistoryBox';
29
+ import ChatHistoryToolbar from './ChatHistory/ChatHistoryToolbar';
30
+ import ScrollToEndButton from './ChatHistory/private/ScrollToEndButton';
31
+ import ActivityTree from './Transcript/ActivityTree';
32
+ import LiveRegionTranscript from './Transcript/LiveRegionTranscript';
33
+ import { TranscriptFocusArea, TranscriptFocusTerminator } from './Transcript/TranscriptFocus';
34
+ import TranscriptActivityList from './Transcript/TranscriptFocus/TranscriptActivityList';
35
+ import { type ActivityElementMap } from './Transcript/types';
22
36
  import FocusRedirector from './Utils/FocusRedirector';
23
37
  import inputtableKey from './Utils/TypeFocusSink/inputtableKey';
24
- import isZeroOrPositive from './Utils/isZeroOrPositive';
25
- import KeyboardHelp from './Transcript/KeyboardHelp';
26
- import LiveRegionTranscript from './Transcript/LiveRegionTranscript';
27
- // TODO: [P2] #4133 Rename to "getTabbableElements".
28
- import tabbableElements from './Utils/tabbableElements';
29
- import TranscriptFocusComposer from './providers/TranscriptFocus/TranscriptFocusComposer';
30
- import useActiveDescendantId from './providers/TranscriptFocus/useActiveDescendantId';
31
- import useActivityTreeWithRenderer from './providers/ActivityTree/useActivityTreeWithRenderer';
38
+ import { android } from './Utils/detectBrowser';
39
+ import { useStyleToEmotionObject } from './hooks/internal/styleToEmotionObject';
32
40
  import useDispatchScrollPosition from './hooks/internal/useDispatchScrollPosition';
33
41
  import useDispatchTranscriptFocusByActivityKey from './hooks/internal/useDispatchTranscriptFocusByActivityKey';
34
- import useFocus from './hooks/useFocus';
35
- import useFocusByActivityKey from './providers/TranscriptFocus/useFocusByActivityKey';
36
- import useFocusedActivityKey from './providers/TranscriptFocus/useFocusedActivityKey';
37
- import useFocusedExplicitly from './providers/TranscriptFocus/useFocusedExplicitly';
38
- import useFocusRelativeActivity from './providers/TranscriptFocus/useFocusRelativeActivity';
42
+ import useNonce from './hooks/internal/useNonce';
39
43
  import useObserveFocusVisible from './hooks/internal/useObserveFocusVisible';
40
44
  import usePrevious from './hooks/internal/usePrevious';
41
45
  import useRegisterFocusTranscript from './hooks/internal/useRegisterFocusTranscript';
42
46
  import useRegisterScrollTo from './hooks/internal/useRegisterScrollTo';
43
47
  import useRegisterScrollToEnd from './hooks/internal/useRegisterScrollToEnd';
44
- import useStyleSet from './hooks/useStyleSet';
45
- import useStyleToEmotionObject from './hooks/internal/useStyleToEmotionObject';
46
- import useUniqueId from './hooks/internal/useUniqueId';
47
48
  import useValueRef from './hooks/internal/useValueRef';
48
- import TranscriptActivity from './TranscriptActivity';
49
- import useMemoized from './hooks/internal/useMemoized';
50
49
  import {
51
50
  useRegisterScrollRelativeTranscript,
52
51
  type TranscriptScrollRelativeOptions
53
52
  } from './hooks/transcriptScrollRelative';
53
+ import useFocus from './hooks/useFocus';
54
+ import useStyleSet from './hooks/useStyleSet';
55
+ import ChatHistoryDOMComposer from './providers/ChatHistoryDOM/ChatHistoryDOMComposer';
56
+ import useActivityElementMapRef from './providers/ChatHistoryDOM/useActivityElementRef';
57
+ import GroupedRenderingActivitiesComposer from './providers/GroupedRenderingActivities/GroupedRenderingActivitiesComposer';
58
+ import useNumRenderingActivities from './providers/GroupedRenderingActivities/useNumRenderingActivities';
59
+ import RenderingActivitiesComposer from './providers/RenderingActivities/RenderingActivitiesComposer';
60
+ import TranscriptFocusComposer from './providers/TranscriptFocus/TranscriptFocusComposer';
61
+ import useActiveDescendantId from './providers/TranscriptFocus/useActiveDescendantId';
62
+ import useFocusByActivityKey from './providers/TranscriptFocus/useFocusByActivityKey';
63
+ import useFocusRelativeActivity from './providers/TranscriptFocus/useFocusRelativeActivity';
64
+ import useFocusedExplicitly from './providers/TranscriptFocus/useFocusedExplicitly';
65
+ import useFocusedKey from './providers/TranscriptFocus/useFocusedKey';
54
66
 
55
67
  const {
56
68
  useActivityKeys,
57
- useActivityKeysByRead,
58
- useCreateAvatarRenderer,
59
- useCreateScrollToEndButtonRenderer,
60
69
  useDirection,
61
70
  useGetActivityByKey,
62
- useGetKeyByActivity,
63
71
  useGetKeyByActivityId,
64
72
  useLastAcknowledgedActivityKey,
65
73
  useLocalizer,
@@ -91,6 +99,10 @@ const ROOT_STYLE = {
91
99
 
92
100
  '& .webchat__basic-transcript__transcript': {
93
101
  listStyleType: 'none'
102
+ },
103
+
104
+ '& .webchat__basic-transcript__activity-focus-target': {
105
+ pointerEvents: 'none'
94
106
  }
95
107
  }
96
108
  };
@@ -99,525 +111,388 @@ type ScrollBehavior = 'auto' | 'smooth';
99
111
  type ScrollToOptions = { behavior?: ScrollBehavior };
100
112
  type ScrollToPosition = { activityID?: string; scrollTop?: number };
101
113
 
102
- type InternalTranscriptProps = {
103
- activityElementMapRef: MutableRefObject<ActivityElementMap>;
114
+ type InternalTranscriptProps = Readonly<{
104
115
  className?: string;
105
- };
116
+ terminatorRef: MutableRefObject<HTMLDivElement>;
117
+ }>;
106
118
 
107
119
  // TODO: [P1] #4133 Add telemetry for computing how many re-render done so far.
108
- const InternalTranscript = forwardRef<HTMLDivElement, InternalTranscriptProps>(
109
- ({ activityElementMapRef, className }, ref) => {
110
- const [{ basicTranscript: basicTranscriptStyleSet }] = useStyleSet();
111
- const [{ bubbleFromUserNubOffset, bubbleNubOffset, groupTimestamp, showAvatarInGroup }] = useStyleOptions();
112
- const [activeDescendantId] = useActiveDescendantId();
113
- const [activityWithRendererTree] = useActivityTreeWithRenderer();
114
- const [direction] = useDirection();
115
- const [focusedActivityKey] = useFocusedActivityKey();
116
- const [focusedExplicitly] = useFocusedExplicitly();
117
- const createAvatarRenderer = useCreateAvatarRenderer();
118
- const focus = useFocus();
119
- const focusByActivityKey = useFocusByActivityKey();
120
- const focusRelativeActivity = useFocusRelativeActivity();
121
- const getActivityByKey = useGetActivityByKey();
122
- const getKeyByActivity = useGetKeyByActivity();
123
- const getKeyByActivityId = useGetKeyByActivityId();
124
- const localize = useLocalizer();
125
- const rootClassName = useStyleToEmotionObject()(ROOT_STYLE) + '';
126
- const rootElementRef = useRef<HTMLDivElement>();
127
- const terminatorLabelId = useUniqueId('webchat__basic-transcript__terminator-label');
128
- const terminatorRef = useRef<HTMLDivElement>();
129
-
130
- const focusedActivityKeyRef = useValueRef(focusedActivityKey);
131
- const hideAllTimestamps = groupTimestamp === false;
132
- const terminatorText = localize('TRANSCRIPT_TERMINATOR_TEXT');
133
- const transcriptAriaLabel = localize('TRANSCRIPT_ARIA_LABEL_ALT');
134
-
135
- const callbackRef = useCallback(
136
- (element: HTMLDivElement) => {
137
- if (typeof ref === 'function') {
138
- ref(element);
139
- } else {
140
- ref.current = element;
141
- }
120
+ const InternalTranscript = memo(
121
+ forwardRef<HTMLDivElement, InternalTranscriptProps>(
122
+ (
123
+ { className, terminatorRef }: InternalTranscriptProps,
124
+ ref: MutableRefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void)
125
+ ) => {
126
+ const [activeDescendantId] = useActiveDescendantId();
127
+ const [direction] = useDirection();
128
+ const [focusedKey] = useFocusedKey();
129
+ const [focusedExplicitly] = useFocusedExplicitly();
130
+ const focusElementMapRef = useActivityElementMapRef();
131
+ const focus = useFocus();
132
+ const focusByActivityKey = useFocusByActivityKey();
133
+ const focusRelativeActivity = useFocusRelativeActivity();
134
+ const getActivityByKey = useGetActivityByKey();
135
+ const getKeyByActivityId = useGetKeyByActivityId();
136
+ const localize = useLocalizer();
137
+ const rootClassName = useStyleToEmotionObject()(ROOT_STYLE) + '';
138
+ const rootElementRef = useRef<HTMLDivElement>(null);
139
+
140
+ const focusedKeyRef = useValueRef(focusedKey);
141
+ const transcriptAriaLabel = localize('TRANSCRIPT_ARIA_LABEL_ALT');
142
+
143
+ const callbackRef = useCallback(
144
+ (element: HTMLDivElement) => {
145
+ if (typeof ref === 'function') {
146
+ ref(element);
147
+ } else {
148
+ ref.current = element;
149
+ }
142
150
 
143
- rootElementRef.current = element;
144
- },
145
- [ref, rootElementRef]
146
- );
147
-
148
- const createAvatarRendererMemoized = useMemoized(
149
- (activity: WebChatActivity) => createAvatarRenderer({ activity }),
150
- [createAvatarRenderer]
151
- );
152
-
153
- // Flatten the tree back into an array with information related to rendering.
154
- const renderingElements = useMemo(() => {
155
- const renderingElements: ReactNode[] = [];
156
- const topSideBotNub = isZeroOrPositive(bubbleNubOffset);
157
- const topSideUserNub = isZeroOrPositive(bubbleFromUserNubOffset);
158
-
159
- activityWithRendererTree.forEach(entriesWithSameSender => {
160
- const [[{ activity: firstActivity }]] = entriesWithSameSender;
161
- const renderAvatar = createAvatarRendererMemoized(firstActivity);
162
-
163
- entriesWithSameSender.forEach((entriesWithSameSenderAndStatus, indexWithinSenderGroup) => {
164
- const firstInSenderGroup = !indexWithinSenderGroup;
165
- const lastInSenderGroup = indexWithinSenderGroup === entriesWithSameSender.length - 1;
166
-
167
- entriesWithSameSenderAndStatus.forEach(({ activity, renderActivity }, indexWithinSenderAndStatusGroup) => {
168
- // We only show the timestamp at the end of the sender group. But we always show the "Send failed, retry" prompt.
169
- const firstInSenderAndStatusGroup = !indexWithinSenderAndStatusGroup;
170
- const key: string = getKeyByActivity(activity);
171
- const lastInSenderAndStatusGroup =
172
- indexWithinSenderAndStatusGroup === entriesWithSameSenderAndStatus.length - 1;
173
- const topSideNub = activity.from?.role === 'user' ? topSideUserNub : topSideBotNub;
174
-
175
- let showCallout: boolean;
176
-
177
- // Depending on the "showAvatarInGroup" setting, the avatar will render in different positions.
178
- if (showAvatarInGroup === 'sender') {
179
- if (topSideNub) {
180
- showCallout = firstInSenderGroup && firstInSenderAndStatusGroup;
181
- } else {
182
- showCallout = lastInSenderGroup && lastInSenderAndStatusGroup;
183
- }
184
- } else if (showAvatarInGroup === 'status') {
185
- if (topSideNub) {
186
- showCallout = firstInSenderAndStatusGroup;
187
- } else {
188
- showCallout = lastInSenderAndStatusGroup;
189
- }
190
- } else {
191
- showCallout = true;
192
- }
151
+ rootElementRef.current = element;
152
+ },
153
+ [ref, rootElementRef]
154
+ );
155
+
156
+ const [numRenderingActivities] = useNumRenderingActivities();
157
+
158
+ const scrollToBottomScrollTo: (scrollTop: number, options?: ScrollToOptions) => void = useScrollTo();
159
+ const scrollToBottomScrollToEnd: (options?: ScrollToOptions) => void = useScrollToEnd();
193
160
 
194
- renderingElements.push(
195
- <TranscriptActivity
196
- activity={activity}
197
- activityElementMapRef={activityElementMapRef}
198
- // "hideTimestamp" is a render-time parameter for renderActivityStatus().
199
- // If true, it will hide the timestamp, but it will continue to show the
200
- // retry prompt. And show the screen reader version of the timestamp.
201
- activityKey={key}
202
- hideTimestamp={
203
- hideAllTimestamps || indexWithinSenderAndStatusGroup !== entriesWithSameSenderAndStatus.length - 1
204
- }
205
- key={key}
206
- renderActivity={renderActivity}
207
- renderAvatar={renderAvatar}
208
- showCallout={showCallout}
209
- />
161
+ const scrollTo = useCallback(
162
+ (position: ScrollToPosition, { behavior = 'auto' }: ScrollToOptions = {}) => {
163
+ if (!position) {
164
+ throw new Error(
165
+ 'botframework-webchat: First argument passed to "useScrollTo" must be a ScrollPosition object.'
210
166
  );
211
- });
212
- });
213
- });
214
-
215
- return renderingElements;
216
- }, [
217
- activityElementMapRef,
218
- activityWithRendererTree,
219
- bubbleFromUserNubOffset,
220
- bubbleNubOffset,
221
- createAvatarRendererMemoized,
222
- getKeyByActivity,
223
- hideAllTimestamps,
224
- showAvatarInGroup
225
- ]);
226
-
227
- const scrollToBottomScrollTo: (scrollTop: number, options?: ScrollToOptions) => void = useScrollTo();
228
- const scrollToBottomScrollToEnd: (options?: ScrollToOptions) => void = useScrollToEnd();
229
-
230
- const scrollTo = useCallback(
231
- (position: ScrollToPosition, { behavior = 'auto' }: ScrollToOptions = {}) => {
232
- if (!position) {
233
- throw new Error(
234
- 'botframework-webchat: First argument passed to "useScrollTo" must be a ScrollPosition object.'
235
- );
236
- }
167
+ }
237
168
 
238
- const { activityID: activityId, scrollTop } = position;
169
+ const { activityID: activityId, scrollTop } = position;
239
170
 
240
- if (typeof scrollTop !== 'undefined') {
241
- scrollToBottomScrollTo(scrollTop, { behavior });
242
- } else if (typeof activityId !== 'undefined') {
243
- const activityBoundingBoxElement = activityElementMapRef.current
244
- .get(getKeyByActivityId(activityId))
245
- ?.querySelector('.webchat__basic-transcript__activity-active-descendant');
171
+ if (typeof scrollTop !== 'undefined') {
172
+ scrollToBottomScrollTo(scrollTop, { behavior });
173
+ } else if (typeof activityId !== 'undefined') {
174
+ const activityBoundingBoxElement = focusElementMapRef.current
175
+ .get(getKeyByActivityId(activityId))
176
+ ?.querySelector('.webchat__basic-transcript__activity-active-descendant');
246
177
 
247
- const scrollableElement = rootElementRef.current.querySelector('.webchat__basic-transcript__scrollable');
178
+ const scrollableElement = rootElementRef.current.querySelector('.webchat__basic-transcript__scrollable');
248
179
 
249
- if (scrollableElement && activityBoundingBoxElement) {
250
- // ESLint conflict with TypeScript. The result of getClientRects() is not an Array but DOMRectList, and cannot be destructured.
251
- // eslint-disable-next-line prefer-destructuring
252
- const activityBoundingBoxElementClientRect = activityBoundingBoxElement.getClientRects()[0];
180
+ if (scrollableElement && activityBoundingBoxElement) {
181
+ // ESLint conflict with TypeScript. The result of getClientRects() is not an Array but DOMRectList, and cannot be destructured.
182
+ // eslint-disable-next-line prefer-destructuring
183
+ const activityBoundingBoxElementClientRect = activityBoundingBoxElement.getClientRects()[0];
253
184
 
254
- // ESLint conflict with TypeScript. The result of getClientRects() is not an Array but DOMRectList, and cannot be destructured.
255
- // eslint-disable-next-line prefer-destructuring
256
- const scrollableElementClientRect = scrollableElement.getClientRects()[0];
185
+ // ESLint conflict with TypeScript. The result of getClientRects() is not an Array but DOMRectList, and cannot be destructured.
186
+ // eslint-disable-next-line prefer-destructuring
187
+ const scrollableElementClientRect = scrollableElement.getClientRects()[0];
257
188
 
258
- // If either the activity or the transcript scrollable is not on DOM, we will not scroll the view.
259
- if (activityBoundingBoxElementClientRect && scrollableElementClientRect) {
260
- const { height: activityHeight, y: activityY } = activityBoundingBoxElementClientRect;
261
- const { height: scrollableHeight } = scrollableElementClientRect;
262
- const activityOffsetTop = activityY + scrollableElement.scrollTop;
189
+ // If either the activity or the transcript scrollable is not on DOM, we will not scroll the view.
190
+ if (activityBoundingBoxElementClientRect && scrollableElementClientRect) {
191
+ const { height: activityHeight, y: activityY } = activityBoundingBoxElementClientRect;
192
+ const { height: scrollableHeight } = scrollableElementClientRect;
193
+ const activityOffsetTop = activityY + scrollableElement.scrollTop;
263
194
 
264
- const scrollTop = Math.min(activityOffsetTop, activityOffsetTop - scrollableHeight + activityHeight);
195
+ const scrollTop = Math.min(activityOffsetTop, activityOffsetTop - scrollableHeight + activityHeight);
265
196
 
266
- scrollToBottomScrollTo(scrollTop, { behavior });
197
+ scrollToBottomScrollTo(scrollTop, { behavior });
198
+ }
267
199
  }
268
200
  }
269
- }
270
- },
271
- [activityElementMapRef, getKeyByActivityId, rootElementRef, scrollToBottomScrollTo]
272
- );
201
+ },
202
+ [focusElementMapRef, getKeyByActivityId, rootElementRef, scrollToBottomScrollTo]
203
+ );
273
204
 
274
- const scrollToEnd = useCallback(
275
- () => scrollToBottomScrollToEnd({ behavior: 'smooth' }),
276
- [scrollToBottomScrollToEnd]
277
- );
205
+ const scrollToEnd = useCallback(
206
+ () => scrollToBottomScrollToEnd({ behavior: 'smooth' }),
207
+ [scrollToBottomScrollToEnd]
208
+ );
278
209
 
279
- const scrollRelative = useCallback(
280
- ({ direction, displacement }: TranscriptScrollRelativeOptions) => {
281
- const { current: rootElement } = rootElementRef;
210
+ const scrollRelative = useCallback(
211
+ ({ direction, displacement }: TranscriptScrollRelativeOptions) => {
212
+ const { current: rootElement } = rootElementRef;
282
213
 
283
- if (!rootElement) {
284
- return;
285
- }
214
+ if (!rootElement) {
215
+ return;
216
+ }
286
217
 
287
- const scrollable: HTMLElement = rootElement.querySelector('.webchat__basic-transcript__scrollable');
288
- let nextScrollTop: number;
218
+ const scrollable: HTMLElement = rootElement.querySelector('.webchat__basic-transcript__scrollable');
219
+ let nextScrollTop: number;
289
220
 
290
- if (typeof displacement === 'number') {
291
- // eslint-disable-next-line no-magic-numbers
292
- nextScrollTop = scrollable.scrollTop + (direction === 'down' ? 1 : -1) * displacement;
293
- } else {
294
- // eslint-disable-next-line no-magic-numbers
295
- nextScrollTop = scrollable.scrollTop + (direction === 'down' ? 1 : -1) * scrollable.offsetHeight;
296
- }
221
+ if (typeof displacement === 'number') {
222
+ // eslint-disable-next-line no-magic-numbers
223
+ nextScrollTop = scrollable.scrollTop + (direction === 'down' ? 1 : -1) * displacement;
224
+ } else {
225
+ // eslint-disable-next-line no-magic-numbers
226
+ nextScrollTop = scrollable.scrollTop + (direction === 'down' ? 1 : -1) * scrollable.offsetHeight;
227
+ }
297
228
 
298
- scrollTo(
299
- {
300
- scrollTop: Math.max(0, Math.min(scrollable.scrollHeight - scrollable.offsetHeight, nextScrollTop))
301
- },
302
- { behavior: 'smooth' }
303
- );
304
- },
305
- [rootElementRef, scrollTo]
306
- );
307
-
308
- // Since there could be multiple instances of <BasicTranscript> inside the <Composer>, when the developer calls `scrollXXX`, we need to call it on all instances.
309
- // We call `useRegisterScrollXXX` to register a callback function, the `useScrollXXX` will multiplex the call into each instance of <BasicTranscript>.
310
- useRegisterScrollTo(scrollTo);
311
- useRegisterScrollToEnd(scrollToEnd);
312
- useRegisterScrollRelativeTranscript(scrollRelative);
313
-
314
- const markActivityKeyAsRead = useMarkActivityKeyAsRead();
315
-
316
- const dispatchScrollPositionWithActivityId: (scrollPosition: ScrollToPosition) => void =
317
- useDispatchScrollPosition();
318
-
319
- // TODO: [P2] We should use IntersectionObserver to track what activity is in the scrollable.
320
- // However, IntersectionObserver is not available on IE11, we need to make a limited polyfill in React style.
321
- const handleScrollPosition = useCallback(
322
- ({ scrollTop }: { scrollTop: number }) => {
323
- const { current: rootElement } = rootElementRef;
324
-
325
- if (!rootElement) {
326
- return;
327
- }
229
+ scrollTo(
230
+ {
231
+ scrollTop: Math.max(0, Math.min(scrollable.scrollHeight - scrollable.offsetHeight, nextScrollTop))
232
+ },
233
+ { behavior: 'smooth' }
234
+ );
235
+ },
236
+ [rootElementRef, scrollTo]
237
+ );
328
238
 
329
- const scrollableElement = rootElement.querySelector('.webchat__basic-transcript__scrollable');
239
+ // Since there could be multiple instances of <BasicTranscript> inside the <Composer>, when the developer calls `scrollXXX`, we need to call it on all instances.
240
+ // We call `useRegisterScrollXXX` to register a callback function, the `useScrollXXX` will multiplex the call into each instance of <BasicTranscript>.
241
+ useRegisterScrollTo(scrollTo);
242
+ useRegisterScrollToEnd(scrollToEnd);
243
+ useRegisterScrollRelativeTranscript(scrollRelative);
330
244
 
331
- // "getClientRects()" is not returning an array, thus, it is not destructurable.
332
- // eslint-disable-next-line prefer-destructuring
333
- const scrollableElementClientRect = scrollableElement.getClientRects()[0];
245
+ const markActivityKeyAsRead = useMarkActivityKeyAsRead();
334
246
 
335
- // If the scrollable is not mounted, we cannot measure which activity is in view. Thus, we will not fire any events.
336
- if (!scrollableElementClientRect) {
337
- return;
338
- }
247
+ const dispatchScrollPositionWithActivityId: (scrollPosition: ScrollToPosition) => void =
248
+ useDispatchScrollPosition();
339
249
 
340
- const { bottom: scrollableClientBottom } = scrollableElementClientRect;
341
-
342
- // Find the activity just above scroll view bottom.
343
- // If the scroll view is already on top, get the first activity.
344
- const activityElements = Array.from(activityElementMapRef.current.entries());
345
- const activityKeyJustAboveScrollBottom: string | undefined = (
346
- scrollableElement.scrollTop
347
- ? activityElements
348
- .reverse()
349
- // Add subpixel tolerance
350
- .find(([, element]) => {
351
- // "getClientRects()" is not returning an array, thus, it is not destructurable.
352
- // eslint-disable-next-line prefer-destructuring
353
- const elementClientRect = element.getClientRects()[0];
354
-
355
- // If the activity is not attached to DOM tree, we should not count it as "bottommost visible activity", as it is not visible.
356
- return elementClientRect && elementClientRect.bottom < scrollableClientBottom + 1;
357
- })
358
- : activityElements[0]
359
- )?.[0];
360
-
361
- // When the end-user slowly scrolling the view down, we will mark activity as read when the message fully appear on the screen.
362
- activityKeyJustAboveScrollBottom && markActivityKeyAsRead(activityKeyJustAboveScrollBottom);
363
-
364
- if (dispatchScrollPositionWithActivityId) {
365
- const activity = getActivityByKey(activityKeyJustAboveScrollBottom);
366
-
367
- dispatchScrollPositionWithActivityId({ ...(activity ? { activityID: activity.id } : {}), scrollTop });
368
- }
369
- },
370
- [
371
- activityElementMapRef,
372
- dispatchScrollPositionWithActivityId,
373
- getActivityByKey,
374
- markActivityKeyAsRead,
375
- rootElementRef
376
- ]
377
- );
378
-
379
- useObserveScrollPosition(handleScrollPosition);
380
-
381
- const handleTranscriptKeyDown = useCallback<KeyboardEventHandler<HTMLDivElement>>(
382
- event => {
383
- const { target } = event;
384
-
385
- const fromEndOfTranscriptIndicator = target === terminatorRef.current;
386
- const fromTranscript = target === event.currentTarget;
387
-
388
- if (!fromEndOfTranscriptIndicator && !fromTranscript) {
389
- return;
390
- }
250
+ // TODO: [P2] We should use IntersectionObserver to track what activity is in the scrollable.
251
+ // However, IntersectionObserver is not available on IE11, we need to make a limited polyfill in React style.
252
+ const handleScrollPosition = useCallback(
253
+ ({ scrollTop }: { scrollTop: number }) => {
254
+ const { current: rootElement } = rootElementRef;
391
255
 
392
- let handled = true;
256
+ if (!rootElement) {
257
+ return;
258
+ }
393
259
 
394
- switch (event.key) {
395
- case 'ArrowDown':
396
- focusRelativeActivity(fromEndOfTranscriptIndicator ? 0 : 1);
397
- break;
260
+ const scrollableElement = rootElement.querySelector('.webchat__basic-transcript__scrollable');
398
261
 
399
- case 'ArrowUp':
400
- // eslint-disable-next-line no-magic-numbers
401
- focusRelativeActivity(fromEndOfTranscriptIndicator ? 0 : -1);
402
- break;
403
-
404
- case 'End':
405
- focusRelativeActivity(Infinity);
406
- break;
407
-
408
- case 'Enter':
409
- // This is capturing plain ENTER.
410
- // When screen reader is not running, or screen reader is running outside of scan mode, the ENTER key will be captured here.
411
- if (!fromEndOfTranscriptIndicator) {
412
- const body: HTMLElement = activityElementMapRef.current
413
- .get(focusedActivityKeyRef.current)
414
- ?.querySelector('.webchat__basic-transcript__activity-body');
415
-
416
- tabbableElements(body)[0]?.focus();
417
- }
262
+ // "getClientRects()" is not returning an array, thus, it is not destructurable.
263
+ // eslint-disable-next-line prefer-destructuring
264
+ const scrollableElementClientRect = scrollableElement.getClientRects()[0];
418
265
 
419
- break;
266
+ // If the scrollable is not mounted, we cannot measure which activity is in view. Thus, we will not fire any events.
267
+ if (!scrollableElementClientRect) {
268
+ return;
269
+ }
420
270
 
421
- case 'Escape':
422
- focus('sendBoxWithoutKeyboard');
423
- break;
271
+ const { bottom: scrollableClientBottom } = scrollableElementClientRect;
272
+
273
+ // Find the activity just above scroll view bottom.
274
+ // If the scroll view is already on top, get the first activity.
275
+ const activityElements = Array.from(focusElementMapRef.current.entries());
276
+ const activityKeyJustAboveScrollBottom: string | undefined = (
277
+ scrollableElement.scrollTop
278
+ ? activityElements
279
+ .reverse()
280
+ // Add subpixel tolerance
281
+ .find(([, element]) => {
282
+ // "getClientRects()" is not returning an array, thus, it is not destructurable.
283
+ // eslint-disable-next-line prefer-destructuring
284
+ const elementClientRect = element.getClientRects()[0];
285
+
286
+ // If the activity is not attached to DOM tree, we should not count it as "bottommost visible activity", as it is not visible.
287
+ return elementClientRect && elementClientRect.bottom < scrollableClientBottom + 1;
288
+ })
289
+ : activityElements[0]
290
+ )?.[0];
291
+
292
+ // When the end-user slowly scrolling the view down, we will mark activity as read when the message fully appear on the screen.
293
+ activityKeyJustAboveScrollBottom && markActivityKeyAsRead(activityKeyJustAboveScrollBottom);
294
+
295
+ if (dispatchScrollPositionWithActivityId) {
296
+ const activity = getActivityByKey(activityKeyJustAboveScrollBottom);
297
+
298
+ dispatchScrollPositionWithActivityId({ ...(activity ? { activityID: activity.id } : {}), scrollTop });
299
+ }
300
+ },
301
+ [
302
+ focusElementMapRef,
303
+ dispatchScrollPositionWithActivityId,
304
+ getActivityByKey,
305
+ markActivityKeyAsRead,
306
+ rootElementRef
307
+ ]
308
+ );
309
+
310
+ useObserveScrollPosition(handleScrollPosition);
311
+
312
+ const handleTranscriptKeyDown = useCallback<KeyboardEventHandler<HTMLDivElement>>(
313
+ event => {
314
+ const { target } = event;
315
+
316
+ const fromEndOfTranscriptIndicator = target === terminatorRef.current;
317
+ const fromTranscript = target === event.currentTarget;
318
+
319
+ if (!fromEndOfTranscriptIndicator && !fromTranscript) {
320
+ return;
321
+ }
424
322
 
425
- case 'Home':
426
- focusRelativeActivity(-Infinity);
427
- break;
323
+ let handled = true;
428
324
 
429
- default:
430
- handled = false;
431
- break;
432
- }
325
+ switch (event.key) {
326
+ case 'ArrowDown':
327
+ focusRelativeActivity(fromEndOfTranscriptIndicator ? 0 : 1);
328
+ break;
433
329
 
434
- if (handled) {
435
- event.preventDefault();
330
+ case 'ArrowUp':
331
+ // eslint-disable-next-line no-magic-numbers
332
+ focusRelativeActivity(fromEndOfTranscriptIndicator ? 0 : -1);
333
+ break;
436
334
 
437
- // If a custom HTML control wants to handle up/down arrow, we will prevent them from listening to this event to prevent bugs due to handling arrow keys twice.
438
- event.stopPropagation();
439
- }
440
- },
441
- [activityElementMapRef, focus, focusedActivityKeyRef, focusRelativeActivity, terminatorRef]
442
- );
443
-
444
- const handleTranscriptKeyDownCapture = useCallback<KeyboardEventHandler<HTMLDivElement>>(
445
- event => {
446
- const { altKey, ctrlKey, key, metaKey, target } = event;
447
-
448
- if (altKey || (ctrlKey && key !== 'v') || metaKey || (!inputtableKey(key) && key !== 'Backspace')) {
449
- // Ignore if one of the utility key (except SHIFT) is pressed
450
- // E.g. CTRL-C on a link in one of the message should not jump to chat box
451
- // E.g. "A" or "Backspace" should jump to chat box
452
- return;
453
- }
335
+ case 'End':
336
+ focusRelativeActivity(Infinity);
337
+ break;
454
338
 
455
- // Send keystrokes to send box if we are focusing on the transcript or terminator.
456
- if (target === event.currentTarget || target === terminatorRef.current) {
457
- event.stopPropagation();
339
+ case 'Enter':
340
+ // This is capturing plain ENTER.
341
+ // When screen reader is not running, or screen reader is running outside of scan mode, the ENTER key will be captured here.
342
+ if (!fromEndOfTranscriptIndicator) {
343
+ const focusElement = focusElementMapRef.current?.get(focusedKeyRef.current);
344
+ const activityFocusTrapTarget: HTMLElement =
345
+ focusElement?.querySelector('.webchat__basic-transcript__group-focus-target') ??
346
+ focusElement?.querySelector('.webchat__basic-transcript__activity-focus-target');
347
+ // TODO: review focus approach:
348
+ // It is not clear how to handle focus without introducing something like context.
349
+ // Ideally we would want a way to interact with focus outside of React
350
+ // so it doesn't cause transcript re-renders while still having an ability
351
+ // to scope activity-related handlers and data in a single place.
352
+ activityFocusTrapTarget?.focus();
353
+ }
458
354
 
459
- focus('sendBox');
460
- }
461
- },
462
- [focus]
463
- );
464
-
465
- useRegisterFocusTranscript(useCallback(() => focusByActivityKey(undefined), [focusByActivityKey]));
466
-
467
- // When the focusing activity has changed, dispatch an event to observers of "useObserveTranscriptFocus".
468
- const dispatchTranscriptFocusByActivityKey = useDispatchTranscriptFocusByActivityKey();
469
-
470
- // Dispatch a "transcript focus" event based on user selection.
471
- // We should not dispatch "transcript focus" when a new activity come. Although the selection change, it is not initiated from the user.
472
- useMemo(
473
- () => dispatchTranscriptFocusByActivityKey(focusedExplicitly ? focusedActivityKey : undefined),
474
- [dispatchTranscriptFocusByActivityKey, focusedActivityKey, focusedExplicitly]
475
- );
476
-
477
- // When the transcript is being focused on, we should dispatch a "transcriptfocus" event.
478
- const handleFocus = useCallback(
479
- // We call "focusByActivityKey" with activity key of "true".
480
- // It means, tries to focus on anything.
481
- ({ currentTarget, target }) => target === currentTarget && focusByActivityKey(true, false),
482
- [focusByActivityKey]
483
- );
484
-
485
- // This is required by IE11.
486
- // When the user clicks on and empty space (a.k.a. filler) in an empty transcript, IE11 says the focus is on the <div className="filler">,
487
- // despite the fact there are no "tabIndex" attributes set on the filler.
488
- // We need to artificially send the focus back to the transcript.
489
- const handleFocusFiller = useCallback(() => focusByActivityKey(undefined), [focusByActivityKey]);
490
-
491
- // When focus into the transcript using TAB/SHIFT-TAB, scroll the focused activity into view.
492
- useObserveFocusVisible(
493
- rootElementRef,
494
- useCallback(() => focusByActivityKey(undefined), [focusByActivityKey])
495
- );
496
-
497
- return (
498
- <div
499
- // Although Android TalkBack 12.1 does not support `aria-activedescendant`, when used, it become buggy and will narrate content twice.
500
- // We are disabling `aria-activedescendant` for Android. See <ActivityRow> for details.
501
- aria-activedescendant={android ? undefined : activeDescendantId}
502
- aria-label={transcriptAriaLabel}
503
- className={classNames(
504
- 'webchat__basic-transcript',
505
- basicTranscriptStyleSet + '',
506
- rootClassName,
507
- (className || '') + ''
508
- )}
509
- dir={direction}
510
- onFocus={handleFocus}
511
- onKeyDown={handleTranscriptKeyDown}
512
- onKeyDownCapture={handleTranscriptKeyDownCapture}
513
- ref={callbackRef}
514
- // "aria-activedescendant" will only works with a number of roles and it must be explicitly set.
515
- // https://www.w3.org/TR/wai-aria/#aria-activedescendant
516
- role="group"
517
- // For up/down arrow key navigation across activities, this component must be included in the tab sequence.
518
- // Otherwise, "aria-activedescendant" will not be narrated when the user press up/down arrow keys.
519
- // https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant
520
- tabIndex={0}
521
- >
522
- <LiveRegionTranscript activityElementMapRef={activityElementMapRef} />
523
- {/* TODO: [P2] Fix ESLint error `no-use-before-define` */}
524
- {/* eslint-disable-next-line @typescript-eslint/no-use-before-define */}
525
- <InternalTranscriptScrollable onFocusFiller={handleFocusFiller} terminatorRef={terminatorRef}>
526
- {renderingElements}
527
- </InternalTranscriptScrollable>
528
- {!!renderingElements.length && (
529
- <Fragment>
530
- <FocusRedirector redirectRef={rootElementRef} />
531
- <div
532
- aria-labelledby={terminatorLabelId}
533
- className="webchat__basic-transcript__terminator"
534
- ref={terminatorRef}
535
- role="note"
536
- tabIndex={0}
537
- >
538
- <div className="webchat__basic-transcript__terminator-body">
539
- {/* `id` is required for `aria-labelledby` */}
540
- {/* eslint-disable-next-line react/forbid-dom-props */}
541
- <div className="webchat__basic-transcript__terminator-text" id={terminatorLabelId}>
542
- {terminatorText}
543
- </div>
544
- </div>
545
- </div>
546
- </Fragment>
547
- )}
548
- <div className="webchat__basic-transcript__focus-indicator" />
549
- </div>
550
- );
551
- }
552
- );
355
+ break;
553
356
 
554
- InternalTranscript.defaultProps = {
555
- className: ''
556
- };
357
+ case 'Escape':
358
+ focus('sendBoxWithoutKeyboard');
359
+ break;
557
360
 
558
- InternalTranscript.displayName = 'InternalTranscript';
361
+ case 'Home':
362
+ focusRelativeActivity(-Infinity);
363
+ break;
559
364
 
560
- InternalTranscript.propTypes = {
561
- // PropTypes cannot validate precisely with its TypeScript counterpart.
562
- // @ts-ignore
563
- activityElementMapRef: PropTypes.shape({
564
- current: PropTypes.instanceOf(Map)
565
- }).isRequired,
566
- className: PropTypes.string
567
- };
365
+ default:
366
+ handled = false;
367
+ break;
368
+ }
369
+
370
+ if (handled) {
371
+ event.preventDefault();
372
+
373
+ // If a custom HTML control wants to handle up/down arrow, we will prevent them from listening to this event to prevent bugs due to handling arrow keys twice.
374
+ event.stopPropagation();
375
+ }
376
+ },
377
+ [focusElementMapRef, focus, focusedKeyRef, focusRelativeActivity, terminatorRef]
378
+ );
379
+
380
+ const handleTranscriptKeyDownCapture = useCallback<KeyboardEventHandler<HTMLDivElement>>(
381
+ event => {
382
+ const { altKey, ctrlKey, key, metaKey, target } = event;
383
+
384
+ if (
385
+ altKey ||
386
+ (ctrlKey && key !== 'v' && key !== 'V') ||
387
+ metaKey ||
388
+ (!inputtableKey(key) && key !== 'Backspace')
389
+ ) {
390
+ // Ignore if one of the utility key (except SHIFT) is pressed
391
+ // E.g. CTRL-C on a link in one of the message should not jump to chat box
392
+ // E.g. "A" or "Backspace" should jump to chat box
393
+ return;
394
+ }
395
+
396
+ // Send keystrokes to send box if we are focusing on the transcript or terminator.
397
+ if (target === event.currentTarget || target === terminatorRef.current) {
398
+ event.stopPropagation();
568
399
 
569
- type InternalTranscriptScrollableProps = {
400
+ focus('sendBox');
401
+ }
402
+ },
403
+ [focus, terminatorRef]
404
+ );
405
+
406
+ useRegisterFocusTranscript(useCallback(() => focusByActivityKey(undefined), [focusByActivityKey]));
407
+
408
+ // When the focusing activity has changed, dispatch an event to observers of "useObserveTranscriptFocus".
409
+ const dispatchTranscriptFocusByActivityKey = useDispatchTranscriptFocusByActivityKey();
410
+
411
+ // Dispatch a "transcript focus" event based on user selection.
412
+ // We should not dispatch "transcript focus" when a new activity come. Although the selection change, it is not initiated from the user.
413
+ useMemo(
414
+ () => dispatchTranscriptFocusByActivityKey(focusedExplicitly ? focusedKey : undefined),
415
+ [dispatchTranscriptFocusByActivityKey, focusedKey, focusedExplicitly]
416
+ );
417
+
418
+ // When the transcript is being focused on, we should dispatch a "transcriptfocus" event.
419
+ const handleFocus = useCallback(
420
+ // We call "focusByActivityKey" with activity key of "true".
421
+ // It means, tries to focus on anything.
422
+ ({ currentTarget, target }) => target === currentTarget && focusByActivityKey(true, false),
423
+ [focusByActivityKey]
424
+ );
425
+
426
+ // This is required by IE11.
427
+ // When the user clicks on and empty space (a.k.a. filler) in an empty transcript, IE11 says the focus is on the <div className="filler">,
428
+ // despite the fact there are no "tabIndex" attributes set on the filler.
429
+ // We need to artificially send the focus back to the transcript.
430
+ const handleFocusFiller = useCallback(() => focusByActivityKey(undefined), [focusByActivityKey]);
431
+
432
+ // When focus into the transcript using TAB/SHIFT-TAB, scroll the focused activity into view.
433
+ useObserveFocusVisible(
434
+ rootElementRef,
435
+ useCallback(() => focusByActivityKey(undefined), [focusByActivityKey])
436
+ );
437
+
438
+ const hasAnyChild = !!numRenderingActivities;
439
+
440
+ return (
441
+ <TranscriptFocusArea
442
+ // Although Android TalkBack 12.1 does not support `aria-activedescendant`, when used, it become buggy and will narrate content twice.
443
+ // We are disabling `aria-activedescendant` for Android. See <ActivityRow> for details.
444
+ aria-activedescendant={android ? undefined : activeDescendantId}
445
+ aria-label={transcriptAriaLabel}
446
+ className={classNames('webchat__basic-transcript', rootClassName, (className || '') + '')}
447
+ dir={direction}
448
+ onFocus={handleFocus}
449
+ onKeyDown={handleTranscriptKeyDown}
450
+ onKeyDownCapture={handleTranscriptKeyDownCapture}
451
+ ref={callbackRef}
452
+ // "aria-activedescendant" will only works with a number of roles and it must be explicitly set.
453
+ // https://www.w3.org/TR/wai-aria/#aria-activedescendant
454
+ role="group"
455
+ // For up/down arrow key navigation across activities, this component must be included in the tab sequence.
456
+ // Otherwise, "aria-activedescendant" will not be narrated when the user press up/down arrow keys.
457
+ // https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant
458
+ tabIndex={0}
459
+ >
460
+ <LiveRegionTranscript activityElementMapRef={focusElementMapRef} />
461
+ {hasAnyChild && <FocusRedirector redirectRef={terminatorRef} />}
462
+ <InternalTranscriptScrollable onFocusFiller={handleFocusFiller}>
463
+ {hasAnyChild && <ActivityTree />}
464
+ </InternalTranscriptScrollable>
465
+ {hasAnyChild && (
466
+ <Fragment>
467
+ <FocusRedirector redirectRef={rootElementRef} />
468
+ <TranscriptFocusTerminator ref={terminatorRef} role="note" tabIndex={0} />
469
+ </Fragment>
470
+ )}
471
+ </TranscriptFocusArea>
472
+ );
473
+ }
474
+ )
475
+ );
476
+
477
+ InternalTranscript.displayName = 'InternalTranscript';
478
+
479
+ type InternalTranscriptScrollableProps = Readonly<{
570
480
  children?: ReactNode;
571
481
  onFocusFiller: () => void;
572
- terminatorRef: MutableRefObject<HTMLDivElement>;
573
- };
482
+ }>;
574
483
 
575
484
  // Separating high-frequency hooks to improve performance.
576
- const InternalTranscriptScrollable: FC<InternalTranscriptScrollableProps> = ({
577
- children,
578
- onFocusFiller,
579
- terminatorRef
580
- }) => {
485
+ const InternalTranscriptScrollable = ({ children, onFocusFiller }: InternalTranscriptScrollableProps) => {
581
486
  const [{ activities: activitiesStyleSet }] = useStyleSet();
582
- const [animatingToEnd]: [boolean] = useAnimatingToEnd();
583
- const [atEnd]: [boolean] = useAtEnd();
584
- const [, unreadActivityKeys] = useActivityKeysByRead();
585
487
  const [sticky]: [boolean] = useSticky();
586
- const [styleOptions] = useStyleOptions();
587
- const focusByActivityKey = useFocusByActivityKey();
588
488
  const localize = useLocalizer();
589
- const markActivityKeyAsRead = useMarkActivityKeyAsRead();
590
489
  const markAllAsAcknowledged = useMarkAllAsAcknowledged();
591
- const scrollToEnd: (options?: ScrollToOptions) => void = useScrollToEnd();
592
490
 
593
491
  const prevSticky = usePrevious(sticky);
594
492
  const transcriptRoleDescription = localize('TRANSCRIPT_ARIA_ROLE_ALT');
595
493
 
596
494
  const stickyChangedToTrue = prevSticky !== sticky && sticky;
597
495
 
598
- // Acknowledged means either:
599
- // 1. The user sent a message
600
- // - We don't need a condition here. When Web Chat sends the user's message, it will scroll to bottom, and it will trigger condition 2 below.
601
- // 2. The user scroll to the bottom of the transcript, from a non-bottom scroll position
602
- // - If the transcript is already at the bottom, the user needs to scroll up and then go back down
603
- // - What happens if we are relaxing "scrolled from a non-bottom scroll position":
604
- // 1. The condition will become solely "at the bottom of the transcript"
605
- // 2. Auto-scroll will always scroll the transcript to the bottom
606
- // 3. Web Chat will always acknowledge all activities as it is at the bottom
607
- // 4. Acknowledge flag become useless
608
- // 5. Therefore, even the developer set "pause after 3 activities", if activities are coming in at a slow pace (not batched in a single render)
609
- // Web Chat will keep scrolling and not snapped/paused
610
-
611
- // Note: When Web Chat is loaded, there are no activities acknowledged. We need to assume all arriving activities are acknowledged until end-user sends their first activity.
612
- // Activities loaded initially could be from conversation history. Without assuming acknowledgement, Web Chat will not scroll initially (as everything is not acknowledged).
613
- // It would be better if the chat adapter should let Web Chat know if the activity is loaded from history or not.
614
-
615
- // TODO: [P2] #3670 Move the "conversation history acknowledgement" logic mentioned above to polyfill of chat adapters.
616
- // 1. Chat adapter should send "acknowledged" as part of "channelData"
617
- // 2. If "acknowledged" is "undefined", we set it to:
618
- // a. true, if there are no egress activities yet
619
- // b. Otherwise, false
620
-
621
496
  useMemo(
622
497
  () =>
623
498
  stickyChangedToTrue &&
@@ -628,81 +503,22 @@ const InternalTranscriptScrollable: FC<InternalTranscriptScrollableProps> = ({
628
503
  [markAllAsAcknowledged, stickyChangedToTrue]
629
504
  );
630
505
 
631
- const [flattenedActivityTreeWithRenderer] = useActivityTreeWithRenderer({ flat: true });
632
- const getKeyByActivity = useGetKeyByActivity();
633
-
634
- const renderingActivityKeys: string[] = useMemo<string[]>(
635
- () => flattenedActivityTreeWithRenderer.map(({ activity }) => getKeyByActivity(activity)),
636
- [flattenedActivityTreeWithRenderer, getKeyByActivity]
637
- );
638
-
639
- const renderingActivityKeysRef = useValueRef(renderingActivityKeys);
640
-
641
- // To prevent flashy button, we are not waiting for another render loop to update the `[readActivityKeys, unreadActivityKeys]` state.
642
- // Instead, we are building the next one in this `useMemo` call.
643
- const nextUnreadActivityKeys = useMemo(() => {
644
- // This code need to be careful reviewed as it will cause another render. The code should be converging.
645
- // After we call `markActivityKeyAsRead`, everything will be read and nothing will be unread.
646
- // That means, in next render, `unreadActivityKeys` will be emptied and the `markActivityKeyAsRead` will not get called again.
647
- if (sticky && unreadActivityKeys.length) {
648
- markActivityKeyAsRead(unreadActivityKeys[unreadActivityKeys.length - 1]);
649
-
650
- return [];
651
- }
652
-
653
- return unreadActivityKeys;
654
- }, [markActivityKeyAsRead, sticky, unreadActivityKeys]);
655
-
656
- const nextUnreadActivityKeysRef = useValueRef(nextUnreadActivityKeys);
657
-
658
- // If we are rendering anything that is unread, we should show the "New messages" button.
659
- // Not everything in the `unreadActivityKeys` are rendered, say, bot typing indicator.
660
- // We should not show the "New messages" button for bot typing indicator as it will confuse the user.
661
- const unread = useMemo(
662
- () => nextUnreadActivityKeys.some(key => renderingActivityKeys.includes(key)),
663
- [renderingActivityKeys, nextUnreadActivityKeys]
664
- );
665
-
666
- const handleScrollToEndButtonClick = useCallback(() => {
667
- scrollToEnd({ behavior: 'smooth' });
668
-
669
- const { current: renderingActivityKeys } = renderingActivityKeysRef;
670
-
671
- // After the "New message" button is clicked, focus on the first unread activity which will be rendered.
672
- const firstUnreadRenderingActivityKey = nextUnreadActivityKeysRef.current.find(key =>
673
- renderingActivityKeys.includes(key)
674
- );
675
-
676
- if (firstUnreadRenderingActivityKey) {
677
- focusByActivityKey(firstUnreadRenderingActivityKey);
678
- } else {
679
- // If no unread activity, send the focus to the terminator block.
680
- terminatorRef.current?.focus();
681
- }
682
- }, [focusByActivityKey, nextUnreadActivityKeysRef, renderingActivityKeysRef, scrollToEnd, terminatorRef]);
683
-
684
- const renderScrollToEndButton = useCreateScrollToEndButtonRenderer()({
685
- atEnd: animatingToEnd || atEnd || sticky,
686
- styleOptions,
687
- unread
688
- });
689
-
690
- const hasAnyChild = !!React.Children.count(children);
506
+ // We need to check if `children` is `false` or not.
507
+ // If `children` is `false`, React.Children.count(children) will still return 1 (truthy).
508
+ const hasAnyChild = !!children && !!React.Children.count(children);
691
509
 
692
510
  return (
693
511
  <React.Fragment>
694
- {renderScrollToEndButton && renderScrollToEndButton({ onClick: handleScrollToEndButtonClick })}
695
- {hasAnyChild && <FocusRedirector redirectRef={terminatorRef} />}
696
512
  <ReactScrollToBottomPanel className="webchat__basic-transcript__scrollable">
697
513
  <div aria-hidden={true} className="webchat__basic-transcript__filler" onFocus={onFocusFiller} />
698
514
  {hasAnyChild && (
699
- <section
515
+ <TranscriptActivityList
700
516
  aria-roledescription={transcriptRoleDescription}
701
517
  className={classNames(activitiesStyleSet + '', 'webchat__basic-transcript__transcript')}
702
518
  role="feed"
703
519
  >
704
520
  {children}
705
- </section>
521
+ </TranscriptActivityList>
706
522
  )}
707
523
  <BasicTypingIndicator />
708
524
  </ReactScrollToBottomPanel>
@@ -710,12 +526,6 @@ const InternalTranscriptScrollable: FC<InternalTranscriptScrollableProps> = ({
710
526
  );
711
527
  };
712
528
 
713
- InternalTranscriptScrollable.propTypes = {
714
- children: PropTypes.any.isRequired,
715
- onFocusFiller: PropTypes.func.isRequired,
716
- terminatorRef: PropTypes.any.isRequired
717
- };
718
-
719
529
  type Scroller = ({ offsetHeight, scrollTop }: { offsetHeight: number; scrollTop: number }) => number;
720
530
 
721
531
  // "scroller" is the auto-scroll limiter, a.k.a. auto scroll snap.
@@ -834,32 +644,37 @@ const useScroller = (activityElementMapRef: MutableRefObject<ActivityElementMap>
834
644
  );
835
645
  };
836
646
 
837
- type BasicTranscriptProps = {
838
- className?: string;
839
- };
647
+ type BasicTranscriptProps = Readonly<{
648
+ className: string;
649
+ }>;
840
650
 
841
- const BasicTranscript: FC<BasicTranscriptProps> = ({ className }) => {
842
- const activityElementMapRef = useRef<ActivityElementMap>(new Map());
843
- const containerRef = useRef<HTMLDivElement>();
651
+ const BasicTranscript = ({ className = '' }: BasicTranscriptProps) => {
652
+ const [{ stylesRoot }] = useStyleOptions();
653
+ const [nonce] = useNonce();
654
+ const activityElementMapRef = useActivityElementMapRef();
655
+ const containerRef = useRef<HTMLDivElement>(null);
656
+ const terminatorRef = useRef<HTMLDivElement>(null);
844
657
 
845
658
  const scroller = useScroller(activityElementMapRef);
659
+ const styleOptions = useMemo(() => ({ stylesRoot }), [stylesRoot]);
846
660
 
847
661
  return (
848
- <TranscriptFocusComposer containerRef={containerRef}>
849
- <ReactScrollToBottomComposer scroller={scroller}>
850
- <KeyboardHelp />
851
- <InternalTranscript activityElementMapRef={activityElementMapRef} className={className} ref={containerRef} />
852
- </ReactScrollToBottomComposer>
853
- </TranscriptFocusComposer>
662
+ <ChatHistoryBox className={className}>
663
+ <RenderingActivitiesComposer>
664
+ <TranscriptFocusComposer containerRef={containerRef}>
665
+ <ReactScrollToBottomComposer nonce={nonce} scroller={scroller} styleOptions={styleOptions}>
666
+ <ChatHistoryToolbar>
667
+ <ScrollToEndButton terminatorRef={terminatorRef} />
668
+ </ChatHistoryToolbar>
669
+ <GroupedRenderingActivitiesComposer>
670
+ <InternalTranscript ref={containerRef} terminatorRef={terminatorRef} />
671
+ </GroupedRenderingActivitiesComposer>
672
+ </ReactScrollToBottomComposer>
673
+ </TranscriptFocusComposer>
674
+ </RenderingActivitiesComposer>
675
+ </ChatHistoryBox>
854
676
  );
855
677
  };
856
678
 
857
- BasicTranscript.defaultProps = {
858
- className: ''
859
- };
860
-
861
- BasicTranscript.propTypes = {
862
- className: PropTypes.string
863
- };
864
-
865
- export default memo(BasicTranscript);
679
+ export default wrapWith(ChatHistoryDOMComposer)(memo(BasicTranscript));
680
+ export { type BasicTranscriptProps };