|
1 | | -// TODO: Move the pattern to re-export. |
2 | | -import { |
3 | | - type LegacyActivityComponentFactory, |
4 | | - type LegacyActivityMiddleware, |
5 | | - type LegacyAttachmentMiddleware, |
6 | | - type LegacyRenderAttachment |
| 1 | +export type { |
| 2 | + /** @deprecated Use `polymiddleware` instead, this will be removed on or after 2027-08-16. */ |
| 3 | + LegacyActivityComponentFactory as ActivityComponentFactory, |
| 4 | + /** @deprecated Use `polymiddleware` instead, this will be removed on or after 2027-08-16. */ |
| 5 | + LegacyActivityMiddleware as ActivityMiddleware, |
| 6 | + /** @deprecated Use `polymiddleware` instead, this will be removed on or after 2027-08-16. */ |
| 7 | + LegacyAttachmentMiddleware as AttachmentMiddleware, |
| 8 | + LegacyRenderAttachment as RenderAttachment |
7 | 9 | } from '@msinternal/botframework-webchat-api-middleware/legacy'; |
8 | | -import StyleOptions, { StrictStyleOptions } from './StyleOptions'; |
9 | | -import defaultStyleOptions from './defaultStyleOptions'; |
10 | | -import Composer, { ComposerProps } from './hooks/Composer'; |
11 | | -import concatMiddleware from './hooks/middleware/concatMiddleware'; |
12 | | -import { type ActivityStatusRenderer } from './hooks/useCreateActivityStatusRenderer'; // TODO: [P1] This line should export the one from the version from "middleware rework" workstream. |
13 | | -import { type DebouncedNotification, type DebouncedNotifications } from './hooks/useDebouncedNotifications'; |
14 | | -import { type PostActivityFile } from './hooks/useSendFiles'; |
15 | | -import { localize } from './localization/Localize'; |
16 | | -import normalizeStyleOptions from './normalizeStyleOptions'; |
17 | | -import { type ActivityStatusMiddleware, type RenderActivityStatus } from './types/ActivityStatusMiddleware'; |
18 | | -import AttachmentForScreenReaderMiddleware, { |
19 | | - AttachmentForScreenReaderComponentFactory |
20 | | -} from './types/AttachmentForScreenReaderMiddleware'; |
21 | | -import AvatarMiddleware, { type AvatarComponentFactory } from './types/AvatarMiddleware'; |
22 | | -import CardActionMiddleware, { type PerformCardAction } from './types/CardActionMiddleware'; |
23 | | -import { type ContextOf } from './types/ContextOf'; |
24 | | -import GroupActivitiesMiddleware, { type GroupActivities } from './types/GroupActivitiesMiddleware'; |
25 | | -import { type Notification } from './types/Notification'; |
26 | | -import ScrollToEndButtonMiddleware, { |
27 | | - type ScrollToEndButtonComponentFactory |
28 | | -} from './types/ScrollToEndButtonMiddleware'; |
29 | | -import { type SendStatus } from './types/SendStatus'; |
30 | | -import ToastMiddleware, { type RenderToast } from './types/ToastMiddleware'; |
31 | | -import { type Typing } from './types/Typing'; |
32 | | -import TypingIndicatorMiddleware, { type RenderTypingIndicator } from './types/TypingIndicatorMiddleware'; |
33 | | -import { type WebSpeechPonyfill } from './types/WebSpeechPonyfill'; |
34 | | -import { type WebSpeechPonyfillFactory } from './types/WebSpeechPonyfillFactory'; |
35 | | - |
36 | | -// #region Re-export |
37 | 10 |
|
| 11 | +export * as hooks from './boot/hook'; |
| 12 | +export { default as defaultStyleOptions } from './defaultStyleOptions'; |
| 13 | +export { default as Composer, type ComposerProps } from './hooks/Composer'; |
| 14 | +export { default as concatMiddleware } from './hooks/middleware/concatMiddleware'; |
| 15 | +export { type ActivityStatusRenderer } from './hooks/useCreateActivityStatusRenderer'; // TODO: [P1] This line should export the one from the version from "middleware rework" workstream. |
| 16 | +export { type DebouncedNotification, type DebouncedNotifications } from './hooks/useDebouncedNotifications'; |
| 17 | +export { type PostActivityFile } from './hooks/useSendFiles'; |
| 18 | +export { localize } from './localization/Localize'; |
38 | 19 | export { |
39 | 20 | extractSendBoxMiddleware, |
40 | 21 | SendBoxMiddlewareProxy, |
41 | 22 | type SendBoxMiddleware, |
42 | 23 | type SendBoxMiddlewareProps, |
43 | 24 | type SendBoxMiddlewareRequest |
44 | 25 | } from './middleware/SendBoxMiddleware'; |
45 | | - |
46 | 26 | export { |
47 | 27 | extractSendBoxToolbarMiddleware, |
48 | 28 | SendBoxToolbarMiddlewareProxy, |
49 | 29 | type SendBoxToolbarMiddleware, |
50 | 30 | type SendBoxToolbarMiddlewareProps, |
51 | 31 | type SendBoxToolbarMiddlewareRequest |
52 | 32 | } from './middleware/SendBoxToolbarMiddleware'; |
53 | | -// #endregion |
54 | | - |
55 | | -export * as hooks from './boot/hook'; |
56 | | - |
57 | | -export { Composer, concatMiddleware, defaultStyleOptions, localize, normalizeStyleOptions }; |
58 | | - |
59 | | -export type { |
60 | | - /** @deprecated Use `polymiddleware` instead, this will be removed on or after 2027-08-16. */ |
61 | | - LegacyActivityComponentFactory as ActivityComponentFactory, |
62 | | - /** @deprecated Use `polymiddleware` instead, this will be removed on or after 2027-08-16. */ |
63 | | - LegacyActivityMiddleware as ActivityMiddleware, |
64 | | - ActivityStatusMiddleware, |
65 | | - ActivityStatusRenderer, |
66 | | - AttachmentForScreenReaderComponentFactory, |
67 | | - AttachmentForScreenReaderMiddleware, |
68 | | - /** @deprecated Use `polymiddleware` instead, this will be removed on or after 2027-08-16. */ |
69 | | - LegacyAttachmentMiddleware as AttachmentMiddleware, |
70 | | - AvatarComponentFactory, |
71 | | - AvatarMiddleware, |
72 | | - CardActionMiddleware, |
73 | | - ComposerProps, |
74 | | - ContextOf, |
75 | | - DebouncedNotification, |
76 | | - DebouncedNotifications, |
77 | | - GroupActivities, |
78 | | - GroupActivitiesMiddleware, |
79 | | - Notification, |
80 | | - PerformCardAction, |
81 | | - PostActivityFile, |
82 | | - RenderActivityStatus, |
83 | | - LegacyRenderAttachment as RenderAttachment, |
84 | | - RenderToast, |
85 | | - RenderTypingIndicator, |
86 | | - ScrollToEndButtonComponentFactory, |
87 | | - ScrollToEndButtonMiddleware, |
88 | | - SendStatus, |
89 | | - StrictStyleOptions, |
90 | | - StyleOptions, |
91 | | - ToastMiddleware, |
92 | | - Typing, |
93 | | - TypingIndicatorMiddleware, |
94 | | - WebSpeechPonyfill, |
95 | | - WebSpeechPonyfillFactory |
96 | | -}; |
| 33 | +export { default as normalizeStyleOptions } from './normalizeStyleOptions'; |
| 34 | +export { type StrictStyleOptions, type default as StyleOptions } from './StyleOptions'; |
| 35 | +export { type ActivityStatusMiddleware, type RenderActivityStatus } from './types/ActivityStatusMiddleware'; |
| 36 | +export { |
| 37 | + type AttachmentForScreenReaderComponentFactory, |
| 38 | + type default as AttachmentForScreenReaderMiddleware |
| 39 | +} from './types/AttachmentForScreenReaderMiddleware'; |
| 40 | +export { type AvatarComponentFactory, type default as AvatarMiddleware } from './types/AvatarMiddleware'; |
| 41 | +export { type default as CardActionMiddleware, type PerformCardAction } from './types/CardActionMiddleware'; |
| 42 | +export { type ContextOf } from './types/ContextOf'; |
| 43 | +export { type GroupActivities, type default as GroupActivitiesMiddleware } from './types/GroupActivitiesMiddleware'; |
| 44 | +export { type Notification } from './types/Notification'; |
| 45 | +export { |
| 46 | + type ScrollToEndButtonComponentFactory, |
| 47 | + type default as ScrollToEndButtonMiddleware |
| 48 | +} from './types/ScrollToEndButtonMiddleware'; |
| 49 | +export { type SendStatus } from './types/SendStatus'; |
| 50 | +export { type RenderToast, type default as ToastMiddleware } from './types/ToastMiddleware'; |
| 51 | +export { type Typing } from './types/Typing'; |
| 52 | +export { |
| 53 | + type RenderTypingIndicator, |
| 54 | + type default as TypingIndicatorMiddleware |
| 55 | +} from './types/TypingIndicatorMiddleware'; |
| 56 | +export { type WebSpeechPonyfill } from './types/WebSpeechPonyfill'; |
| 57 | +export { type WebSpeechPonyfillFactory } from './types/WebSpeechPonyfillFactory'; |
97 | 58 |
|
98 | 59 | // #region Build info |
99 | 60 | import buildInfo from './buildInfo'; |
|
0 commit comments