Skip to content

Commit e1cbd92

Browse files
committed
fluent-theme should depends on bundle only
1 parent a67544e commit e1cbd92

38 files changed

+936
-4571
lines changed

package-lock.json

Lines changed: 845 additions & 4502 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/bundle/internal.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This is required for Webpack 4 which does not support named exports.
2+
// eslint-disable-next-line no-undef
3+
module.exports = require('./dist/botframework-webchat.internal.js');

packages/bundle/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
"default": "./dist/botframework-webchat.js"
1616
}
1717
},
18+
"./internal": {
19+
"import": {
20+
"types": "./dist/botframework-webchat.internal.d.mts",
21+
"default": "./dist/botframework-webchat.internal.mjs"
22+
},
23+
"require": {
24+
"types": "./dist/botframework-webchat.internal.d.ts",
25+
"default": "./dist/botframework-webchat.internal.js"
26+
}
27+
},
1828
"./middleware": {
1929
"import": {
2030
"types": "./dist/botframework-webchat.middleware.d.mts",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// We should review exports in this file to make sure 1P = 3P.
2+
export { type ActivityMiddleware, type TypingIndicatorMiddleware } from 'botframework-webchat-api';
3+
export {
4+
createActivityBorderMiddleware,
5+
createActivityGroupingMiddleware,
6+
DecoratorComposer,
7+
type DecoratorMiddleware
8+
} from 'botframework-webchat-api/decorator';
9+
export { WebChatDecorator } from 'botframework-webchat-component/decorator';
10+
export { createIconComponent, PartGrouping, useLiveRegion } from 'botframework-webchat-component/internal';
11+
export { getOrgSchemaMessage, type DirectLineCardAction, type WebChatActivity } from 'botframework-webchat-core';

packages/bundle/tsup.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const commonConfig = applyConfig(config => ({
3333
entry: {
3434
'botframework-webchat': './src/boot/exports/full.ts',
3535
'botframework-webchat.es5': './src/boot/exports/full-es5.ts',
36+
'botframework-webchat.internal': './src/boot/exports/internal.ts',
3637
'botframework-webchat.middleware': './src/boot/exports/middleware.ts',
3738
'botframework-webchat.minimal': './src/boot/exports/minimal.ts'
3839
},

packages/fluent-theme/package.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,8 @@
5151
"start": "npm run build -- --watch"
5252
},
5353
"localDependencies": {
54-
"@msinternal/botframework-webchat-base": "development",
55-
"@msinternal/botframework-webchat-styles": "development",
5654
"@msinternal/botframework-webchat-tsconfig": "development",
57-
"botframework-webchat-api": "production",
58-
"botframework-webchat-component": "production",
59-
"botframework-webchat-core": "production"
55+
"botframework-webchat": "production"
6056
},
6157
"pinDependencies": {
6258
"@types/react": [
@@ -69,8 +65,6 @@
6965
]
7066
},
7167
"devDependencies": {
72-
"@msinternal/botframework-webchat-base": "0.0.0-0",
73-
"@msinternal/botframework-webchat-styles": "0.0.0-0",
7468
"@msinternal/botframework-webchat-tsconfig": "^0.0.0-0",
7569
"@types/math-random": "^1.0.2",
7670
"@types/node": "^24.1.0",
@@ -79,9 +73,7 @@
7973
"typescript": "~5.8.3"
8074
},
8175
"dependencies": {
82-
"botframework-webchat-api": "0.0.0-0",
83-
"botframework-webchat-component": "0.0.0-0",
84-
"botframework-webchat-core": "0.0.0-0",
76+
"botframework-webchat": "0.0.0-0",
8577
"classnames": "2.5.1",
8678
"inject-meta-tag": "0.0.1",
8779
"math-random": "2.0.1",

packages/fluent-theme/src/components/activity/ActivityDecorator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { reactNode, validateProps } from '@msinternal/botframework-webchat-react-valibot';
2-
import { WebChatActivity } from 'botframework-webchat-component';
2+
import { type WebChatActivity } from 'botframework-webchat/internal';
33
import cx from 'classnames';
44
import React, { ReactNode, memo } from 'react';
55
import { object, optional, pipe, readonly, type InferInput } from 'valibot';

packages/fluent-theme/src/components/activity/CopilotMessageHeader.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { validateProps } from '@msinternal/botframework-webchat-react-valibot';
2-
import { WebChatActivity, hooks } from 'botframework-webchat-component';
2+
import { hooks } from 'botframework-webchat';
3+
import { type WebChatActivity } from 'botframework-webchat/internal';
34
import cx from 'classnames';
45
import React, { memo, useMemo, type CSSProperties } from 'react';
56
import { custom, object, optional, pipe, readonly, safeParse, string, type InferInput } from 'valibot';
7+
68
import { useStyles } from '../../styles';
79
import styles from './CopilotMessageHeader.module.css';
810
import isAIGeneratedActivity from './private/isAIGeneratedActivity';

packages/fluent-theme/src/components/activity/PartGroupingDecorator.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { reactNode, validateProps } from '@msinternal/botframework-webchat-react-valibot';
2-
import { PartGrouping } from 'botframework-webchat-component/internal';
3-
import { getOrgSchemaMessage, type WebChatActivity } from 'botframework-webchat-core';
2+
import { getOrgSchemaMessage, PartGrouping, type WebChatActivity } from 'botframework-webchat/internal';
43
import cx from 'classnames';
54
import React, { memo, useMemo, type ReactNode } from 'react';
65
import { array, custom, object, optional, pipe, readonly, safeParse } from 'valibot';

packages/fluent-theme/src/components/activity/private/isAIGeneratedActivity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getOrgSchemaMessage, type WebChatActivity } from 'botframework-webchat-core';
1+
import { getOrgSchemaMessage, type WebChatActivity } from 'botframework-webchat/internal';
22

33
export default function isAIGeneratedActivity(activity: undefined | WebChatActivity) {
44
return !!(activity && getOrgSchemaMessage(activity?.entities || [])?.keywords?.includes('AIGeneratedContent'));

0 commit comments

Comments
 (0)