From 73ee44a7089fb86e6d2ea43bcbb40fb14584f1c2 Mon Sep 17 00:00:00 2001 From: William Wong Date: Tue, 30 Apr 2024 10:14:28 -0700 Subject: [PATCH] Emit ESM build via tsup (#5148) * Rename to .jsx * Ignore /dist/ * Rename to .jsx * Rename to .jsx * Rename to .jsx * Revert "Rename to .jsx" This reverts commit 324f8f0753567aa4d096710307494c44b479e0b2. * Revert "Rename to .jsx" This reverts commit 04a77e5a72f06ee0bbd2166a50c02fb4131dcc87. * Revert "Rename to .jsx" This reverts commit d68dea253955795add8abe4f7b6aa6cc96f01761. * Revert "Rename to .jsx" This reverts commit d111d1b18034e65afd9a975866df1640f2d7a0cd. * Compile globalize under /src/ * Remove connectToWebChat * Fix main field * Remove connectToWebChat * Fix globalize * Rename to .ts * Rename to .ts * Use internal Observable for typing * Improve type portability * Remove unneeded @ts-expect-error * Fix types * Remove unneeded polyfill * Fix typing * Fix props typing * Use internal hook * Improve type portability * Use ESNext * Fix typing * Fix typing and improve type portability * Use globalThis * Fix typing * Use @types/dom-speech-recognition * Add .js to import * Add tsup * Typo * Fix precommit * Add fluent-theme * Update tsd * Fix deprecated tests * Fix flakiness * Use ESM for Webpack * Add instrumentation to tsup * Fix ES5 build * Skip *.worker.js * Hack synthetic import * Move NODE_ENV to run * Instrument TypeScript files * Add @istanbuljs/nyc-config-typescript * Our own istanbuljs plugin * Add local dependencies * Use babel.profile.config.json * Add @babel/preset-react * Inherit base ESBuild plug-ins * Update YouTube player * Don't collect coverage under packages/test * Add coverage to fluent-theme * Skip coverage from packages/test * Remove coveragePathIgnorePatterns * Add latest tag style * Add default exports * Add types field * Add pack-all script * Remove older tag * Remove older tag * Revert import from index * Clean up * Clean up * Better comment * Add type * Clean up naming * Remove commented code * Mark microsoft-cognitiveservices-speech-sdk as no external * Add entry * Add 4.17.0 * Add theme pack * Add theme pack support * Update meta tag * Move default to the last * Zip without directory * Tag CJS build * Update README.md Co-authored-by: Eugene * Rename transpiler to build-tool * Update babel.config.json for build_tool --------- Co-authored-by: Eugene --- .github/ISSUE_TEMPLATE/bug_report.yml | 10 + .github/workflows/pull-request-validation.yml | 18 +- .gitignore | 2 + CHANGELOG.md | 9 +- README.md | 35 + ...activity-should-render-activity-1-snap.png | Bin 12061 -> 0 bytes ...s-should-render-activity-status-1-snap.png | Bin 7102 -> 0 bytes ...der-avatar-should-render-avatar-1-snap.png | Bin 8322 -> 0 bytes .../fluentTheme/fluentThemeFallback.dark.html | 1 + __tests__/html/fluentTheme/simple.html | 13 +- .../fluentTheme/telephoneKeypad.showHide.html | 1 + .../html/fluentTheme/telephoneKeypad.tap.html | 1 + __tests__/html/hooks.useRenderActivity.html | 76 - __tests__/html/hooks.useRenderActivity.js | 5 - .../html/hooks.useRenderActivityStatus.html | 105 - .../html/hooks.useRenderActivityStatus.js | 5 - __tests__/html/hooks.useRenderAvatar.html | 150 -- __tests__/html/hooks.useRenderAvatar.js | 5 - __tests__/html/metaTag.webChat.es5.html | 12 + __tests__/html/metaTag.webChat.full.html | 12 + __tests__/html/metaTag.webChat.minimal.html | 12 + ...egacyActivityMiddleware.passwordInput.html | 4 +- ...acyActivityMiddleware.reactionButtons.html | 2 +- __tests__/video.js | 2 +- babel.profile.config.json | 4 + esbuildBabelPluginIstanbul.ts | 38 + package-lock.json | 2255 ++++++++++++++++- package.json | 15 +- packages/api/.gitignore | 6 +- packages/api/babel.config.json | 2 +- packages/api/internal.js | 3 + packages/api/package-lock.json | 963 ++++++- packages/api/package.json | 46 +- .../scripts/createPrecompiledGlobalize.mjs | 29 +- packages/api/src/hooks/Composer.tsx | 5 +- packages/api/src/hooks/index.ts | 8 +- .../src/hooks/internal/WebChatAPIContext.ts | 2 +- ...tDictateState.js => useSetDictateState.ts} | 2 +- .../createDefaultGroupActivitiesMiddleware.ts | 5 +- packages/api/src/hooks/useActiveTyping.ts | 2 +- .../hooks/useCreateActivityStatusRenderer.tsx | 62 +- ...reateAttachmentForScreenReaderRenderer.ts} | 4 +- .../src/hooks/useDebouncedNotifications.ts | 8 +- packages/api/src/hooks/useNotifications.ts | 2 +- packages/api/src/hooks/usePostActivity.ts | 3 +- packages/api/src/hooks/useRenderActivity.js | 53 - .../api/src/hooks/useRenderActivityStatus.js | 36 - ...erAttachment.js => useRenderAttachment.ts} | 3 +- packages/api/src/hooks/useRenderAvatar.js | 18 - packages/api/src/hooks/useSendFiles.ts | 5 +- packages/api/src/hooks/useSendMessage.ts | 8 +- packages/api/src/hooks/useSetNotification.ts | 2 +- packages/api/src/hooks/useStyleOptions.ts | 2 +- .../src/hooks/utils/observableToPromise.ts | 4 +- packages/api/src/index.ts | 49 +- packages/api/src/internal.ts | 3 + .../ActivityAcknowledgementComposer.tsx | 21 +- .../ActivityAcknowledgement/private/types.ts | 6 - .../ActivityKeyer/ActivityKeyerComposer.tsx | 21 +- .../ActivitySendStatusComposer.tsx | 26 +- .../ActivitySendStatus/private/Context.ts | 2 +- .../useSendStatusByActivityKey.ts | 2 +- .../providers/Ponyfill/PonyfillComposer.tsx | 8 +- packages/api/src/tsconfig.json | 5 +- .../api/src/types/ActivityStatusMiddleware.ts | 2 +- .../api/src/types/{internal => }/ContextOf.ts | 0 packages/api/src/types/Notification.ts | 2 +- packages/api/src/types/SendStatus.ts | 3 + packages/api/src/types/ToastMiddleware.ts | 2 +- packages/api/src/types/Typing.ts | 2 +- .../src/types/TypingIndicatorMiddleware.ts | 2 +- packages/api/src/types/WebSpeechPonyfill.ts | 2 +- .../api/src/types/WebSpeechPonyfillFactory.ts | 4 +- packages/api/src/types/internal/SendStatus.ts | 14 - packages/api/tsup.config.ts | 11 + packages/bundle/.gitignore | 8 +- packages/bundle/babel.config.json | 2 +- packages/bundle/package-lock.json | 217 +- packages/bundle/package.json | 38 +- packages/bundle/scripts/devServer.mjs | 4 +- packages/bundle/src/AddFullBundle.tsx | 55 +- packages/bundle/src/FullComposer.tsx | 10 +- packages/bundle/src/FullReactWebChat.tsx | 27 +- .../adaptiveCards/AdaptiveCardsComposer.tsx | 27 +- .../src/adaptiveCards/AdaptiveCardsContext.ts | 7 +- .../AdaptiveCardsStyleOptions.ts | 3 +- .../adaptiveCards/AdaptiveCardsStyleSet.ts | 2 +- .../Attachment/AdaptiveCardBuilder.ts | 12 +- .../Styles/createAdaptiveCardsStyleSet.ts | 6 +- .../src/adaptiveCards/defaultStyleOptions.ts | 2 +- .../hooks/internal/useAdaptiveCardsContext.ts | 4 +- .../hooks/useAdaptiveCardsPackage.ts | 2 +- .../adaptiveCards/normalizeStyleOptions.ts | 2 +- packages/bundle/src/addVersion.js | 32 +- .../createBrowserWebSpeechPonyfillFactory.ts | 9 +- .../src/createDirectLineSpeechAdapters.ts | 12 +- packages/bundle/src/hooks/useStyleSet.ts | 2 +- packages/bundle/src/index-es5.ts | 7 +- packages/bundle/src/index-minimal.ts | 24 +- packages/bundle/src/index.ts | 44 +- packages/bundle/src/polyfill.ts | 40 +- packages/bundle/src/tsconfig.json | 5 +- .../bundle/src/types/AdaptiveCardsPackage.ts | 4 +- .../src/types/FullBundleStyleOptions.ts | 7 +- packages/bundle/tsup.config.ts | 38 + packages/bundle/webpack.config.js | 6 +- packages/component/.gitignore | 5 +- packages/component/babel.config.json | 2 +- packages/component/package-lock.json | 231 +- packages/component/package.json | 35 +- .../src/Activity/CarouselFilmStrip.js | 20 - packages/component/src/Activity/Speak.tsx | 20 +- .../component/src/Activity/StackedLayout.tsx | 24 - .../ActivityStatus/SendStatus/SendStatus.tsx | 20 - .../Text/private/MarkdownTextContent.tsx | 5 +- .../Text/private/MessageSensitivityLabel.tsx | 6 +- packages/component/src/Composer.tsx | 12 +- packages/component/src/Dictation.js | 9 +- .../src/LinkDefinition/LinkDefinitions.tsx | 16 +- .../private/LiveRegionAttachments.tsx | 24 +- packages/component/src/ReactWebChat.tsx | 14 +- .../src/SendBox/DictationInterims.tsx | 13 - .../src/SendBox/MicrophoneButton.tsx | 58 +- packages/component/src/SendBox/SendButton.tsx | 13 - .../component/src/SendBox/SuggestedAction.tsx | 16 - .../src/SendBox/SuggestedActions.tsx | 61 +- packages/component/src/SendBox/TextBox.tsx | 13 +- .../src/SendBoxToolbar/UploadButton.tsx | 61 - ...addTargetBlankToHyperlinksMarkdown.spec.js | 5 - .../src/Utils/updateMarkdownAttrs.spec.js | 6 - packages/component/src/connectToWebChat.js | 60 - .../internal/BypassSpeechSynthesisPonyfill.js | 2 +- packages/component/src/index.ts | 33 +- packages/component/src/tsconfig.json | 7 +- packages/component/tsup.config.ts | 10 + packages/core/.gitignore | 5 +- packages/core/babel.config.json | 2 +- packages/core/package.json | 29 +- packages/core/src/index.ts | 6 + packages/core/src/tsconfig.json | 2 + packages/core/tsup.config.ts | 9 + packages/directlinespeech/.gitignore | 8 +- packages/directlinespeech/babel.config.json | 2 +- packages/directlinespeech/package.json | 29 +- .../directlinespeech/src/DirectLineSpeech.js | 2 +- .../SpeechSynthesisAudioStreamUtterance.js | 2 +- .../src/createWebSpeechPonyfillFactory.js | 4 +- packages/directlinespeech/src/index.js | 28 +- packages/directlinespeech/tsup.config.ts | 31 + packages/fluent-theme/.gitignore | 6 +- packages/fluent-theme/package-lock.json | 45 +- packages/fluent-theme/package.json | 21 +- .../components/telephoneKeypad/Surrogate.tsx | 2 +- .../private/TelephoneKeypad.tsx | 13 +- packages/fluent-theme/src/index.ts | 15 +- packages/fluent-theme/tsup.config.ts | 66 +- packages/isomorphic-react-dom/package.json | 2 +- .../src/createDevModeActivityMiddleware.js | 98 - .../src/createDevModeActivityMiddleware.jsx | 79 + ... => createDevModeAttachmentMiddleware.jsx} | 0 packages/test/page-object/package.json | 4 + tsup.base.config.ts | 56 + 162 files changed, 4600 insertions(+), 1687 deletions(-) delete mode 100644 __tests__/__image_snapshots__/html/hooks-use-render-activity-js-use-render-activity-should-render-activity-1-snap.png delete mode 100644 __tests__/__image_snapshots__/html/hooks-use-render-activity-status-js-use-render-activity-status-should-render-activity-status-1-snap.png delete mode 100644 __tests__/__image_snapshots__/html/hooks-use-render-avatar-js-use-render-avatar-should-render-avatar-1-snap.png delete mode 100644 __tests__/html/hooks.useRenderActivity.html delete mode 100644 __tests__/html/hooks.useRenderActivity.js delete mode 100644 __tests__/html/hooks.useRenderActivityStatus.html delete mode 100644 __tests__/html/hooks.useRenderActivityStatus.js delete mode 100644 __tests__/html/hooks.useRenderAvatar.html delete mode 100644 __tests__/html/hooks.useRenderAvatar.js create mode 100644 babel.profile.config.json create mode 100644 esbuildBabelPluginIstanbul.ts create mode 100644 packages/api/internal.js rename packages/api/src/hooks/internal/{useSetDictateState.js => useSetDictateState.ts} (58%) rename packages/api/src/hooks/{useCreateAttachmentForScreenReaderRenderer.js => useCreateAttachmentForScreenReaderRenderer.ts} (55%) delete mode 100644 packages/api/src/hooks/useRenderActivity.js delete mode 100644 packages/api/src/hooks/useRenderActivityStatus.js rename packages/api/src/hooks/{useRenderAttachment.js => useRenderAttachment.ts} (51%) delete mode 100644 packages/api/src/hooks/useRenderAvatar.js create mode 100644 packages/api/src/internal.ts delete mode 100644 packages/api/src/providers/ActivityAcknowledgement/private/types.ts rename packages/api/src/types/{internal => }/ContextOf.ts (100%) create mode 100644 packages/api/src/types/SendStatus.ts delete mode 100644 packages/api/src/types/internal/SendStatus.ts create mode 100644 packages/api/tsup.config.ts create mode 100644 packages/bundle/tsup.config.ts delete mode 100644 packages/component/src/connectToWebChat.js create mode 100644 packages/component/tsup.config.ts create mode 100644 packages/core/tsup.config.ts create mode 100644 packages/directlinespeech/tsup.config.ts delete mode 100644 packages/playground/src/createDevModeActivityMiddleware.js create mode 100644 packages/playground/src/createDevModeActivityMiddleware.jsx rename packages/playground/src/{createDevModeAttachmentMiddleware.js => createDevModeAttachmentMiddleware.jsx} (100%) create mode 100644 tsup.base.config.ts diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 48bf24ec0d..df5ce56f90 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -118,6 +118,16 @@ body: - Others or unrelated validations: required: true + - type: dropdown + id: theme-pack + attributes: + label: Which theme pack does this issue affect? + multiple: true + options: + - I did not test it on other theme packs + - Fluent UI + validations: + required: true - type: input id: url attributes: diff --git a/.github/workflows/pull-request-validation.yml b/.github/workflows/pull-request-validation.yml index e2f4a7efdb..680f4b05fa 100644 --- a/.github/workflows/pull-request-validation.yml +++ b/.github/workflows/pull-request-validation.yml @@ -48,7 +48,7 @@ jobs: - run: npm run bootstrap - - run: npm run build --if-present + - run: npm run build --if-present # Add instrumentation code - name: Pack Docker artifact run: | @@ -187,12 +187,20 @@ jobs: - run: npm run build --if-present - - name: Run tsd under packages/bundle - run: ./node_modules/.bin/tsd + - name: Run tsd under packages/bundle (CJS) + run: ./node_modules/.bin/tsd -t ./lib/index.d.ts + working-directory: ./packages/bundle + + - name: Run tsd under packages/bundle (ESM) + run: ./node_modules/.bin/tsd -t ./dist/botframework-webchat.d.mts working-directory: ./packages/bundle - - name: Run tsd under packages/core - run: ./node_modules/.bin/tsd + - name: Run tsd under packages/core (CJS) + run: ./node_modules/.bin/tsd -t ./lib/index.d.ts + working-directory: ./packages/core + + - name: Run tsd under packages/core (ESM) + run: ./node_modules/.bin/tsd -t ./dist/botframework-webchat-core.d.mts working-directory: ./packages/core html-test: diff --git a/.gitignore b/.gitignore index 49a8e24056..bef70d2a23 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ /__tests__/__image_snapshots__/**/__diff_output__ /.env +/*.tgz /coverage /debug.log /gh-pages /lerna-debug.log /node_modules +/tarball.zip # Do not commit binaries /chromedriver* diff --git a/CHANGELOG.md b/CHANGELOG.md index 04818dc6a9..fa1bb4782d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `useSendMessage` hook is updated to support sending attachments with a message. To reduce complexity, the `useSendFiles` hook is being deprecated. The hook will be removed on or after 2026-04-03 - `styleOptions.uploadThumbnailHeight` and `styleOptions.uploadThumbnailWidth` must be a `number` of pixels - `useSuggestedActions` type is updated to align with its actual implementation, by [@OEvgeny](https://github.com/OEvgeny), in PR [#5122](https://github.com/microsoft/BotFramework-WebChat/pull/5122) +- Removed deprecated code: `connect*`, `useRenderActivity`, `useRenderActivityStatus`, `useRenderAvatar`, in PR [#5148](https://github.com/microsoft/BotFramework-WebChat/pull/5148), by [@compulim](https://github.com/compulim) +- Added named exports in both CommonJS and ES Modules module format, in PR [#5148](https://github.com/microsoft/BotFramework-WebChat/pull/5148), by [@compulim](https://github.com/compulim) ### Added @@ -54,6 +56,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - (Experimental) Added `` component which can be used to localize strings, by [@OEvgeny](https://github.com/OEvgeny) in PR [#5140](https://github.com/microsoft/BotFramework-WebChat/pull/5140) - Added `` component to apply theme pack to Web Chat, by [@compulim](https://github.com/compulim), in PR [#5120](https://github.com/microsoft/BotFramework-WebChat/pull/5120) - Added `useMakeThumbnail` hook option to create a thumbnail from the file given, by [@compulim](https://github.com/compulim), in PR [#5123](https://github.com/microsoft/BotFramework-WebChat/pull/5123) and [#5122](https://github.com/microsoft/BotFramework-WebChat/pull/5122) +- Added `moduleFormat` and `transpiler` build info to `` tag, in PR [#5148](https://github.com/microsoft/BotFramework-WebChat/pull/5148), by [@compulim](https://github.com/compulim) ### Fixed @@ -61,11 +64,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixes [#5111](https://github.com/microsoft/BotFramework-WebChat/issues/5111). Fixed keyboard help screen to use HTML description list, by [@compulim](https://github.com/compulim), in PR [#5116](https://github.com/microsoft/BotFramework-WebChat/issues/pull/5116) - Fixes [#5080](https://github.com/microsoft/BotFramework-WebChat/issues/5080). Fixed `dateToLocaleISOString` for handling sub-hour, by [@marclundgren](https://github.com/marclundgren), in PR [#5114](https://github.com/microsoft/BotFramework-WebChat/pull/5114) - Fixes [#5146](https://github.com/microsoft/BotFramework-WebChat/issues/5146). Fixed chat history focus indicator should not show up on tap, by [@OEvgeny](https://github.com/OEvgeny), in PR [#5145](https://github.com/microsoft/BotFramework-WebChat/pull/5145) +- Fixes type portability issues by exporting types from all exported code, in PR [#5148](https://github.com/microsoft/BotFramework-WebChat/pull/5148), by [@compulim](https://github.com/compulim) +- Fixes missing exports of `useNotifications`, in PR [#5148](https://github.com/microsoft/BotFramework-WebChat/pull/5148), by [@compulim](https://github.com/compulim) ### Changed - Moved pull request validation pipeline to GitHub Actions, by [@compulim](https://github.com/compulim), in PR [#4976](https://github.com/microsoft/BotFramework-WebChat/pull/4976) -- Bumped all dependencies to the latest versions, by [@compulim](https://github.com/compulim) in PR [#4973](https://github.com/microsoft/BotFramework-WebChat/pull/4973) and PR [#5115](https://github.com/microsoft/BotFramework-WebChat/pull/5115) +- Bumped all dependencies to the latest versions, by [@compulim](https://github.com/compulim) in PR [#4973](https://github.com/microsoft/BotFramework-WebChat/pull/4973), PR [#5115](https://github.com/microsoft/BotFramework-WebChat/pull/5115), and PR [#5148](https://github.com/microsoft/BotFramework-WebChat/pull/5148) - Notes: Some components/features in Adaptive Cards are in preview and not ready for production use. Web Chat does not support these components and features - Production dependencies - [`adaptivecards@3.0.2`](https://npmjs.com/package/adaptivecards) @@ -82,7 +87,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Development dependencies - [`@types/dom-speech-recognition@0.0.4`](https://npmjs.com/package/@types/dom-speech-recognition) - [`@types/node@20.10.3`](https://npmjs.com/package/@types/node) - - [`@types/react@18.2.42`](https://npmjs.com/package/@types/react) + - [`@types/react@16.14.60`](https://npmjs.com/package/@types/react) - [`@typescript-eslint/eslint-plugin@6.13.2`](https://npmjs.com/package/@typescript-eslint/eslint-plugin) - [`@typescript-eslint/parser@6.13.2`](https://npmjs.com/package/@typescript-eslint/parser) - [`axe-core@4.8.2`](https://npmjs.com/package/axe-core) diff --git a/README.md b/README.md index be32a8744a..8196c19802 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,41 @@ Web Chat supports [Content Security Policy (CSP)](https://developer.mozilla.org/ > This section points out important version notes. For further information, please see the related links and check the [`CHANGELOG.md`](https://github.com/microsoft/BotFramework-WebChat/blob/main/CHANGELOG.md) +### 4.17.0 notable changes + +#### Debut of ES Modules + +Web Chat now exports as ES Modules (named exports) along with CommonJS (named and unnamed exports). + +#### Improvement to file upload experience + +End-user can now add a message and confirm before uploading their file to the bot. To opt-out of the new experience, pass `sendAttachmentOn: 'send'` in style options. + +#### Theme pack support + +We are excited to add theme pack support. Developers can now pack all their customization in a single package and publish it to NPM. + +#### Experimental Fluent UI theme pack + +We are excited to announce Fluent UI theme pack is in the work and is currently in experimental phase. This theme pack is designed for web developers who want to bring a native Copilot user experience to their customers. + +We will continue to add new features and support both white-label experience and Fluent UI experience with the same level of parity. + +You can wrap Web Chat with `` to try out the new experience. + +```tsx +import ReactWebChat from 'botframework-webchat'; +import { FluentThemeProvider } from 'botframework-webchat-fluent-theme'; + +export default function MyComponent() { + return ( + + + + ); +} +``` + ### 4.16.1 notable changes Web Chat now supports [Adaptive Cards schema up to 1.6](https://adaptivecards.io/explorer/). Some features in Adaptive Cards are in preview or designed to use outside of Bot Framework. Web Chat does not support these features. diff --git a/__tests__/__image_snapshots__/html/hooks-use-render-activity-js-use-render-activity-should-render-activity-1-snap.png b/__tests__/__image_snapshots__/html/hooks-use-render-activity-js-use-render-activity-should-render-activity-1-snap.png deleted file mode 100644 index ef998f6fce1309f2867165a714a49abc23bdb6e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12061 zcmeHt@ z`_X~@@SA-0->L9pmxs3U4ThYiGgAx(o! zDBa=$2hk5Nj-MAWzMFor;FB@>ms6?dtCsVD$!eyi>4g_{Ra0I*KbanhLA@C`tWd4E zJ+VFUhTvu`gqf~N2vZJwAv5V;HCY~KCO+9fSUwm{5I9^L%Gur&FXuJ(^R4SiMh45H zY;5W4>kn_;y!o^!;B5c3`JQ|wH#fISciw*%a5~GdO_B{*&!f(elb$|(nis_?GKvd5 zBXc8e*YNS<7w?=k$i4BD)0W{g`PTbgp9OX^GiV;MWpI6cZOJ8sZ<+x z9h&>=QzAKUFDTPmV;Ax5ACwqPF{_=aUhy^*QQ8c#`I4BJSgqCO%2ZOYaM{H^$~Q7S zB70A2GuxpRWo}IJL}M%^&ZDWd(5^i)GBO!&=7;JlcG4kQH?A~F4XNOMMP1HBMewD& zkN>)#yA|tFb@v(5iKdPe`p8#ub!uXuQMOT$teWx4P?ABe*>rcV`2vN*rQ$AqS&<%* z>1C;a_4R!-S)*rQ`svj%{)9GJv3b~-47OZ;-!VS*mS?BT(x%!|8AUR6QbUg(JJy+Z zU+J=0g`uQ<$DRBKHJ;t3KI8TS^>`7*fmn*F^j3GJ{~9rmmyU^%a^YH9T^g_Vnl0*{ zu;(N+o11Zs`rb{t&D@!GcQmr=tuKACR@OrCdTL6_B}vKEr}c+U31@X?8ZdI_5fW(w zp6wdbJ^4u~n(-MKdYKunBVRL&NjXu%rk7Cc3IQc$KJz)|*d4vc*REOAhBhwI!p_Ki z9QpPl)2PV)b!e#myGwc!c5TVStKv3Ix|Wv7`Z*?S6^?Z{-q$Z*wor1b6UJqw9DCk} za>`{`*5TkCUC35XnLRxB5JTz8?kw}7g!eT>iz>kvY*A z8-%b+9_Qf5e0@Ujd4Pwynp*qk$9wdu0(?&h8QvNH^-hOQ+Xe62a{>+kwqIfi7Bv8DnkuAve#z;C`;^Vt5>Cn~DZH~>hYfnj6eRt_~aIj9Mes&>j zO^75nkcB3ClCAIpSFY%PQhnF9vo@3)#K`&_-XIlw1`x9PmtsHtLzqiPtFGOlEdRBp#kI!iIN62ijNL3y;cDt2NGtPEn zX`Hw=gdJ*V$f=|nl~a2il$@8B>P2FC`pSLg?FOm=YW!#NYa1FIx7Qb=M9dW&T0cH> z8mu6*aLQVSU0r$!K-2@D;9_kZCQprick%AmK`b4!HI0bDqb?J%wB^K;2lmbk(P<(3av;aZl;;hx#J}Ib~4N(Qmrstu(yQ%A=VSP~7 zGf80z1@@g8XsEl{o_q^yYyDzJH1ZA&f>;f*hHuZAkxMS$nky&D=S+nKdA@q}3OZHB zIPczL%+@Ta3rbQDiU=U%LZ6pqKfNMnk4(LWTC?H%#)gD|C6u5^Ngk@8q(s`GGvl2+ zeS5hWOQ#Ksq4&uO3pYX0{AFSd$jT@1u$+1j~_oe_T=3^haU>u zn$<6LA0O_9x+(a0E4VjOKxc+*lUM|G2teCcVCwSfDDRWI>Lkx8?Y=UvOu{qnKRN@7 z#AAEn7f;6!I28hV9#~k+zE$QD6(>S{J>L$qv8E3A43Xgs8icm5sTGXZ;~DX#blR2% z&S|Jh{vjDk&-Su$af5dshlK4t0~5DfKdr>A8}hE5y@%8RF|JvoWRm1aF3=}A4}@Dm zD z_0@5O4&6CDfnkPd;8%00@f zYFR!=$tl;=y1Mvu|KZc`_Z>QUQBqQGmC|hhSpBUxr@aVEPS;7*To{6e$S^4_2;5$* z9WE9z%)1sZ>(w?xCKfq#3j_FR=w;~Et?uY%8%eIuLqPx`zfgbqGC259Ra`hZ-=ek< zj#H>PgfIo@9~HS=dT?!9RU0Z$DGFT`P%2zLQxIOC;5RLRlyeqF#H^xZ5VK|~Y1?uQ zf%A0jPb=HY%@k;ARtnY5&Q4WRQ$J`wGwgAtO)Y3EY7VC+d=Q;tnE&9u;%xvYIh1y# z-|7?mzTJ<*bDMw2y4p9bZ@oWs;!-kvzZrB@yU!3N_1U3Q_P`YE(ysT4Np+`l-w0Jq zne-BE!jea;JB1DN?k!aJIhSkTZkW}Uk4G7M{%JV}$^zMP?W!iw2&j+}g^jUek}iWL z2M-=(7qe8!nUqMFrdjd+bs+7|ha2bcHQ&G6uFVbLl7&snZ0Gt*0s8P|-m@8S_-RTn zSbD24{yFo4%a-v^_8m&dQ}^C-2YBI>alZ*?b4W%Ch!n@;L@wYharB<#lbR%{ygh$z z4YR&*A3k`@8y_@Rxn?F$?Xj3{PYpwsl5J9|?bGk3+(R0w##Tc^q?DADgd^-OgzANU zUMR@o;vZ4C-PRr9%SpgCyQXwM*75i;Sd;HX(XaXOBf(WHw`}^-fa^DAzsY!?rVdj^ zdTN}g#dG1R_20*GL=19F7KUKqdgKDDcQG*;K>Czd{0Tq3D>s%W4Th>Pog^1?kYXC` zsaoAitn$goMgbL=_U`82W{so;=ZZHr6v8jU*P(ip;VaA*D9D{496_BQ%Jp5INCz${ z+oATYPQGO?T;I3STluVzBlYa`O}&dBWCrQ zD{%e3*HjztLtpRalLdgGNdX&6@p;Ts<~G~U-7mFqGZILbcQ~kIBSy_ewvB^+05X>h za^h%39ouwoeb}aTq(LRnv~$ZBpz=_z}v9 z2tT{8PY<%o`*{|-xT&E~t%A7~9}5d5P_;^8wk>BR9eeJ8F2H$ir(-4y@XwJp*YWxZ$8A<3Wy1rt16KK;cj>`HTz7p&*tN z9u5pv`XdLK;96B6hea+4wzvuq`^Rn#>$m)N`vgGXTR*ZGR)Itg)tk`jl?doKS}J)A&1s=@^HcyXD@q9ZAYz;VPek zU%tFEKUnDnbzu*UZ$xsAw{D6{2MDLU7R(9f>C84ZfRp-!i-@qY_M5Li1i}X{i=}{@4tQf_9QpA3#{&N)#XMZ zijSLwbHB8uyi4V36pD%VoDQu95-|gJCZ35*8yC9qp(EiSJQpgs}0|{g;V=e+b zUUU8A*C#LAgLd_+2%gXk|h_MD@kbnbSA%rtWpTCr_NP0+jAb(cl2dGv6Ro;o(uR z?BKl}{}-$LO3T4DdAl~AOdvTB-Jdgb(;pn;*F0>7-*B?NaQjW(jb}{gfPe}_4T46p z^P+SW0c684|vb^ zz8fuOJ^lA*M4-=#Hf~=jhfhO4c<>SVV&nz^UyELF`CT022>UhehfEdpIcw_;y-wcn4FY(e0!y=CmCr#IT zJlFOqI7Y&5>BRtjD(0peUrJycORB}kTC!(ZYTK9I7rL&VrV;)3b<&`pLuh^6T)KoWnXYIr)L(@DtuF!>T@NAHH<)2ZvX?hLqi(mJf)x z)7)O4&dlv7uu?lAVrBxNL)pl44$XC)zMnr;8VTacpiT51@80LRSaa${mRy|ERkH4J zfeO@d{#d3ZaPSww6=stLwZTt5;a+}Nkj{-psj9XC(B{B}r<;_zvx919;Z_h5sIa>< zqV7~ze=`ggk`5hv2}BBLPrY0-dCdCAi!YRAvCgqyg1H^w`XrrtB@pe=jQe?Uw0(KS zP85YgWtdl2y*@7Rak*JhaXoc@OJ017qj|h`~Bq+KX5Qg3OQH6l>&6Kpqs(ma&1SfHHf%9 zU6$S!l(Bdm`ucU-A(4vrU}y|M5NfNdzd@J=QVO(zIi?88I32{DJ(O?Ra+6#TsXkG$ z`lPT)T4LZPN^yH3sMwMG5fD8S&BKc>&IJ0 zC9WU5=latTjk~TG&Xa9kZ3ZYDXXZD>dl?ktkt0W@fd>{gT}g}WT8etw+PJFCX+hBB zrZvH*48pkNpVWI&x->Eka=R*gmkVuM&w~hX;eXS{E@2yfJB0mH_0Fsdbkn=dwfWq@ zoy{qz3Z}VK&uwhl<2{V~MVf6v*x`~FM{6ly)|!?~w!t;p4_1^yqa`C+ufN1CM%F6> zr0!pXb=%b#O`vR8Nj9tE_8l--y4^XZUVTm^L6xVN4NF@kj9H6tFi39OMv@3B_** zhSvy|zi{j<dM28Cs1djYpe!(tKqS}Yq` zZ(NHPEp_gGCEPsHq#F)8IfjSh?|avNit)#8z9kRQs8WJ=KRyL@%VX*9QoZ9Xe#j+8 zRa(c`U9R6G&@zimZo70)(Idf?p4G7I#2FiV!snOBT0uxZ1lW&r>Bt+$C z>u)WWCmIh?q$jLCqJB7)jE2f(>85L+qhLW*sB63Obd%$HiQcnDTcC23gdsuG{MnP8 zbvt*wkPfPviA;}fZzwC?H@pH!`=NV`ha4%HY`kd);PAb)dvU|eXrJlvh%1i?m^ zXsz*1K<74+Qo-GSm2H~ZG6w-VZ1wos*?KMJhG19j7g%qb75q~|Dmq!K?cqwRvX7+!rZW*M~ovjheQ{-_RKG`a zqnjLJS{fnUi{R7HhL%0S$(fBb5rl;el$?Fz5;Z*k*(-H!!2hdx^thK_UApEhs8b!t zN+5MUBEQ@q4w+002#HP*Sb5HgRdljOsLY8{-!n9Fe36gam^JS9k9@^8dack->Z7dV z0@^nr_-h5|#eVe~QMl+%43R-LBCT`%iet}TT|4pWH*VYr)w%gKKIOrEbtlxRCeeqh zod(FaL4%2}hj>Bd%gohJMcd;H_~k;`#;w><>go+ByrQv=KMseBg!b1`*tn??dxhDo z%A%G9WX)nSNo$C{V&0!pzkMvgjBjIX!foBgr)!XrbB>33YTdgii@&w$8J^XV zX`lrrUJtJCMi)1rC2gp3@&Sj((I%ePIs_)%ySPBH4Ab&r_%3jwABL?&s<#V-tGAbi z11elo)5j!=c#~X1zkE=7aU3$Or7Rl&C-huc{Eu`#U$27E=(}bqZ^5AJ0g9iaYz_yp z-iVTcrMIn#j=IsnT^E6F$qRMZq~#jspMOXO_AP?6F?_tBH*suiEFwp-zjh>X0KKF1 zE<&SC#URU2bajTT0})O(L|Hiyh)|v!68^cE%P?O?5e5d+0&$RukPHBUJ&X!6?j}74 z6B*oI_0Q4Qq^s|%ySUsDmX-2lWx7)hTs;zVMhT%mmU>LuL)MaER_V78i+d)jF>VPU z;eQygAQ!OD7J8`{bP$AvX(CnYH;^_-kO%R3er!OSZEX_JwgqM(h!^GuiJm-3u?+hLGBx9R(Ej_+1}j0H zD-&l@(PI**Z!_z1$8)MS?fpldoyr1zfhf||=}saLu0V;pz7DFP0m39}B!+`16;ay2 zdSr;rB1UJ$w8RhEaC}2+Nk?4NymEqP$Mg($z{2&Pn0Uu&Wqk$Ox&`oN0_5Kw$u4DpzNCi58HB&EK!k>>&EQ4n72CG-f>{w!iN^f>dDj)p^ItdC%CwbS&O$rl(c7a-}W& z;2>z}e8|I$V7>$c3UBY$Tc^k{+9~Mo0`B<*#X4Ja${g0@KVR9+g9az+)S00N+puXm zQ~u{;aF);fU~#~PJ2Go{ciFhBp#iSP1zth~L2d|Y&=DkXSEavCge5>!;e0iH5DD4W z7e=DO!|xGonicMwyL&id={r6UcGl0N#5xziW%j}J#)gsQOdcFeuVlB01u}Vnqkyg8 zDnY;M1I&U-i6js%o0PP~Tye4oP02jCHbkfSIDoVTDcU7m_UC*bIH1t56AUtkhJL}q`J@|S8KL!g5dF;%1aoiuwY z$XROWY0>lR^AMI9BU;|PJJX%EzRaqEw}wF}45y&UE<@~PIRM(1d4KQBdcGFx3f?@>4p^0Gt{eQg6Yx0N`NE@x zr#tK`a|7kPD3DL7+d5m&x<#NDX9vm+a1sIQ3yydUBxGI?U+f*~fhmf^EoEg20)fIn zuSqam6@<~D)PQFMPddOL3=P|Foia@ZuQ9f+ivfcEg2i9bQ;n5!iQ++$BJ+U7XV7V! z6;;5q_HclPTWkmR0_lrX!iWn=oq47}@aqEh_Fy#-%i#rZ2a{$dGx&RMIzSLwI5E~D zHaz@&`Fxcz?)Z@-A0S=byCzRUY*%D>;hu903@r7?vjCCDcYx7x$snd7ws-e6I`wGu zD~spI*Jr#as5a?wxmj=@SDbp2;XuKc2KIujiK>S|krFh}LAJcp2lfJ_l-@fa2IJ+# zJKR@$dQ#con(Gqn_Vbg5X8dZ_C)9P(lN@nLV?big?GG_{KQ zr&S5&eMl^N9u=d2Df6Swuu*3}fk8t8HZY;Q;I>t@K?fF?UWv0125yWa+5r;i2VT=1D5$2!c0Y#g>byPB$4cFG6LLBzgUgVgk3SuUT!Sb6uMmK}eYtXa@S_uoLDF~05)qT?axse26CzB~YeMGZiNsni+357O2| z9u)B5YsebDK09P(y$SR2pxjrgZ6FVxw1&KSgUtUS$P+_IaFuro-^u!oVQV{?@fgioFKpKxl_+-#@A zveMx0WrSk~WFb6D0X&0qx>W}BP*90+4t2V5<4M)_k{YTF-uMoOJ6gaAj}aV_aRFi0 z1u6(pYcRv#pCp6|J|)rxA!3lZva&Mc{HbeP<5bdX5E;dwqm3YwgNmy|v?Btx5C!+Z z@t-nrhQYCZiR=B$J0G5`&JFZIKyeSrKW_z}B*Wd=z?4@@F(4CdNb(*C>Ssyc$HJ9bfX2uJF06&X+zAe_80124HEmTyT#iQlsu?ef2HBV8 zIn{=+X)Zwd!9H1-A9E-KlmMt1gXEnBoyA<52-!&=Tp+hQ84{Q*2)ST9Zh^#~k&(xZ zD<0-U$kuP)k#;0NN~H`m7a20ygwc(<#{773n^2@t5b=pD0K6X>l21n%=0k>4O-2Br zqN&00%aeV`{5?1cg@>akv3cm##CpzOl*i1>(AZ8Jgz#+~rokK2A)@L#r*FqaWTv5P*qnKP8YINTg^ zO%4L&X5^_3cvm}Fd=MVete{oIsi&OWv{qphU ztH1s0@Cx;?b~)Q~(6D3qN80iWeW~L2nt*y%a}0;Sk}4b`lbNM3#*9pdHtMvU9yw5G z9o%-%OsnW|#PDgjjA{DDgcVtgh^HvNk?8Q~!oi$%n?H$z^moe{0ub z#>z`W?0^mBK}E%ZkdP217zimJg@7X)v(%e|B)DUZf9JN9_`i`gYt^!a zntEaDBzl1O`Dr$nOHyx4+C`VAMs19R-@?tP_3(bVR`c!HxhQU1f@qS0*^N+4xv%`b z#|?469iC%o$AXq;C`%cA&yp7t1)1_$5|-8Xfno6NAN37|?Q`YnUG}9e@u!I1Wrv*S z$b>8*tE}`~jlVc4!LQ02NhIO;sc_YDS5rhEk()YKrp#d|a)Q%DmGI5^3M?;qRJ=SE zgl_*_&n)A+DxcCq*^sAaQ}hsPb#@>>j`|fQKAu^5FSO)Kzp4lcw><{U-|**Rhde~{ z^S#FnL+<9-b+~43Z7>Z8iZ04(=yuh;E55`6tAMDP?%cf&5hsZeU|+>B84q#j@ka>p|9-1R#V`C>KCK{ud zB_V-JDy7UZZEb$3Wi%8?49|mG0POKE&1+RdT6Zw$Z;20TYi+i~l(0~+G4sCZmpP6p zOJh#X&XokMM)@im@y1p1vt@a&Vr9mtUfMR3H(-~wk`oeW*-7}ZFk*5T3orzLZRb=z zMoYy)sJXU7ujB1~K0O^~3UhX*zZGCow3QEq01wQ=eT0%ftSl zW+GZ%GYDGa^rZ&4xS5lZ#_}n3nWYNUXqJbZyVJYC&BKP8YX~$JWywz-4#tbNT|h zJ2aX#|GEOZJ{&N&#z75vAy)5rlU(funV785oT- zn8Ls}UM2-U@39otQ6>HNk6d?%VLuowvOjPyEGu;b@Ge8qWyS&oFE%fBP52hgP;Ue$ z51$iBB&;KPCU;R8(|e>7i+XrRAG0?`8(`}&4IUoNBDt&AIPf_VHbwSWCu??x@|-kX zN{5YxrpJQ~Hvw^U2eaFIC~002`e|nh;&#BRQW%Dn3*#5f4&1A5Z--}_q@1@vmD9TH zggQ&MX1#}Z&GoWdT94hL)!X6cV<C(e((p)Zm5?gPKq_AXkHXss^>Q1Mr!L>Xg*n zPQ9Sh#9)GY9qjEgq$S|f3>Ji7308n6t?~b~F>buExwTc;L{=~P5+sZ(X9nsNs=e8> zIfSJ1#0NEQ%070U_vXS;IG&uP{JltxOIy+gJ^jkSgJ=7y(>4~_%1fGW=J>{Dd=oCE z%UM7IOUpgdEs(8fUI~!$NWe$Y($e75OI?Y=;^?aAp>hb%GN8ASQ=QjRfrfMV{Bp=i z!n-feCg7 zX&5r!Vir(Wz`VNb8b`i3XI@R;HTklFdP0IA{CB2(Ab1$!}lc*BcyMxsNuh}9yCM(*) zlt|d5RKlZGQ|=tiDYQE#ct&NW?Y|DsT+70U7L4(PSl?FONrG^&ICc5Co@_eDu8K-^ z1J;F!b5w0HwCVm&&fn3uqaEZ_`J4v(mC$6Yc+1OZ)^Epi9MIf0Qo5uaE*o^j0tK}k zcR8{6sJguWrC}IpC`0I&s!`72+J1W5l^xA~fZXej|4t*3YHV$6Y>Mr}PiU46vOjNd>;u0STp>lmB$T4~0O)#*{y$3IL+8XHNeFAW+W~f>g!F{+~;F&Z@ zZ>$~)ysKnnz-5f(25Y+NK~hR`^aNAiVMV^t7pBqNCS?vDDNcUt#jdG@$HLG)2uXWJIkGY@wYl|Z|n*pn%9ibOY}Z%ne*#Wu_gnJmNjgWd30H_zb``h&N{I93xT2= zwrZeVHh}KQDEx8OCWjoQQmlxEYXVA2N)lBoJ#&x-&X{jWsF<0N^6R?0`Zw1XIY2%j ziGSC7Cni4L2Y6K;Tv$YDeh2_3#FDpyZy1=Bo5Po$b~OT8izSn)MQHPV#Lveu40WSc zGue8eJJ*PEI(?BN4Zge0aIpWXepKZ;fmg_&NnQtIS@Yg1dM43au(jf-Tr=D0!{B?c zxp#vPuH5D-mVbefsvkZ2GKl&N%TfrCetxUzdP{dIbmc>yLzynfL{690YD1T9l-5OF zuB*Z3RDgf>GRsWLLu}3`;c#<6!kA);pxg-Ew%@PXmkDk~R$-?8qA7}b#kdXVarYDnyLw%^CVlZ-Ois;S}T1+>0DSuxrIs*>8b^FNg7uwoY2cE zmZ98TJ@JZm($>~d{_3-}b?@W8_|sv?OBu%07TEU)Q%ka5H2~WGi#6)G6l7 zZco*6$RTAt$`&{*FX)h@&yqZ-mJ7%X%_74W#4W(mW}a)E$v9x)#>R$tO=04}I3=oQoknTiG zro4bMq7f>qcYk)o^Y1?xZ%YV&_UxGh$iDzD&@OLzY@F0;)EschEh)p($HxbA=%d9J z=MHe&*9{P^L!R1mnp zqNqs{u^xxmktZ3mR$<6SaRnL^+231a z9}X#ZaO!LUFb$N2chPO7Y_7VdCbl}gv*JWRaURT<&<C^%R}k$iUv%Wz@=h8ZvdgOMF5fzck(gpIO8RT~Jk z9?d}cSdMOuIURsVpV`x{cz0=fXPno4T!ouix;~XdtG>X@dyiF?k4 z*0;1IQ%gq}DMz#Zbp|v4>Q`tNfDuF%i{-AEx=zj5eO3M&&*huh+I?;*aphT?qTqy= zpMV5A00k~!zI1wk{<7(6c^mICh)N|Ttvn{M7V;2`p=4&P z7TMGDfL9(@VmhR=RMP#)+DeZZ8NeNew%_#SCXa@sf{+P1tPY|#En{UAtuF^D#u|e3 zt6z`G=+aC(&_Hub_kc2N2Sm1itRcJ!A`On0T7SGK_rxY#|=11(VQ zE5~$q8@KVC?gH(CN-TIR?Q(uP7K9ris9yb-vQ0+tS=~4HLS$W?G1IyNZuafZHYOTj zX!dsWwKF$%o0OQhPyb@om^j-H@ea9KCe5%cD=UL9ckUoqVfJ-mx+eM8JH)M%5VoLh z(GE(yjD6a!5_H-BDT$!8$3aElrny zFYr_A^S429i|oC-ycr z1CN=^$rPVZPv%xFV4nw6m$g|2H+>X!Q)To5r4-ipszbayrQ4zQ^kRe)0Q%09j<#PXGV_ diff --git a/__tests__/__image_snapshots__/html/hooks-use-render-avatar-js-use-render-avatar-should-render-avatar-1-snap.png b/__tests__/__image_snapshots__/html/hooks-use-render-avatar-js-use-render-avatar-should-render-avatar-1-snap.png deleted file mode 100644 index 30f7f5e65039b58af1bbca1812db7a618dad5ecb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8322 zcmeI2XH-+&n#T_ypeSMklqyP(fV@;G67h{Op!8mCNB{w;fj|I7L_t78iBf~qBs7Ik zf;1ISq=a4+kdE{gT7=BOnLBINx_9P&n3;9Iyq}VD&OZC>y`TMme*fpJ^V~oW&dI^Y z0RR9e;`*OP0KkL<0OpW`Y~Y!TpK8C6Zi=LX92{YS4{j;7KZ!-yJ^)+ zE1UPkAtHyb@g(13KKP7H^KC_`8-y_X3;@ek?;XsI40|y`Q!c%FFhan(M z=p+h;lY{g#dXSb=;iSbq;D6vD+u6%vz&B%-ErsZ3CQ!khR*G_*{wb}~p z_QKCSAA0~U+|Mwav3 zn|4CqCkmbEvPQf;F5~$CIOq_>P9ZiHNZ>FeR??c4!^^k~*&CLoe{NgGYGClpwUliej;+CFk zpb-l>e?|&0;Vt<%*N1|?y^%w)%eF~iVgpQ23|HMcEnXmB)e+ANj%akY`cYCt(}$h_ z^4Tg{xhYWhhK6$LGctV*>CkMdRK} zrwR_M@1T~Vz{YbKZn!O)9dOX+asYKM$-__w=2IX_sCeHR8$U43ynxxbhUiSw8qNdfcxie?WkK%p(g1L_dn+G*IO$>86G)2)BEmb& z3A*X0d2#1N^~z+BpsJY^BI2RidPlW6>0M(%KCTy1o2MQ3RD3Q<{SWW__tzk0g4A}N z3FMdc`er{*vM0Z#5AP{++)Q#NZ|CO{CMLL@I-k2n=SZqHR#JgM zu5`_ryoZd%k2ZFbW^KdgCg){3cQj$>={e@8WCmB|kkD?>4R?f*O{p#z12y`SXlw+Z z&kN_bO(M+DPLXT-iKY?f!Q#Os0)V!pJHL4>wAL6gD-EBJoa!1& zxDLs?$%ohFq4VQwdrk#e6ghS=ryC5}9dEh_CT?UI_QwG}Xu#OX878R}tJR*EsJ%Pw zZGxq*cZ@qv=B$=PQS+v~C-D1^HH9rYt$b!o!`uaf$IUI?))) zcySiRbYuVNx#@N}N|kV*-8C2fUoBw2oHcBKYt()&JdX%vh=PmqrrY+jvld+#IV8%rTDUTS202H6})Umg`i#*1|AbS+?gHqXL9Gz_Q#%Cwmn>%OjQcdt_=y61uQy{ z_>Tge-@4dI0l72Kmh%W5#EZ`08~pjjjqdGW0#3A_?(~U{>_(NiQ`bic1)4F76=hYP z=|WCphjoC1;&@N8Yn0eIWY;(^Fe^Bb%`=M?qufrSeAFSs+6t$qI7p~ z5G}NKNy=n&#hE+Nlr;0n*!aYq4++Ok7U~Ip@VQxZc)dMTuJdK-6P|4r0AJwz)_v?L z?M8QT+H)BnRRFoUrF;~4v08}N9|nYhTPzSHaItxG#V-k!CIH|~iyyNAnKl_Un=M!G zGL@R<;R6+ zdNz{@f796vzZMBmWW;G&)l@>QgC(7oG07XkT_7LZwk)r0`VDo~Mg}RIGaVYMv^)W% zEWBqd#^e)%n*v}+pW z*Fd>i?Un#_@2;`f+Rk+p1n-6SE=nKyq=C&MS8*iJ#?YoJYaUj>vF85|Fd|puDArf~ z$=1O(vHbJ$z}X+5%oeXU(QxgL%gG*PFw&X@j0K4T&&Dk+#AlzBY$gq%?+movieUnn zOx^K)JzhGgkd_P?1qJeAtjlEHGzu-+kawrvqP1qBGcnB&8xKN}Bmm-j^>0v|U26pM z3aXk6GpAke?j{)r+NG}r%l17Q(`mKZb0r<2tU(FB6ZAG#z%@Z1j|)m2`H`%}Sj-## zwHlzQnUOyBM$cC4GI1n~PX$j}+@_le77<-j5&W+?fkD1>Xpzgrn|S)jo-hoqO6xDE z7DJ5cg-_kQ(Ff)#^7BN@>BP2o2nbw zKqL4}?%Ule#jSzl4PH6}#{_-0R%vN;<-DV=fT|f`ANtdKn+`i)9qEcW!Mxex4aoWQ zJ_Pn$%2AB>QV%iT12UIQYnCHYvogM*$D@x3LW(*-giUKcxZ*MC&yd~E?cCn=ZyV2V zjY(AfPT`6)j@=Ot%z6{|h*Mt%B{%m!U^vTLxgB!iL zKjKSZ%N3sq<3b^@%JVYVk0L{R`a@y}4CT{o;T%7MId&iafy|m`v;FNSdMY$2PHnhB zpW++BLnv}tJH<}Lw%2mp-l|9+C6H*c`R5XRZ^ReOhcOY;BX7(ZJ|UaEIk%&CWJTRy zgEl8#)zi~c1FMLno<;cJ(Dpn1xmN^ZK^{a;tCO{O`+S>CC`YLs>>!_|Yel=C2k7dldTb z0#Im=^=N6<=^=%8aJ-`v6~tPemw@9#0BO%>Bd(>9Q$Cg%8a%o09%5en6#Okqz9Zg& zrMhzZi^88RXUWJ}?g)itEe_ydsh67~;}`LsrYgl8e}84=$Bf<1K!Vnx!D$xgMWvma zKjshZdfP4?W|seY#;xXk$$kA9-sN^y0K&)V{pu<@VCR<4(ka1xA1?LWa3{tol)HBs z76wqKwtZx6rz@^wROoCsh0_KH*Jh$!svw&`W5sLm2SRSG((g?lG=F9Hy3@Ys#-f}f zB>zF`QKyw|NGV7i*l9I(e&BKTm#^JFUlaH`R1ob&Ej@ECn^1v#&R6yGZFvn&SlNy_sX9-9=CB^8?^CBhPax zW9%U%N-miym*jQi^mO_n<2q@Rh1$E*=32hQ`)8u$Dr`Y5~9?k%unsX3_p9=iKXlqi~iG-x&9C0HhGd&IIQ&6QKMXQ366S zx&G5%m;fu*-vr~H4QSU;Hm_gT3$X&sjS|!zT^!N-*Ve6;PJGh*gM@pIq;aC@pM21& z(UJy3d6e75sb$^m7O*+f@8(J*bN0JOYrEZs1?GS`aRj{?UeMYzFoQ2!tZ zOV~a_nK^-L$3fCYK*6yb01M1>RN&UBM<8pHgpj$$9VL#CppnaBiHXF!zGZ4bD`8`( zMU(G+_K?-STDLHHCj2g8(>HV4#G14U7m6*h*YY7e zuZXca_b@tA*2u#1opWE2`>G^BO(cKk32(}5W(6&3VaC&-|s?~!d01}c^ z^Y}9EsGulfajAB5Px6AyP5HGcge=a)_`InZalX7ZK|;$uwswzvjxlL(QWa4C0Um8K zAQx2684LV)l4yMe4u?!}1sg2%77zm$l$K)d;w~62G)75RPx2&0^XCp?=-nPajSxnY zkfP6+iD%Nha%N6uJRWQzU5XHDn~>%ydOiE>))xt#{#yId%xi?zY+P1zGo?@AkBRrI zI;J%%Pd8CSyMUW*B3CC`J|l-G0BWNWgi5YLk-XQD3Ev-vMqsht^E-3gmt2#^dh=u7 zygAidk}LWpH9dG1wXr~={}9qlTI&FXL!R-cE-rjC-J6K>JSvpG9D80YCU=oF{3Bfm z-v2yCW1A1a+sOoH=(xHLX}LI0w6zw{U%CzHVQy_MVka=1fI%$}XX$y7D~6jx68cvj z5&QBD!R>_1e&ow3EcD{iuQ7p(XZz0s&^nMu&W$f_wT$9sUMqxZ zG6M%*=;J?@ygNm2Q}^T)cDt`zuM}9JR%j(=e*bBc<)sA+!YR0;PGE};0)zK@(-_S4h2$^qQs_}^++6^CX)ng=r5f*RLpis5R!z)Ael zW`^)p-W&(0gvqBn2HvW)r+m&NoY>@&k>sj)8gFw4g6QfR;;?5zP#7ebwfjJ z*1oX0!T$~pKJ0qB#`EtSA~1|yN^s3?nZOVQ^grVIW*<5-BPfg@1lHx#L7!jq3JsGJ zrJqI)0InalF$fF0!tu@TnZ=+gX>}|dx;GPCW(-WLw{tdS-s&di`Ho*p81{_RX^Jvl zsKLxucoRekv#lzVm;9*o;UrU%$?j-)EBK}fA9ZP|M3sn>F{TA9N$q5Wci&#QBN)7V z<;!@i=%xQ6>|N8MYVqlpBA)l}DF!Ot{zO6To29eb&KLoP?=Kp0eCh3$I>&*5pIK;E98W)z_4Ox=ZBdFzLnb z-zlN#TSf-h4-}NvxKibi(doV~0Q9O=_DgcIGU5J^8cgr?*skToLOBUMSn^^W+TQlG z4JbHuTm%M(*mgG$hhQSb>XSzh%rpt9BIPJB%;5!wPcFzkTc=IRTkh^ot2E|GR+v8~up&(4~PA zIBM8G*X{kvwF1kMoO+g1JUq_5`IZsU(Y^MJoj$WOU~Dtd?unuZOG`_uQed* z2cHJ?&Yd?xn03R}RP}OGwgVv>#9`?4bBiR=1mAoC|F~02r`X3v6$1`^Y_g z3*!Xp$Bcg{x%48zCt$M>apF=Ch^||?HOZ`?v-tK$MgP@%wmv!4zGR@Rn)qJ#u|ZMwa0Z358Ht5$%6M7_I;`4ECUS5~Y#UX5#{oX202Z88ljN&Kz%$W`OesjfUO-$U&&dzq4 zY))w1IS=4voR=>|m$(kRgLzH2nVOiye|IYvC1j{4*rA4eDD&^W#;2tfu8cRiG`={) zr{3PwOwN>)}+US7U+R~^8&u0W{V+}xDWr~K<54$C2%o5KNC6%R8CE2sEm>}$T$cg7kbtF0w~kezLELo5!L`!Sqr4qSze zIXwGOftRBDL$<2)%yy&v6t4!?V|aHqRUMT!T>*gg5cf=0mgpscqZnF`IX0`nx;$-d zH$8Z-au~B|yA%wE!$|>~i+mb>#XBJHn}h;xI5;?9XUh;oBC!n>1RzTSnNyRK=c=Wb zYv_wz5!{gY`1q{-=ym1l_hsYkh_2ttq?DD-^tE9imLOE@vNf;s~ z1}kxF|GgK2e)%6zxN3*^Z2XR?j>imigYh4`sDfZ=a^<&!{ZD`RcclJ%3;9=*e{8M)T9?1p z7k^Ci+e}zaYo8Rt#7;tg_TY!K1lH_ljG>^e0Q>A7bZI|r>-U}dLdVdyb H-+KIS%-vmp diff --git a/__tests__/html/fluentTheme/fluentThemeFallback.dark.html b/__tests__/html/fluentTheme/fluentThemeFallback.dark.html index d43d137ca9..96c6a0642c 100644 --- a/__tests__/html/fluentTheme/fluentThemeFallback.dark.html +++ b/__tests__/html/fluentTheme/fluentThemeFallback.dark.html @@ -114,6 +114,7 @@ expect(document.activeElement).toBe( document.querySelector(`[data-testid="${WebChat.testIds.sendBoxTelephoneKeypadButton1}"]`) ); + await pageConditions.scrollToBottomCompleted(); await host.snapshot(); // THEN: Close keypad diff --git a/__tests__/html/fluentTheme/simple.html b/__tests__/html/fluentTheme/simple.html index fd2dde9f6e..475498d0cf 100644 --- a/__tests__/html/fluentTheme/simple.html +++ b/__tests__/html/fluentTheme/simple.html @@ -40,9 +40,16 @@ await pageConditions.numActivitiesShown(1); // THEN: Fluent theme should be loaded. - expect( - document.querySelector('meta[name="botframework-webchat-fluent-theme:version"]').getAttribute('name') - ).toBeTruthy(); + const buildInfo = Object.fromEntries( + document + .querySelector('head > meta[name="botframework-webchat:fluent-theme"]') + .content.split(';') + .map(value => value.trim().split('=')) + ); + + expect(buildInfo).toHaveProperty('build-tool', 'tsup'); + expect(buildInfo).toHaveProperty('module-format', 'esmodules'); + expect(buildInfo.version).toMatch(/^\d+\.\d+\.\d+($|-)/u); expect(window.WebChat.FluentThemeProvider).toBeTruthy(); diff --git a/__tests__/html/fluentTheme/telephoneKeypad.showHide.html b/__tests__/html/fluentTheme/telephoneKeypad.showHide.html index a212516a7f..7fbfda6343 100644 --- a/__tests__/html/fluentTheme/telephoneKeypad.showHide.html +++ b/__tests__/html/fluentTheme/telephoneKeypad.showHide.html @@ -50,6 +50,7 @@ expect(document.activeElement).toBe( document.querySelector(`[data-testid="${WebChat.testIds.sendBoxTelephoneKeypadButton1}"]`) ); + await pageConditions.scrollToBottomCompleted(); await host.snapshot(); // WHEN: ESCAPE key is pressed. diff --git a/__tests__/html/fluentTheme/telephoneKeypad.tap.html b/__tests__/html/fluentTheme/telephoneKeypad.tap.html index 6b36d34cb0..5e6746f58c 100644 --- a/__tests__/html/fluentTheme/telephoneKeypad.tap.html +++ b/__tests__/html/fluentTheme/telephoneKeypad.tap.html @@ -58,6 +58,7 @@ expect(pageElements.byTestId(WebChat.testIds.sendBoxTelephoneKeypadButton5)).toBeTruthy(); expect(document.activeElement).toBe(pageElements.byTestId(WebChat.testIds.sendBoxTelephoneKeypadButton5)); + await pageConditions.scrollToBottomCompleted(); await host.snapshot(); }); diff --git a/__tests__/html/hooks.useRenderActivity.html b/__tests__/html/hooks.useRenderActivity.html deleted file mode 100644 index 105f7e551c..0000000000 --- a/__tests__/html/hooks.useRenderActivity.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - -
- - - diff --git a/__tests__/html/hooks.useRenderActivity.js b/__tests__/html/hooks.useRenderActivity.js deleted file mode 100644 index b6b8daf6a0..0000000000 --- a/__tests__/html/hooks.useRenderActivity.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('useRenderActivity', () => { - test('should render activity', () => runHTML('hooks.useRenderActivity.html')); -}); diff --git a/__tests__/html/hooks.useRenderActivityStatus.html b/__tests__/html/hooks.useRenderActivityStatus.html deleted file mode 100644 index 7b8142afd5..0000000000 --- a/__tests__/html/hooks.useRenderActivityStatus.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - -
- - - diff --git a/__tests__/html/hooks.useRenderActivityStatus.js b/__tests__/html/hooks.useRenderActivityStatus.js deleted file mode 100644 index 23b0a1a63b..0000000000 --- a/__tests__/html/hooks.useRenderActivityStatus.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('useRenderActivityStatus', () => { - test('should render activity status', () => runHTML('hooks.useRenderActivityStatus.html')); -}); diff --git a/__tests__/html/hooks.useRenderAvatar.html b/__tests__/html/hooks.useRenderAvatar.html deleted file mode 100644 index f236de1cc0..0000000000 --- a/__tests__/html/hooks.useRenderAvatar.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - - - - -
- - - diff --git a/__tests__/html/hooks.useRenderAvatar.js b/__tests__/html/hooks.useRenderAvatar.js deleted file mode 100644 index 5bed854114..0000000000 --- a/__tests__/html/hooks.useRenderAvatar.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('useRenderAvatar', () => { - test('should render avatar', () => runHTML('hooks.useRenderAvatar.html')); -}); diff --git a/__tests__/html/metaTag.webChat.es5.html b/__tests__/html/metaTag.webChat.es5.html index 6ddb42eaa2..1d5e3cda2c 100644 --- a/__tests__/html/metaTag.webChat.es5.html +++ b/__tests__/html/metaTag.webChat.es5.html @@ -17,6 +17,18 @@ expect(document.querySelector('head > meta[name="botframework-webchat:bundle:version"]').content).toMatch( /^\d+\.\d+\.\d+($|-)/u ); + + const buildInfo = Object.fromEntries( + document + .querySelector('head > meta[name="botframework-webchat:bundle"]') + .content.split(';') + .map(value => value.trim().split('=')) + ); + + expect(buildInfo).toHaveProperty('build-tool', 'tsup'); + expect(buildInfo).toHaveProperty('module-format', 'esmodules'); + expect(buildInfo).toHaveProperty('variant', 'full-es5'); + expect(buildInfo.version).toMatch(/^\d+\.\d+\.\d+($|-)/u); }); diff --git a/__tests__/html/metaTag.webChat.full.html b/__tests__/html/metaTag.webChat.full.html index 8d4c838326..6e079adcae 100644 --- a/__tests__/html/metaTag.webChat.full.html +++ b/__tests__/html/metaTag.webChat.full.html @@ -17,6 +17,18 @@ expect(document.querySelector('head > meta[name="botframework-webchat:bundle:version"]').content).toMatch( /^\d+\.\d+\.\d+($|-)/u ); + + const buildInfo = Object.fromEntries( + document + .querySelector('head > meta[name="botframework-webchat:bundle"]') + .content.split(';') + .map(value => value.trim().split('=')) + ); + + expect(buildInfo).toHaveProperty('build-tool', 'tsup'); + expect(buildInfo).toHaveProperty('module-format', 'esmodules'); + expect(buildInfo).toHaveProperty('variant', 'full'); + expect(buildInfo.version).toMatch(/^\d+\.\d+\.\d+($|-)/u); }); diff --git a/__tests__/html/metaTag.webChat.minimal.html b/__tests__/html/metaTag.webChat.minimal.html index 95ec148136..64242c86d8 100644 --- a/__tests__/html/metaTag.webChat.minimal.html +++ b/__tests__/html/metaTag.webChat.minimal.html @@ -17,6 +17,18 @@ expect(document.querySelector('head > meta[name="botframework-webchat:bundle:version"]').content).toMatch( /^\d+\.\d+\.\d+($|-)/u ); + + const buildInfo = Object.fromEntries( + document + .querySelector('head > meta[name="botframework-webchat:bundle"]') + .content.split(';') + .map(value => value.trim().split('=')) + ); + + expect(buildInfo).toHaveProperty('build-tool', 'tsup'); + expect(buildInfo).toHaveProperty('module-format', 'esmodules'); + expect(buildInfo).toHaveProperty('variant', 'minimal'); + expect(buildInfo.version).toMatch(/^\d+\.\d+\.\d+($|-)/u); }); diff --git a/__tests__/html/transcript.legacyActivityMiddleware.passwordInput.html b/__tests__/html/transcript.legacyActivityMiddleware.passwordInput.html index 795733f98f..869b5dbe58 100644 --- a/__tests__/html/transcript.legacyActivityMiddleware.passwordInput.html +++ b/__tests__/html/transcript.legacyActivityMiddleware.passwordInput.html @@ -54,14 +54,14 @@ const { React: { useCallback, useState }, WebChat: { - hooks: { useRenderActivityStatus, useSendPostBack } + hooks: { useCreateActivityStatusRenderer, useSendPostBack } } } = window; const PasswordInputActivity = ({ activity, nextVisibleActivity }) => { const [twoFACode, setTwoFACode] = useState(''); const [submitted, setSubmitted] = useState(false); - const renderActivityStatus = useRenderActivityStatus({ activity, nextVisibleActivity }); + const renderActivityStatus = useCreateActivityStatusRenderer()({ activity, nextVisibleActivity }); const sendPostBack = useSendPostBack(); const handleCodeChange = useCallback( diff --git a/__tests__/html/transcript.legacyActivityMiddleware.reactionButtons.html b/__tests__/html/transcript.legacyActivityMiddleware.reactionButtons.html index d87eb65a34..28a5fc5608 100644 --- a/__tests__/html/transcript.legacyActivityMiddleware.reactionButtons.html +++ b/__tests__/html/transcript.legacyActivityMiddleware.reactionButtons.html @@ -40,7 +40,7 @@ const { React: { useCallback }, WebChat: { - hooks: { useRenderActivityStatus, useSendPostBack } + hooks: { useSendPostBack } } } = window; diff --git a/__tests__/video.js b/__tests__/video.js index 4ffd1ba341..6250972ca5 100644 --- a/__tests__/video.js +++ b/__tests__/video.js @@ -35,7 +35,7 @@ test('video', async () => { await driver.sleep(4000); // Pause the video - await clickButton(driver, By.css('button[title="Pause (k)"]')); + await clickButton(driver, By.css('button[data-title-no-tooltip="Pause"]')); // Jump back for 10 seconds, to get the buffering bar the same await driver.actions().sendKeys('j').perform(); diff --git a/babel.profile.config.json b/babel.profile.config.json new file mode 100644 index 0000000000..eb9a96516a --- /dev/null +++ b/babel.profile.config.json @@ -0,0 +1,4 @@ +{ + "plugins": ["babel-plugin-istanbul"], + "presets": ["@babel/preset-typescript", "@babel/preset-react"] +} diff --git a/esbuildBabelPluginIstanbul.ts b/esbuildBabelPluginIstanbul.ts new file mode 100644 index 0000000000..594ce91037 --- /dev/null +++ b/esbuildBabelPluginIstanbul.ts @@ -0,0 +1,38 @@ +import { transformFileAsync } from '@babel/core'; +import { OnLoadArgs, OnLoadOptions, OnLoadResult, Plugin } from 'esbuild'; +import { join } from 'path'; +import { fileURLToPath } from 'url'; + +export type Predicate = (args: OnLoadArgs) => boolean; + +export type IstanbulPluginConfig = { + filter: OnLoadOptions['filter']; + loader: OnLoadResult['loader']; + name: Plugin['name']; + predicate?: Predicate | undefined; +}; + +export const defaultPredicate: Predicate = args => !args.path.includes('/node_modules/'); + +export const babelPlugin = ({ filter, loader, name, predicate = defaultPredicate }: IstanbulPluginConfig): Plugin => ({ + name, + setup(build) { + build.onLoad({ filter }, async args => { + if (!predicate(args)) { + return; + } + + const result = await transformFileAsync(args.path, { + configFile: join(fileURLToPath(import.meta.url), '../babel.profile.config.json'), + rootMode: 'root', + sourceFileName: args.path + }); + + if (!result?.code) { + throw new Error(`Failed to add instrumentation code to ${args.path}.`); + } + + return { contents: result.code, loader }; + }); + } +}); diff --git a/package-lock.json b/package-lock.json index 528f919d8a..3b3b08b1c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,11 +19,13 @@ "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.19.0", "@types/jest": "^28.1.8", - "@types/react-dom": "~16.8.5", + "@types/react": "^16.14.60", + "@types/react-dom": "^16.9.24", "@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/parser": "^6.13.2", "abort-controller": "^3.0.0", "babel-jest": "^28.1.3", + "babel-plugin-istanbul": "^6.1.1", "concurrently": "^8.2.2", "core-js": "^3.34.0", "cross-env": "^7.0.3", @@ -57,6 +59,7 @@ "serve": "^14.2.1", "serve-handler": "^6.1.5", "strip-ansi": "^6.0.1", + "tsup": "^8.0.2", "typescript": "^5.3.2", "typescript-plugin-css-modules": "^5.1.0", "xmlbuilder": "^15.1.1" @@ -1850,6 +1853,374 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -3693,6 +4064,124 @@ "node": ">=10" } }, + "node_modules/@microsoft/api-extractor": { + "version": "7.43.1", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.43.1.tgz", + "integrity": "sha512-ohg40SsvFFgzHFAtYq5wKJc8ZDyY46bphjtnSvhSSlXpPTG7GHwyyXkn48UZiUCBwr2WC7TRC1Jfwz7nreuiyQ==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@microsoft/api-extractor-model": "7.28.14", + "@microsoft/tsdoc": "0.14.2", + "@microsoft/tsdoc-config": "~0.16.1", + "@rushstack/node-core-library": "4.1.0", + "@rushstack/rig-package": "0.5.2", + "@rushstack/terminal": "0.10.1", + "@rushstack/ts-command-line": "4.19.2", + "lodash": "~4.17.15", + "minimatch": "~3.0.3", + "resolve": "~1.22.1", + "semver": "~7.5.4", + "source-map": "~0.6.1", + "typescript": "5.4.2" + }, + "bin": { + "api-extractor": "bin/api-extractor" + } + }, + "node_modules/@microsoft/api-extractor-model": { + "version": "7.28.14", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.28.14.tgz", + "integrity": "sha512-Bery/c8A8SsKPSvA82cTTuy/+OcxZbLRmKhPkk91/AJOQzxZsShcrmHFAGeiEqSIrv1nPZ3tKq9kfMLdCHmsqg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@microsoft/tsdoc": "0.14.2", + "@microsoft/tsdoc-config": "~0.16.1", + "@rushstack/node-core-library": "4.1.0" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@microsoft/tsdoc": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz", + "integrity": "sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/@microsoft/tsdoc-config": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz", + "integrity": "sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@microsoft/tsdoc": "0.14.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + } + }, + "node_modules/@microsoft/tsdoc-config/node_modules/resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -5364,6 +5853,367 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.16.4.tgz", + "integrity": "sha512-GkhjAaQ8oUTOKE4g4gsZ0u8K/IHU1+2WQSgS1TwTcYvL+sjbaQjNHFXbOJ6kgqGHIO1DfUhI/Sphi9GkRT9K+Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.16.4.tgz", + "integrity": "sha512-Bvm6D+NPbGMQOcxvS1zUl8H7DWlywSXsphAeOnVeiZLQ+0J6Is8T7SrjGTH29KtYkiY9vld8ZnpV3G2EPbom+w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.16.4.tgz", + "integrity": "sha512-i5d64MlnYBO9EkCOGe5vPR/EeDwjnKOGGdd7zKFhU5y8haKhQZTN2DgVtpODDMxUr4t2K90wTUJg7ilgND6bXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.16.4.tgz", + "integrity": "sha512-WZupV1+CdUYehaZqjaFTClJI72fjJEgTXdf4NbW69I9XyvdmztUExBtcI2yIIU6hJtYvtwS6pkTkHJz+k08mAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.16.4.tgz", + "integrity": "sha512-ADm/xt86JUnmAfA9mBqFcRp//RVRt1ohGOYF6yL+IFCYqOBNwy5lbEK05xTsEoJq+/tJzg8ICUtS82WinJRuIw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.16.4.tgz", + "integrity": "sha512-tJfJaXPiFAG+Jn3cutp7mCs1ePltuAgRqdDZrzb1aeE3TktWWJ+g7xK9SNlaSUFw6IU4QgOxAY4rA+wZUT5Wfg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.16.4.tgz", + "integrity": "sha512-7dy1BzQkgYlUTapDTvK997cgi0Orh5Iu7JlZVBy1MBURk7/HSbHkzRnXZa19ozy+wwD8/SlpJnOOckuNZtJR9w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.16.4.tgz", + "integrity": "sha512-zsFwdUw5XLD1gQe0aoU2HVceI6NEW7q7m05wA46eUAyrkeNYExObfRFQcvA6zw8lfRc5BHtan3tBpo+kqEOxmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.16.4.tgz", + "integrity": "sha512-p8C3NnxXooRdNrdv6dBmRTddEapfESEUflpICDNKXpHvTjRRq1J82CbU5G3XfebIZyI3B0s074JHMWD36qOW6w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.16.4.tgz", + "integrity": "sha512-Lh/8ckoar4s4Id2foY7jNgitTOUQczwMWNYi+Mjt0eQ9LKhr6sK477REqQkmy8YHY3Ca3A2JJVdXnfb3Rrwkng==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.16.4.tgz", + "integrity": "sha512-1xwwn9ZCQYuqGmulGsTZoKrrn0z2fAur2ujE60QgyDpHmBbXbxLaQiEvzJWDrscRq43c8DnuHx3QorhMTZgisQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.16.4.tgz", + "integrity": "sha512-LuOGGKAJ7dfRtxVnO1i3qWc6N9sh0Em/8aZ3CezixSTM+E9Oq3OvTsvC4sm6wWjzpsIlOCnZjdluINKESflJLA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.16.4.tgz", + "integrity": "sha512-ch86i7KkJKkLybDP2AtySFTRi5fM3KXp0PnHocHuJMdZwu7BuyIKi35BE9guMlmTpwwBTB3ljHj9IQXnTCD0vA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.16.4.tgz", + "integrity": "sha512-Ma4PwyLfOWZWayfEsNQzTDBVW8PZ6TUUN1uFTBQbF2Chv/+sjenE86lpiEwj2FiviSmSZ4Ap4MaAfl1ciF4aSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.16.4.tgz", + "integrity": "sha512-9m/ZDrQsdo/c06uOlP3W9G2ENRVzgzbSXmXHT4hwVaDQhYcRpi9bgBT0FTG9OhESxwK0WjQxYOSfv40cU+T69w==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.16.4.tgz", + "integrity": "sha512-YunpoOAyGLDseanENHmbFvQSfVL5BxW3k7hhy0eN4rb3gS/ct75dVD0EXOWIqFT/nE8XYW6LP6vz6ctKRi0k9A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rushstack/node-core-library": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-4.1.0.tgz", + "integrity": "sha512-qz4JFBZJCf1YN5cAXa1dP6Mki/HrsQxc/oYGAGx29dF2cwF2YMxHoly0FBhMw3IEnxo5fMj0boVfoHVBkpkx/w==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.22.1", + "semver": "~7.5.4", + "z-schema": "~5.0.2" + }, + "peerDependencies": { + "@types/node": "*" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@rushstack/node-core-library/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@rushstack/node-core-library/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optional": true, + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@rushstack/node-core-library/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@rushstack/node-core-library/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@rushstack/rig-package": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.5.2.tgz", + "integrity": "sha512-mUDecIJeH3yYGZs2a48k+pbhM6JYwWlgjs2Ca5f2n1G2/kgdgP9D/07oglEGf6mRyXEnazhEENeYTSNDRCwdqA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "resolve": "~1.22.1", + "strip-json-comments": "~3.1.1" + } + }, + "node_modules/@rushstack/terminal": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.10.1.tgz", + "integrity": "sha512-C6Vi/m/84IYJTkfzmXr1+W8Wi3MmBjVF/q3za91Gb3VYjKbpALHVxY6FgH625AnDe5Z0Kh4MHKWA3Z7bqgAezA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@rushstack/node-core-library": "4.1.0", + "supports-color": "~8.1.1" + }, + "peerDependencies": { + "@types/node": "*" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@rushstack/terminal/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@rushstack/terminal/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/@rushstack/ts-command-line": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.19.2.tgz", + "integrity": "sha512-cqmXXmBEBlzo9WtyUrHtF9e6kl0LvBY7aTSVX4jfnBfXWZQWnPq9JTFPlQZ+L/ZwjZ4HrNwQsOVvhe9oOucZkw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@rushstack/terminal": "0.10.1", + "@types/argparse": "1.0.38", + "argparse": "~1.0.9", + "string-argv": "~0.3.1" + } + }, "node_modules/@sigstore/bundle": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-1.1.0.tgz", @@ -5744,6 +6594,14 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@types/argparse": { + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", + "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/@types/babel__core": { "version": "7.1.19", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", @@ -5785,6 +6643,12 @@ "@babel/types": "^7.3.0" } }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, "node_modules/@types/graceful-fs": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", @@ -5918,23 +6782,23 @@ "dev": true }, "node_modules/@types/react": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.14.tgz", - "integrity": "sha512-0WwKHUbWuQWOce61UexYuWTGuGY/8JvtUe/dtQ6lR4sZ3UiylHotJeWpf3ArP9+DSGUoLY3wbU59VyMrJps5VQ==", + "version": "16.14.60", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", + "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", "dev": true, "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { - "version": "16.8.5", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.8.5.tgz", - "integrity": "sha512-idCEjROZ2cqh29+trmTmZhsBAUNQuYrF92JHKzZ5+aiFM1mlSk3bb23CK7HhYuOY75Apgap5y2jTyHzaM2AJGA==", + "version": "16.9.24", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.24.tgz", + "integrity": "sha512-Gcmq2JTDheyWn/1eteqyzzWKSqDjYU6KYsIvH7thb7CR5OYInAWOX+7WnKf6PaU/cbdOc4szJItcDEJO7UGmfA==", "dev": true, "dependencies": { - "@types/react": "*" + "@types/react": "^16" } }, "node_modules/@types/scheduler": { @@ -6463,6 +7327,12 @@ "node": ">=4" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "node_modules/anymatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", @@ -7353,6 +8223,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bundle-require": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.3.tgz", + "integrity": "sha512-2iscZ3fcthP2vka4Y7j277YJevwmsby/FpFDwjgw34Nl7dtCpt7zz/4TexmHMzY6KZEih7En9ImlbbgUNNQGtA==", + "dev": true, + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.17" + } + }, "node_modules/byte-size": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-7.0.0.tgz", @@ -7371,6 +8256,15 @@ "node": ">= 0.8" } }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/cacache": { "version": "16.1.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", @@ -9264,6 +10158,44 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -11318,6 +12250,17 @@ "node": ">=4" } }, + "node_modules/import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/import-local": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", @@ -12250,9 +13193,9 @@ } }, "node_modules/jackspeak": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.1.tgz", - "integrity": "sha512-4iSY3Bh1Htv+kLhiiZunUhQ+OYXIn0ze3ulq8JeWrFKmhPAJSySV2+kdtRh2pGcCeF0s6oR8Oc+pYZynJj4t8A==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -14113,6 +15056,23 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -15924,6 +16884,15 @@ "node": ">=8" } }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -15954,6 +16923,22 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -15966,6 +16951,12 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -16769,6 +17760,17 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -19043,12 +20045,12 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", "dev": true, "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { @@ -19059,9 +20061,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -20315,6 +21317,41 @@ "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", "dev": true }, + "node_modules/rollup": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.16.4.tgz", + "integrity": "sha512-kuaTJSUbz+Wsb2ATGvEknkI12XV40vIiHmLuFlejoo7HtDok/O5eDDD0UpCVY5bBX5U5RYo8wWP83H7ZsqVEnA==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.16.4", + "@rollup/rollup-android-arm64": "4.16.4", + "@rollup/rollup-darwin-arm64": "4.16.4", + "@rollup/rollup-darwin-x64": "4.16.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.16.4", + "@rollup/rollup-linux-arm-musleabihf": "4.16.4", + "@rollup/rollup-linux-arm64-gnu": "4.16.4", + "@rollup/rollup-linux-arm64-musl": "4.16.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.16.4", + "@rollup/rollup-linux-riscv64-gnu": "4.16.4", + "@rollup/rollup-linux-s390x-gnu": "4.16.4", + "@rollup/rollup-linux-x64-gnu": "4.16.4", + "@rollup/rollup-linux-x64-musl": "4.16.4", + "@rollup/rollup-win32-arm64-msvc": "4.16.4", + "@rollup/rollup-win32-ia32-msvc": "4.16.4", + "@rollup/rollup-win32-x64-msvc": "4.16.4", + "fsevents": "~2.3.2" + } + }, "node_modules/run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", @@ -21513,6 +22550,92 @@ "node": ">= 8" } }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.6", + "minimatch": "^9.0.1", + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -21720,6 +22843,27 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -21888,6 +23032,12 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, "node_modules/tsconfig-paths": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", @@ -21917,6 +23067,140 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, + "node_modules/tsup": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.0.2.tgz", + "integrity": "sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==", + "dev": true, + "dependencies": { + "bundle-require": "^4.0.0", + "cac": "^6.7.12", + "chokidar": "^3.5.1", + "debug": "^4.3.1", + "esbuild": "^0.19.2", + "execa": "^5.0.0", + "globby": "^11.0.3", + "joycon": "^3.0.1", + "postcss-load-config": "^4.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.0.2", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.20.3", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tsup/node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tsup/node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "node_modules/tsup/node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/tsup/node_modules/yaml": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", + "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/tuf-js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", @@ -22289,9 +23573,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -22584,6 +23868,17 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -23226,6 +24521,39 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/z-schema": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.5.tgz", + "integrity": "sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.7.0" + }, + "bin": { + "z-schema": "bin/z-schema" + }, + "engines": { + "node": ">=8.0.0" + }, + "optionalDependencies": { + "commander": "^9.4.1" + } + }, + "node_modules/z-schema/node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": "^12.20.0 || >=14" + } } }, "dependencies": { @@ -24464,6 +25792,167 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "dev": true, + "optional": true + }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -25861,6 +27350,110 @@ } } }, + "@microsoft/api-extractor": { + "version": "7.43.1", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.43.1.tgz", + "integrity": "sha512-ohg40SsvFFgzHFAtYq5wKJc8ZDyY46bphjtnSvhSSlXpPTG7GHwyyXkn48UZiUCBwr2WC7TRC1Jfwz7nreuiyQ==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@microsoft/api-extractor-model": "7.28.14", + "@microsoft/tsdoc": "0.14.2", + "@microsoft/tsdoc-config": "~0.16.1", + "@rushstack/node-core-library": "4.1.0", + "@rushstack/rig-package": "0.5.2", + "@rushstack/terminal": "0.10.1", + "@rushstack/ts-command-line": "4.19.2", + "lodash": "~4.17.15", + "minimatch": "~3.0.3", + "resolve": "~1.22.1", + "semver": "~7.5.4", + "source-map": "~0.6.1", + "typescript": "5.4.2" + }, + "dependencies": { + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true, + "peer": true + } + } + }, + "@microsoft/api-extractor-model": { + "version": "7.28.14", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.28.14.tgz", + "integrity": "sha512-Bery/c8A8SsKPSvA82cTTuy/+OcxZbLRmKhPkk91/AJOQzxZsShcrmHFAGeiEqSIrv1nPZ3tKq9kfMLdCHmsqg==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@microsoft/tsdoc": "0.14.2", + "@microsoft/tsdoc-config": "~0.16.1", + "@rushstack/node-core-library": "4.1.0" + } + }, + "@microsoft/tsdoc": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz", + "integrity": "sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==", + "dev": true, + "optional": true, + "peer": true + }, + "@microsoft/tsdoc-config": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz", + "integrity": "sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@microsoft/tsdoc": "0.14.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + }, + "dependencies": { + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -27080,6 +28673,238 @@ } } }, + "@rollup/rollup-android-arm-eabi": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.16.4.tgz", + "integrity": "sha512-GkhjAaQ8oUTOKE4g4gsZ0u8K/IHU1+2WQSgS1TwTcYvL+sjbaQjNHFXbOJ6kgqGHIO1DfUhI/Sphi9GkRT9K+Q==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm64": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.16.4.tgz", + "integrity": "sha512-Bvm6D+NPbGMQOcxvS1zUl8H7DWlywSXsphAeOnVeiZLQ+0J6Is8T7SrjGTH29KtYkiY9vld8ZnpV3G2EPbom+w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-arm64": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.16.4.tgz", + "integrity": "sha512-i5d64MlnYBO9EkCOGe5vPR/EeDwjnKOGGdd7zKFhU5y8haKhQZTN2DgVtpODDMxUr4t2K90wTUJg7ilgND6bXw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-x64": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.16.4.tgz", + "integrity": "sha512-WZupV1+CdUYehaZqjaFTClJI72fjJEgTXdf4NbW69I9XyvdmztUExBtcI2yIIU6hJtYvtwS6pkTkHJz+k08mAQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.16.4.tgz", + "integrity": "sha512-ADm/xt86JUnmAfA9mBqFcRp//RVRt1ohGOYF6yL+IFCYqOBNwy5lbEK05xTsEoJq+/tJzg8ICUtS82WinJRuIw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-musleabihf": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.16.4.tgz", + "integrity": "sha512-tJfJaXPiFAG+Jn3cutp7mCs1ePltuAgRqdDZrzb1aeE3TktWWJ+g7xK9SNlaSUFw6IU4QgOxAY4rA+wZUT5Wfg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.16.4.tgz", + "integrity": "sha512-7dy1BzQkgYlUTapDTvK997cgi0Orh5Iu7JlZVBy1MBURk7/HSbHkzRnXZa19ozy+wwD8/SlpJnOOckuNZtJR9w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-musl": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.16.4.tgz", + "integrity": "sha512-zsFwdUw5XLD1gQe0aoU2HVceI6NEW7q7m05wA46eUAyrkeNYExObfRFQcvA6zw8lfRc5BHtan3tBpo+kqEOxmg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.16.4.tgz", + "integrity": "sha512-p8C3NnxXooRdNrdv6dBmRTddEapfESEUflpICDNKXpHvTjRRq1J82CbU5G3XfebIZyI3B0s074JHMWD36qOW6w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-riscv64-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.16.4.tgz", + "integrity": "sha512-Lh/8ckoar4s4Id2foY7jNgitTOUQczwMWNYi+Mjt0eQ9LKhr6sK477REqQkmy8YHY3Ca3A2JJVdXnfb3Rrwkng==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-s390x-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.16.4.tgz", + "integrity": "sha512-1xwwn9ZCQYuqGmulGsTZoKrrn0z2fAur2ujE60QgyDpHmBbXbxLaQiEvzJWDrscRq43c8DnuHx3QorhMTZgisQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-gnu": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.16.4.tgz", + "integrity": "sha512-LuOGGKAJ7dfRtxVnO1i3qWc6N9sh0Em/8aZ3CezixSTM+E9Oq3OvTsvC4sm6wWjzpsIlOCnZjdluINKESflJLA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-musl": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.16.4.tgz", + "integrity": "sha512-ch86i7KkJKkLybDP2AtySFTRi5fM3KXp0PnHocHuJMdZwu7BuyIKi35BE9guMlmTpwwBTB3ljHj9IQXnTCD0vA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-arm64-msvc": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.16.4.tgz", + "integrity": "sha512-Ma4PwyLfOWZWayfEsNQzTDBVW8PZ6TUUN1uFTBQbF2Chv/+sjenE86lpiEwj2FiviSmSZ4Ap4MaAfl1ciF4aSA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-ia32-msvc": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.16.4.tgz", + "integrity": "sha512-9m/ZDrQsdo/c06uOlP3W9G2ENRVzgzbSXmXHT4hwVaDQhYcRpi9bgBT0FTG9OhESxwK0WjQxYOSfv40cU+T69w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-x64-msvc": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.16.4.tgz", + "integrity": "sha512-YunpoOAyGLDseanENHmbFvQSfVL5BxW3k7hhy0eN4rb3gS/ct75dVD0EXOWIqFT/nE8XYW6LP6vz6ctKRi0k9A==", + "dev": true, + "optional": true + }, + "@rushstack/node-core-library": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-4.1.0.tgz", + "integrity": "sha512-qz4JFBZJCf1YN5cAXa1dP6Mki/HrsQxc/oYGAGx29dF2cwF2YMxHoly0FBhMw3IEnxo5fMj0boVfoHVBkpkx/w==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.22.1", + "semver": "~7.5.4", + "z-schema": "~5.0.2" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "optional": true, + "peer": true + } + } + }, + "@rushstack/rig-package": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.5.2.tgz", + "integrity": "sha512-mUDecIJeH3yYGZs2a48k+pbhM6JYwWlgjs2Ca5f2n1G2/kgdgP9D/07oglEGf6mRyXEnazhEENeYTSNDRCwdqA==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "resolve": "~1.22.1", + "strip-json-comments": "~3.1.1" + } + }, + "@rushstack/terminal": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.10.1.tgz", + "integrity": "sha512-C6Vi/m/84IYJTkfzmXr1+W8Wi3MmBjVF/q3za91Gb3VYjKbpALHVxY6FgH625AnDe5Z0Kh4MHKWA3Z7bqgAezA==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@rushstack/node-core-library": "4.1.0", + "supports-color": "~8.1.1" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true, + "peer": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@rushstack/ts-command-line": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.19.2.tgz", + "integrity": "sha512-cqmXXmBEBlzo9WtyUrHtF9e6kl0LvBY7aTSVX4jfnBfXWZQWnPq9JTFPlQZ+L/ZwjZ4HrNwQsOVvhe9oOucZkw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@rushstack/terminal": "0.10.1", + "@types/argparse": "1.0.38", + "argparse": "~1.0.9", + "string-argv": "~0.3.1" + } + }, "@sigstore/bundle": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-1.1.0.tgz", @@ -27379,6 +29204,14 @@ } } }, + "@types/argparse": { + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", + "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==", + "dev": true, + "optional": true, + "peer": true + }, "@types/babel__core": { "version": "7.1.19", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", @@ -27420,6 +29253,12 @@ "@babel/types": "^7.3.0" } }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, "@types/graceful-fs": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", @@ -27553,23 +29392,23 @@ "dev": true }, "@types/react": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.14.tgz", - "integrity": "sha512-0WwKHUbWuQWOce61UexYuWTGuGY/8JvtUe/dtQ6lR4sZ3UiylHotJeWpf3ArP9+DSGUoLY3wbU59VyMrJps5VQ==", + "version": "16.14.60", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", + "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", "dev": true, "requires": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, "@types/react-dom": { - "version": "16.8.5", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.8.5.tgz", - "integrity": "sha512-idCEjROZ2cqh29+trmTmZhsBAUNQuYrF92JHKzZ5+aiFM1mlSk3bb23CK7HhYuOY75Apgap5y2jTyHzaM2AJGA==", + "version": "16.9.24", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.24.tgz", + "integrity": "sha512-Gcmq2JTDheyWn/1eteqyzzWKSqDjYU6KYsIvH7thb7CR5OYInAWOX+7WnKf6PaU/cbdOc4szJItcDEJO7UGmfA==", "dev": true, "requires": { - "@types/react": "*" + "@types/react": "^16" } }, "@types/scheduler": { @@ -27944,6 +29783,12 @@ "color-convert": "^1.9.0" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "anymatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", @@ -28580,6 +30425,15 @@ "run-applescript": "^5.0.0" } }, + "bundle-require": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.3.tgz", + "integrity": "sha512-2iscZ3fcthP2vka4Y7j277YJevwmsby/FpFDwjgw34Nl7dtCpt7zz/4TexmHMzY6KZEih7En9ImlbbgUNNQGtA==", + "dev": true, + "requires": { + "load-tsconfig": "^0.2.3" + } + }, "byte-size": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-7.0.0.tgz", @@ -28592,6 +30446,12 @@ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", "dev": true }, + "cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true + }, "cacache": { "version": "16.1.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", @@ -30015,6 +31875,37 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -31528,6 +33419,14 @@ } } }, + "import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "dev": true, + "optional": true, + "peer": true + }, "import-local": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", @@ -32201,9 +34100,9 @@ } }, "jackspeak": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.1.tgz", - "integrity": "sha512-4iSY3Bh1Htv+kLhiiZunUhQ+OYXIn0ze3ulq8JeWrFKmhPAJSySV2+kdtRh2pGcCeF0s6oR8Oc+pYZynJj4t8A==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, "requires": { "@isaacs/cliui": "^8.0.2", @@ -33570,6 +35469,20 @@ } } }, + "jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", + "dev": true, + "optional": true, + "peer": true + }, + "joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -34945,6 +36858,12 @@ } } }, + "load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true + }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -34972,6 +36891,22 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "dev": true, + "optional": true, + "peer": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "dev": true, + "optional": true, + "peer": true + }, "lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -34984,6 +36919,12 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true + }, "log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -35566,6 +37507,17 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -37283,19 +39235,19 @@ "dev": true }, "path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", "dev": true, "requires": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "dependencies": { "lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true }, "minipass": { @@ -38225,6 +40177,32 @@ } } }, + "rollup": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.16.4.tgz", + "integrity": "sha512-kuaTJSUbz+Wsb2ATGvEknkI12XV40vIiHmLuFlejoo7HtDok/O5eDDD0UpCVY5bBX5U5RYo8wWP83H7ZsqVEnA==", + "dev": true, + "requires": { + "@rollup/rollup-android-arm-eabi": "4.16.4", + "@rollup/rollup-android-arm64": "4.16.4", + "@rollup/rollup-darwin-arm64": "4.16.4", + "@rollup/rollup-darwin-x64": "4.16.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.16.4", + "@rollup/rollup-linux-arm-musleabihf": "4.16.4", + "@rollup/rollup-linux-arm64-gnu": "4.16.4", + "@rollup/rollup-linux-arm64-musl": "4.16.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.16.4", + "@rollup/rollup-linux-riscv64-gnu": "4.16.4", + "@rollup/rollup-linux-s390x-gnu": "4.16.4", + "@rollup/rollup-linux-x64-gnu": "4.16.4", + "@rollup/rollup-linux-x64-musl": "4.16.4", + "@rollup/rollup-win32-arm64-msvc": "4.16.4", + "@rollup/rollup-win32-ia32-msvc": "4.16.4", + "@rollup/rollup-win32-x64-msvc": "4.16.4", + "@types/estree": "1.0.5", + "fsevents": "~2.3.2" + } + }, "run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", @@ -39147,6 +41125,66 @@ } } }, + "sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true + }, + "glob": { + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", + "dev": true, + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.6", + "minimatch": "^9.0.1", + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" + } + }, + "minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true + } + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -39298,6 +41336,24 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -39423,6 +41479,12 @@ "dev": true, "requires": {} }, + "ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, "tsconfig-paths": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", @@ -39448,6 +41510,81 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, + "tsup": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.0.2.tgz", + "integrity": "sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==", + "dev": true, + "requires": { + "bundle-require": "^4.0.0", + "cac": "^6.7.12", + "chokidar": "^3.5.1", + "debug": "^4.3.1", + "esbuild": "^0.19.2", + "execa": "^5.0.0", + "globby": "^11.0.3", + "joycon": "^3.0.1", + "postcss-load-config": "^4.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.0.2", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.20.3", + "tree-kill": "^1.2.2" + }, + "dependencies": { + "postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "dev": true, + "requires": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + } + }, + "source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "requires": { + "whatwg-url": "^7.0.0" + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "yaml": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", + "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "dev": true + } + } + }, "tuf-js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", @@ -39731,9 +41868,9 @@ "dev": true }, "typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true }, "typescript-plugin-css-modules": { @@ -39951,6 +42088,14 @@ "builtins": "^5.0.0" } }, + "validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "dev": true, + "optional": true, + "peer": true + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -40438,6 +42583,30 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true + }, + "z-schema": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.5.tgz", + "integrity": "sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "commander": "^9.4.1", + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.7.0" + }, + "dependencies": { + "commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "optional": true, + "peer": true + } + } } } } diff --git a/package.json b/package.json index 4b6d1338d9..8bb54fabb0 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "docker:up": "docker-compose -f docker-compose-wsl2.yml down && docker-compose -f docker-compose-wsl2.yml up --build --scale chrome=4", "eslint": "npm run precommit", "lint-staged": "lint-staged", + "pack-all": "npx lerna exec --scope=botframework* -- npm pack --pack-destination=$PWD && zip tarball.zip *.tgz", "precommit": "lerna run --parallel --stream precommit -- ", "precommit:eslint:api": "cd packages && cd api && npm run precommit:eslint", "precommit:eslint:bundle": "cd packages && cd bundle && npm run precommit:eslint", @@ -57,6 +58,7 @@ "precommit:typecheck:bundle": "cd packages && cd bundle && npm run precommit:typecheck", "precommit:typecheck:component": "cd packages && cd component && npm run precommit:typecheck", "precommit:typecheck:core": "cd packages && cd core && npm run precommit:typecheck", + "precommit:typecheck:fluent-theme": "cd packages && cd fluent-theme && npm run precommit:typecheck", "prepare": "husky install", "start": "concurrently --kill-others --raw \"serve -p 5000\" \"lerna run --ignore playground --parallel --stream start\"", "start:docker": "echo This command has been renamed to \"npm run docker\" && npm run docker", @@ -89,9 +91,13 @@ "28", "pinned jest@28" ], + "@types/react": [ + "16", + "react@16.8.6 is our baseline" + ], "@types/react-dom": [ - "~16.8.5", - "using react@16.8.6 to make sure this is the minimum supported version" + "16", + "react@16.8.6 is our baseline" ], "babel-jest": [ "28", @@ -137,11 +143,13 @@ "@babel/preset-typescript": "^7.18.6", "@babel/runtime": "^7.19.0", "@types/jest": "^28.1.8", - "@types/react-dom": "~16.8.5", + "@types/react": "^16.14.60", + "@types/react-dom": "^16.9.24", "@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/parser": "^6.13.2", "abort-controller": "^3.0.0", "babel-jest": "^28.1.3", + "babel-plugin-istanbul": "^6.1.1", "concurrently": "^8.2.2", "core-js": "^3.34.0", "cross-env": "^7.0.3", @@ -175,6 +183,7 @@ "serve": "^14.2.1", "serve-handler": "^6.1.5", "strip-ansi": "^6.0.1", + "tsup": "^8.0.2", "typescript": "^5.3.2", "typescript-plugin-css-modules": "^5.1.0", "xmlbuilder": "^15.1.1" diff --git a/packages/api/.gitignore b/packages/api/.gitignore index d5e6cb6e00..2c682dccd0 100644 --- a/packages/api/.gitignore +++ b/packages/api/.gitignore @@ -1,3 +1,5 @@ /*.tgz -/lib -/node_modules +/dist/ +/lib/ +/node_modules/ +/src/external/ diff --git a/packages/api/babel.config.json b/packages/api/babel.config.json index 8a8974b980..354e5edbc5 100644 --- a/packages/api/babel.config.json +++ b/packages/api/babel.config.json @@ -26,7 +26,7 @@ [ "transform-inline-environment-variables", { - "include": ["npm_package_version"] + "include": ["build_tool", "module_format", "npm_package_version"] } ] ], diff --git a/packages/api/internal.js b/packages/api/internal.js new file mode 100644 index 0000000000..2a05a7c53f --- /dev/null +++ b/packages/api/internal.js @@ -0,0 +1,3 @@ +// This is required for Webpack 4 which does not support named exports. +// eslint-disable-next-line no-undef +module.exports = require('./lib/internal'); diff --git a/packages/api/package-lock.json b/packages/api/package-lock.json index 4631230e3b..dc1b1cf0c1 100644 --- a/packages/api/package-lock.json +++ b/packages/api/package-lock.json @@ -27,7 +27,7 @@ "@babel/preset-typescript": "^7.18.6", "@types/dom-speech-recognition": "^0.0.4", "@types/node": "^20.10.3", - "@types/react": "^18.2.42", + "@types/react": "^16.14.60", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-transform-inline-environment-variables": "^0.4.4", "concurrently": "^8.2.2", @@ -1874,6 +1874,109 @@ "node": ">=6.9.0" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "peer": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "peer": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "peer": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1954,6 +2057,17 @@ "dev": true, "optional": true }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@types/dom-speech-recognition": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/@types/dom-speech-recognition/-/dom-speech-recognition-0.0.4.tgz", @@ -1984,12 +2098,12 @@ "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" }, "node_modules/@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "16.14.60", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", + "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, @@ -2067,6 +2181,16 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/axios": { + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "dev": true, + "peer": true, + "dependencies": { + "follow-redirects": "^1.14.8" + } + }, "node_modules/babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", @@ -2213,6 +2337,16 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -2287,6 +2421,84 @@ "fsevents": "~2.3.2" } }, + "node_modules/cldr-data": { + "version": "36.0.2", + "resolved": "https://registry.npmjs.org/cldr-data/-/cldr-data-36.0.2.tgz", + "integrity": "sha512-JaZY8l0LuJNqc8USVrFPH0KWkYCRxYUB34ALr3TZFHOXDS3R4x5M49d/NTp8Cbucjh2l1Xk2cl9yif1RdWBGBw==", + "dev": true, + "hasInstallScript": true, + "peer": true, + "dependencies": { + "cldr-data-downloader": "1.0.0-1", + "glob": "10.3.12" + } + }, + "node_modules/cldr-data-downloader": { + "version": "1.0.0-1", + "resolved": "https://registry.npmjs.org/cldr-data-downloader/-/cldr-data-downloader-1.0.0-1.tgz", + "integrity": "sha512-jskJncLkJlkBCdqdgzLSV9sOOLyEdeVOtwJOwVwRyliVJ+4822KZWvfaD620c9Lk7el3auwFDg92FXYjGA5BhQ==", + "dev": true, + "peer": true, + "dependencies": { + "axios": "^0.26.0", + "mkdirp": "0.5.5", + "nopt": "3.0.x", + "q": "1.0.1", + "yauzl": "^2.10.0" + }, + "bin": { + "cldr-data-downloader": "bin/download.sh" + } + }, + "node_modules/cldr-data/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cldr-data/node_modules/glob": { + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", + "dev": true, + "peer": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.6", + "minimatch": "^9.0.1", + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cldr-data/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/cldrjs": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.5.tgz", @@ -2491,6 +2703,21 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/csstype": { "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", @@ -2575,6 +2802,13 @@ "xtend": "^4.0.0" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "peer": true + }, "node_modules/electron-to-chromium": { "version": "1.4.262", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.262.tgz", @@ -2725,6 +2959,16 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "peer": true, + "dependencies": { + "pend": "~1.2.0" + } + }, "node_modules/filewatcher": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/filewatcher/-/filewatcher-3.0.1.tgz", @@ -2760,6 +3004,44 @@ "node": ">=8" } }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "peer": true, + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "peer": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs-readdir-recursive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", @@ -3118,6 +3400,25 @@ "semver": "bin/semver.js" } }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "peer": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3243,6 +3544,29 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "peer": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -3462,12 +3786,56 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", + "dev": true, + "peer": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "peer": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "peer": true + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -3506,6 +3874,29 @@ "react-is": "^16.13.1" } }, + "node_modules/q": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.0.1.tgz", + "integrity": "sha512-18MnBaCeBX9sLRUdtxz/6onlb7wLzFxCylklyO8n27y5JxJYaGLPu4ccyc5zih58SpEzY8QmfwaWqguqXU6Y+A==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react-chain-of-responsibility": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/react-chain-of-responsibility/-/react-chain-of-responsibility-0.1.0.tgz", @@ -3519,6 +3910,19 @@ "react": ">=16.8.0" } }, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -3697,6 +4101,15 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, "node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -3706,6 +4119,29 @@ "semver": "bin/semver" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/shell-quote": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", @@ -3721,6 +4157,19 @@ "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", "dev": true }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/simple-update-in": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/simple-update-in/-/simple-update-in-2.2.0.tgz", @@ -3761,6 +4210,22 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -3773,6 +4238,20 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -4003,6 +4482,61 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "peer": true + }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -4092,6 +4626,17 @@ "engines": { "node": ">=12" } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "peer": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } } }, "dependencies": { @@ -5362,6 +5907,78 @@ "to-fast-properties": "^2.0.0" } }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "peer": true, + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "peer": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "peer": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "peer": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "peer": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "peer": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "peer": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + } + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -5427,6 +6044,14 @@ "dev": true, "optional": true }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "peer": true + }, "@types/dom-speech-recognition": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/@types/dom-speech-recognition/-/dom-speech-recognition-0.0.4.tgz", @@ -5457,12 +6082,12 @@ "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" }, "@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "16.14.60", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", + "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", "requires": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, @@ -5533,6 +6158,16 @@ "sprintf-js": "~1.0.2" } }, + "axios": { + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "dev": true, + "peer": true, + "requires": { + "follow-redirects": "^1.14.8" + } + }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", @@ -5644,6 +6279,13 @@ "update-browserslist-db": "^1.0.9" } }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "peer": true + }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -5694,6 +6336,67 @@ "readdirp": "~3.6.0" } }, + "cldr-data": { + "version": "36.0.2", + "resolved": "https://registry.npmjs.org/cldr-data/-/cldr-data-36.0.2.tgz", + "integrity": "sha512-JaZY8l0LuJNqc8USVrFPH0KWkYCRxYUB34ALr3TZFHOXDS3R4x5M49d/NTp8Cbucjh2l1Xk2cl9yif1RdWBGBw==", + "dev": true, + "peer": true, + "requires": { + "cldr-data-downloader": "1.0.0-1", + "glob": "10.3.12" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "peer": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", + "dev": true, + "peer": true, + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.6", + "minimatch": "^9.0.1", + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" + } + }, + "minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "peer": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, + "cldr-data-downloader": { + "version": "1.0.0-1", + "resolved": "https://registry.npmjs.org/cldr-data-downloader/-/cldr-data-downloader-1.0.0-1.tgz", + "integrity": "sha512-jskJncLkJlkBCdqdgzLSV9sOOLyEdeVOtwJOwVwRyliVJ+4822KZWvfaD620c9Lk7el3auwFDg92FXYjGA5BhQ==", + "dev": true, + "peer": true, + "requires": { + "axios": "^0.26.0", + "mkdirp": "0.5.5", + "nopt": "3.0.x", + "q": "1.0.1", + "yauzl": "^2.10.0" + } + }, "cldrjs": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.5.tgz", @@ -5845,6 +6548,18 @@ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.36.1.tgz", "integrity": "sha512-NXCvHvSVYSrewP0L5OhltzXeWFJLo2AL2TYnj6iLV3Bw8mM62wAQMNgUCRI6EBu6hVVpbCxmOPlxh1Ikw2PfUA==" }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "peer": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "csstype": { "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", @@ -5905,6 +6620,13 @@ "xtend": "^4.0.0" } }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "peer": true + }, "electron-to-chromium": { "version": "1.4.262", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.262.tgz", @@ -6014,6 +6736,16 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "peer": true, + "requires": { + "pend": "~1.2.0" + } + }, "filewatcher": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/filewatcher/-/filewatcher-3.0.1.tgz", @@ -6043,6 +6775,24 @@ "path-exists": "^4.0.0" } }, + "follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "dev": true, + "peer": true + }, + "foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "peer": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + } + }, "fs-readdir-recursive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", @@ -6308,6 +7058,17 @@ } } }, + "jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "peer": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -6403,6 +7164,23 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "peer": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "peer": true, + "requires": { + "minimist": "^1.2.5" + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -6566,12 +7344,46 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "peer": true + }, "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-scurry": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", + "dev": true, + "peer": true, + "requires": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "peer": true + } + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "peer": true + }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -6601,6 +7413,22 @@ "react-is": "^16.13.1" } }, + "q": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.0.1.tgz", + "integrity": "sha512-18MnBaCeBX9sLRUdtxz/6onlb7wLzFxCylklyO8n27y5JxJYaGLPu4ccyc5zih58SpEzY8QmfwaWqguqXU6Y+A==", + "dev": true, + "peer": true + }, + "react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0" + } + }, "react-chain-of-responsibility": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/react-chain-of-responsibility/-/react-chain-of-responsibility-0.1.0.tgz", @@ -6611,6 +7439,16 @@ "react-chain-of-responsibility": "^0.1.0" } }, + "react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + } + }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -6755,12 +7593,38 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0" + } + }, "semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "peer": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "peer": true + }, "shell-quote": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", @@ -6773,6 +7637,13 @@ "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", "dev": true }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "peer": true + }, "simple-update-in": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/simple-update-in/-/simple-update-in-2.2.0.tgz", @@ -6807,6 +7678,18 @@ "strip-ansi": "^6.0.1" } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "peer": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -6816,6 +7699,16 @@ "ansi-regex": "^5.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "peer": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -6992,6 +7885,47 @@ } } }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "peer": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "peer": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "peer": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "peer": true + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -7036,6 +7970,17 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "peer": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } } } } diff --git a/packages/api/package.json b/packages/api/package.json index 4629839b30..d368ba194e 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -2,8 +2,30 @@ "name": "botframework-webchat-api", "version": "0.0.0-0", "description": "React DOM component of botframework-webchat", - "main": "lib/index.js", - "typings": "lib/index.d.ts", + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/botframework-webchat-api.d.mts", + "default": "./dist/botframework-webchat-api.mjs" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + }, + "./internal": { + "import": { + "types": "./dist/botframework-webchat-api.internal.d.mts", + "default": "./dist/botframework-webchat-api.internal.mjs" + }, + "require": { + "types": "./lib/internal.d.ts", + "default": "./lib/internal.js" + } + } + }, "publishConfig": { "access": "public" }, @@ -17,15 +39,18 @@ "url": "https://github.com/microsoft/BotFramework-WebChat/issues" }, "files": [ - "lib/**/*", - "src/**/*" + "./dist/**/*", + "./internal.js", + "./lib/**/*", + "./src/**/*" ], "homepage": "https://github.com/microsoft/BotFramework-WebChat/tree/main/packages/component#readme", "scripts": { "auditfix": "npm audit fix --legacy-peer-deps || exit 0", - "build": "npm run build:globalize && npm run build:typescript && npm run build:babel", - "build:babel": "babel src --copy-files --extensions .js,.ts,.tsx --ignore **/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.ts,**/*.test.tsx,__tests__/**/*.js,__tests__/**/*.ts,__tests__/**/*.tsx --no-copy-ignored --out-dir lib --verbose", + "build": "npm run build:globalize && npm run build:tsup && npm run build:typescript && npm run build:babel", + "build:babel": "build_tool=babel module_format=commonjs babel src --copy-files --extensions .js,.ts,.tsx --ignore **/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.ts,**/*.test.tsx,__tests__/**/*.js,__tests__/**/*.ts,__tests__/**/*.tsx --no-copy-ignored --out-dir lib --verbose", "build:globalize": "node scripts/createPrecompiledGlobalize.mjs", + "build:tsup": "tsup --config ./tsup.config.ts", "build:typescript": "tsc --project src/tsconfig.json", "bump": "npm run bump:prod && npm run bump:dev && npm run bump:auditfix", "bump:auditfix": "npm audit fix --legacy-peer-deps || exit 0", @@ -40,9 +65,10 @@ "precommit:eslint": "../../node_modules/.bin/eslint --report-unused-disable-directives --max-warnings 0", "precommit:typecheck": "tsc --project ./src --emitDeclarationOnly false --esModuleInterop true --noEmit --pretty false", "prestart": "npm run build:babel", - "start": "concurrently --kill-others --names \"babel,globalize,tsc\" \"npm run start:babel\" \"npm run start:globalize\" \"npm run start:typescript\"", + "start": "concurrently --kill-others --names \"babel,globalize,tsc\" \"npm run start:babel\" \"npm run start:globalize\" \"npm run start:typescript\" \"npm run start:tsup\"", "start:babel": "npm run build:babel -- --skip-initial-build --watch", "start:globalize": "node-dev --respawn scripts/createPrecompiledGlobalize.mjs", + "start:tsup": "npm run build:tsup -- --watch", "start:typescript": "npm run build:typescript -- --watch" }, "devDependencies": { @@ -53,7 +79,7 @@ "@babel/preset-typescript": "^7.18.6", "@types/dom-speech-recognition": "^0.0.4", "@types/node": "^20.10.3", - "@types/react": "^18.2.42", + "@types/react": "^16.14.60", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-transform-inline-environment-variables": "^0.4.4", "cldr-data": "36.0.0-0", @@ -108,6 +134,10 @@ "7.18.6", "@babel/*@7.21 is causing out-of-memory (OOM) issues" ], + "@types/react": [ + "16", + "react@16.8.6 is our baseline" + ], "react-redux": [ "7" ] diff --git a/packages/api/scripts/createPrecompiledGlobalize.mjs b/packages/api/scripts/createPrecompiledGlobalize.mjs index ed7e4efe9f..152ef172c1 100644 --- a/packages/api/scripts/createPrecompiledGlobalize.mjs +++ b/packages/api/scripts/createPrecompiledGlobalize.mjs @@ -1,12 +1,12 @@ -import { cwd } from 'process'; +import cldrData from 'cldr-data'; import { existsSync } from 'fs'; -import { fileURLToPath } from 'url'; import { mkdir, readFile, writeFile } from 'fs/promises'; -import { relative } from 'path'; -import cldrData from 'cldr-data'; import Globalize from 'globalize'; import globalizeCompiler from 'globalize-compiler'; +import { relative } from 'path'; import Prettier from 'prettier'; +import { cwd } from 'process'; +import { fileURLToPath } from 'url'; (async function () { const overridesJSON = JSON.parse( @@ -39,11 +39,22 @@ import Prettier from 'prettier'; ]; }, []); - const code = await Prettier.format(globalizeCompiler.compile(formattersAndParsers), { parser: 'babel' }); - const outputFileURL = new URL('../lib/external/PrecompiledGlobalize.js', import.meta.url); + const code = await Prettier.format( + globalizeCompiler.compile(formattersAndParsers, { + template: ({ code, dependencies }) => + ` +const Globalize = require('globalize/dist/globalize-runtime'); + +${dependencies.map(name => `require('globalize/dist/${name}');`).join('\n')} - // globalize-compiler is emitting AMD code, pointing to "globalize-runtime" instead of "globalize/dist/globalize-runtime" - const patchedCode = code.replace(/"globalize-runtime\//gu, '"globalize/dist/globalize-runtime/'); +${code} + +module.exports = Globalize; +` + }), + { parser: 'babel' } + ); + const outputFileURL = new URL('../src/external/PrecompiledGlobalize.cjs', import.meta.url); // False-positive: import.meta.url is fixed and should be secure. // eslint-disable-next-line security/detect-non-literal-fs-filename @@ -55,7 +66,7 @@ import Prettier from 'prettier'; // False-positive: import.meta.url is fixed and should be secure. // eslint-disable-next-line security/detect-non-literal-fs-filename - await writeFile(outputFileURL, patchedCode); + await writeFile(outputFileURL, code); // eslint-disable-next-line no-console console.log(`Successfully compiled globalize to ${relative(cwd(), fileURLToPath(outputFileURL))}.`); diff --git a/packages/api/src/hooks/Composer.tsx b/packages/api/src/hooks/Composer.tsx index ea82c224c6..ebe10bc557 100644 --- a/packages/api/src/hooks/Composer.tsx +++ b/packages/api/src/hooks/Composer.tsx @@ -59,7 +59,7 @@ import ScrollToEndButtonMiddleware, { ScrollToEndButtonComponentFactory } from ' import TelemetryMeasurementEvent, { TelemetryExceptionMeasurementEvent } from '../types/TelemetryMeasurementEvent'; import ToastMiddleware from '../types/ToastMiddleware'; import TypingIndicatorMiddleware from '../types/TypingIndicatorMiddleware'; -import { type ContextOf } from '../types/internal/ContextOf'; +import { type ContextOf } from '../types/ContextOf'; import createCustomEvent from '../utils/createCustomEvent'; import isObject from '../utils/isObject'; import mapMap from '../utils/mapMap'; @@ -82,7 +82,7 @@ import observableToPromise from './utils/observableToPromise'; // PrecompileGlobalize is a generated file and is not ES module. TypeScript don't work with UMD. // @ts-ignore -import PrecompiledGlobalize from '../external/PrecompiledGlobalize'; +import PrecompiledGlobalize from '../external/PrecompiledGlobalize.cjs'; // List of Redux actions factory we are hoisting as Web Chat functions const DISPATCHERS = { @@ -348,6 +348,7 @@ const ComposerCore = ({ DISPATCHERS, dispatcher => (...args) => + // @ts-expect-error dispatch(dispatcher(...args)) ), [dispatch] diff --git a/packages/api/src/hooks/index.ts b/packages/api/src/hooks/index.ts index f8d1953c9b..bafd77a6c0 100644 --- a/packages/api/src/hooks/index.ts +++ b/packages/api/src/hooks/index.ts @@ -34,15 +34,13 @@ import useLocalizer from './useLocalizer'; import useMarkActivityAsSpoken from './useMarkActivityAsSpoken'; import useMarkActivityKeyAsRead from './useMarkActivityKeyAsRead'; import useMarkAllAsAcknowledged from './useMarkAllAsAcknowledged'; +import useNotifications from './useNotifications'; import usePerformCardAction from './usePerformCardAction'; import usePonyfill from './usePonyfill'; import usePostActivity from './usePostActivity'; import useReferenceGrammarID from './useReferenceGrammarID'; import useRelativeTimeFormatter from './useRelativeTimeFormatter'; -import useRenderActivity from './useRenderActivity'; -import useRenderActivityStatus from './useRenderActivityStatus'; import useRenderAttachment from './useRenderAttachment'; -import useRenderAvatar from './useRenderAvatar'; import useRenderToast from './useRenderToast'; import useRenderTypingIndicator from './useRenderTypingIndicator'; import useSendBoxAttachments from './useSendBoxAttachments'; @@ -108,15 +106,13 @@ export { useMarkActivityAsSpoken, useMarkActivityKeyAsRead, useMarkAllAsAcknowledged, + useNotifications, usePerformCardAction, usePonyfill, usePostActivity, useReferenceGrammarID, useRelativeTimeFormatter, - useRenderActivity, - useRenderActivityStatus, useRenderAttachment, - useRenderAvatar, useRenderToast, useRenderTypingIndicator, useSendBoxAttachments, diff --git a/packages/api/src/hooks/internal/WebChatAPIContext.ts b/packages/api/src/hooks/internal/WebChatAPIContext.ts index a2dbb914cf..a791682408 100644 --- a/packages/api/src/hooks/internal/WebChatAPIContext.ts +++ b/packages/api/src/hooks/internal/WebChatAPIContext.ts @@ -17,7 +17,7 @@ import { AvatarComponentFactory } from '../../types/AvatarMiddleware'; import { PerformCardAction } from '../../types/CardActionMiddleware'; import { GroupActivities } from '../../types/GroupActivitiesMiddleware'; import LocalizedStrings from '../../types/LocalizedStrings'; -import Notification from '../../types/Notification'; +import { type Notification } from '../../types/Notification'; import PrecompiledGlobalize from '../../types/PrecompiledGlobalize'; import { ScrollToEndButtonComponentFactory } from '../../types/ScrollToEndButtonMiddleware'; import TelemetryMeasurementEvent from '../../types/TelemetryMeasurementEvent'; diff --git a/packages/api/src/hooks/internal/useSetDictateState.js b/packages/api/src/hooks/internal/useSetDictateState.ts similarity index 58% rename from packages/api/src/hooks/internal/useSetDictateState.js rename to packages/api/src/hooks/internal/useSetDictateState.ts index 03fb12c869..b32e3701b1 100644 --- a/packages/api/src/hooks/internal/useSetDictateState.js +++ b/packages/api/src/hooks/internal/useSetDictateState.ts @@ -1,5 +1,5 @@ import useWebChatAPIContext from './useWebChatAPIContext'; -export default function useSetDictateState() { +export default function useSetDictateState(): (dictateState: number) => void { return useWebChatAPIContext().setDictateState; } diff --git a/packages/api/src/hooks/middleware/createDefaultGroupActivitiesMiddleware.ts b/packages/api/src/hooks/middleware/createDefaultGroupActivitiesMiddleware.ts index 6d0cbc81a2..23d81d3162 100644 --- a/packages/api/src/hooks/middleware/createDefaultGroupActivitiesMiddleware.ts +++ b/packages/api/src/hooks/middleware/createDefaultGroupActivitiesMiddleware.ts @@ -1,8 +1,7 @@ -import { SENDING, SENT } from '../../types/internal/SendStatus'; import GroupActivitiesMiddleware from '../../types/GroupActivitiesMiddleware'; import type { GlobalScopePonyfill, WebChatActivity } from 'botframework-webchat-core'; -import type { SendStatus } from '../../types/internal/SendStatus'; +import type { SendStatus } from '../../types/SendStatus'; function bin(items: T[], grouping: (last: T, current: T) => boolean): T[][] { let lastBin: T[]; @@ -31,7 +30,7 @@ function sending(activity: WebChatActivity): SendStatus | undefined { // `channelData.state` is being deprecated in favor of `channelData['webchat:send-status']`. // Please refer to #4362 for details. Remove on or after 2024-07-31. - return sendStatus || (state === SENT ? SENT : SENDING); + return sendStatus || (state === 'sent' ? 'sent' : 'sending'); } } diff --git a/packages/api/src/hooks/useActiveTyping.ts b/packages/api/src/hooks/useActiveTyping.ts index cbcbbb1115..c4c1f0d4eb 100644 --- a/packages/api/src/hooks/useActiveTyping.ts +++ b/packages/api/src/hooks/useActiveTyping.ts @@ -1,7 +1,7 @@ import { useEffect } from 'react'; +import type { Typing } from '../types/Typing'; import { useSelector } from './internal/WebChatReduxContext'; -import Typing from '../types/Typing'; import useForceRender from './internal/useForceRender'; import usePonyfill from './usePonyfill'; import useStyleOptions from './useStyleOptions'; diff --git a/packages/api/src/hooks/useCreateActivityStatusRenderer.tsx b/packages/api/src/hooks/useCreateActivityStatusRenderer.tsx index 7852c8ef77..4b0850dc54 100644 --- a/packages/api/src/hooks/useCreateActivityStatusRenderer.tsx +++ b/packages/api/src/hooks/useCreateActivityStatusRenderer.tsx @@ -1,28 +1,24 @@ /* eslint react/prop-types: "off" */ /* eslint react/require-default-props: "off" */ -import PropTypes from 'prop-types'; -import React, { memo, useMemo } from 'react'; +import type { WebChatActivity } from 'botframework-webchat-core'; +import React, { memo, useMemo, type ReactNode } from 'react'; -import { SENDING, SEND_FAILED, SENT } from '../types/internal/SendStatus'; import useGetKeyByActivity from '../hooks/useGetKeyByActivity'; import useSendStatusByActivityKey from '../hooks/useSendStatusByActivityKey'; -import useWebChatAPIContext from './internal/useWebChatAPIContext'; - -import type { ReactNode, VFC } from 'react'; import type { RenderActivityStatus } from '../types/ActivityStatusMiddleware'; -import type { SendStatus } from '../types/internal/SendStatus'; -import type { WebChatActivity } from 'botframework-webchat-core'; +import type { SendStatus } from '../types/SendStatus'; +import useWebChatAPIContext from './internal/useWebChatAPIContext'; -type ActivityStatusContainerCoreProps = { +type ActivityStatusContainerCoreProps = Readonly<{ activity: WebChatActivity; hideTimestamp: boolean; nextVisibleActivity: WebChatActivity; sendStatus: SendStatus; -}; +}>; -const ActivityStatusContainerCore: VFC = memo( - ({ activity, hideTimestamp, nextVisibleActivity, sendStatus }) => { +const ActivityStatusContainerCore = memo( + ({ activity, hideTimestamp, nextVisibleActivity, sendStatus }: ActivityStatusContainerCoreProps) => { const { activityStatusRenderer: createActivityStatusRenderer }: { activityStatusRenderer: RenderActivityStatus } = useWebChatAPIContext(); @@ -31,37 +27,25 @@ const ActivityStatusContainerCore: VFC = memo( hideTimestamp, nextVisibleActivity, // "nextVisibleActivity" is for backward compatibility, please remove this line on or after 2022-07-22. sameTimestampGroup: hideTimestamp, // "sameTimestampGroup" is for backward compatibility, please remove this line on or after 2022-07-22. - sendState: sendStatus === SEND_FAILED || sendStatus === SENT ? sendStatus : SENDING + sendState: sendStatus === 'send failed' || sendStatus === 'sent' ? sendStatus : 'sending' }); } ); -ActivityStatusContainerCore.propTypes = { - // PropTypes cannot fully capture TypeScript types. - // @ts-ignore - activity: PropTypes.shape({ - from: PropTypes.shape({ role: PropTypes.string }).isRequired, - localTimestamp: PropTypes.string - }).isRequired, - hideTimestamp: PropTypes.bool.isRequired, - nextVisibleActivity: PropTypes.any, - sendStatus: PropTypes.oneOf([SENDING, SEND_FAILED, SENT]) -}; - -type ActivityStatusContainerProps = { +type ActivityStatusContainerProps = Readonly<{ activity: WebChatActivity; hideTimestamp: boolean; nextVisibleActivity: WebChatActivity; -}; +}>; -const ActivityStatusContainer: VFC = memo( - ({ activity, hideTimestamp, nextVisibleActivity }) => { +const ActivityStatusContainer = memo( + ({ activity, hideTimestamp, nextVisibleActivity }: ActivityStatusContainerProps) => { const [sendStatusByActivityKey] = useSendStatusByActivityKey(); const getKeyByActivity = useGetKeyByActivity(); const key = getKeyByActivity(activity); - const sendStatus = (typeof key === 'string' && sendStatusByActivityKey.get(key)) || SENT; + const sendStatus = (typeof key === 'string' && sendStatusByActivityKey.get(key)) || 'sent'; return ( = memo( } ); -ActivityStatusContainer.defaultProps = { - hideTimestamp: false, - nextVisibleActivity: undefined -}; - -ActivityStatusContainer.propTypes = { - // PropTypes cannot fully capture TypeScript types. - // @ts-ignore - activity: PropTypes.shape({ - from: PropTypes.shape({ role: PropTypes.string }).isRequired, - localTimestamp: PropTypes.string - }).isRequired, - hideTimestamp: PropTypes.bool, - nextVisibleActivity: PropTypes.any -}; - -type ActivityStatusRenderer = (renderOptions: { +export type ActivityStatusRenderer = (renderOptions: { activity: WebChatActivity; nextVisibleActivity: WebChatActivity; }) => (props?: { hideTimestamp?: boolean }) => ReactNode; diff --git a/packages/api/src/hooks/useCreateAttachmentForScreenReaderRenderer.js b/packages/api/src/hooks/useCreateAttachmentForScreenReaderRenderer.ts similarity index 55% rename from packages/api/src/hooks/useCreateAttachmentForScreenReaderRenderer.js rename to packages/api/src/hooks/useCreateAttachmentForScreenReaderRenderer.ts index 2a0fe23642..282f90a66a 100644 --- a/packages/api/src/hooks/useCreateAttachmentForScreenReaderRenderer.js +++ b/packages/api/src/hooks/useCreateAttachmentForScreenReaderRenderer.ts @@ -1,5 +1,7 @@ import useWebChatAPIContext from './internal/useWebChatAPIContext'; -export default function useCreateAttachmentForScreenReaderRenderer() { +import { type AttachmentForScreenReaderComponentFactory } from '../types/AttachmentForScreenReaderMiddleware'; + +export default function useCreateAttachmentForScreenReaderRenderer(): AttachmentForScreenReaderComponentFactory { return useWebChatAPIContext().attachmentForScreenReaderRenderer; } diff --git a/packages/api/src/hooks/useDebouncedNotifications.ts b/packages/api/src/hooks/useDebouncedNotifications.ts index ec09c7911b..14cee3ebf1 100644 --- a/packages/api/src/hooks/useDebouncedNotifications.ts +++ b/packages/api/src/hooks/useDebouncedNotifications.ts @@ -1,20 +1,20 @@ import { useRef } from 'react'; import updateIn from 'simple-update-in'; +import { type Notification } from '../types/Notification'; import findMin from '../utils/findMin'; -import Notification from '../types/Notification'; import useForceRender from './internal/useForceRender'; +import useTimer from './internal/useTimer'; import useNotifications from './useNotifications'; import usePonyfill from './usePonyfill'; import useStyleOptions from './useStyleOptions'; -import useTimer from './internal/useTimer'; -type DebouncedNotification = Notification & { +export type DebouncedNotification = Notification & { outOfDate: boolean; updateNotBefore: number; }; -type DebouncedNotifications = { [id: string]: DebouncedNotification }; +export type DebouncedNotifications = { [id: string]: DebouncedNotification }; function getEarliestUpdateNotBefore(notificationMap: DebouncedNotifications) { return findMin( diff --git a/packages/api/src/hooks/useNotifications.ts b/packages/api/src/hooks/useNotifications.ts index a661a70a16..02a322fb3b 100644 --- a/packages/api/src/hooks/useNotifications.ts +++ b/packages/api/src/hooks/useNotifications.ts @@ -1,5 +1,5 @@ +import { type Notification } from '../types/Notification'; import { useSelector } from './internal/WebChatReduxContext'; -import Notification from '../types/Notification'; export default function useNotifications(): [Notification[]] { return [useSelector(({ notifications }) => notifications)]; diff --git a/packages/api/src/hooks/usePostActivity.ts b/packages/api/src/hooks/usePostActivity.ts index 0302b2ecf3..c093da324a 100644 --- a/packages/api/src/hooks/usePostActivity.ts +++ b/packages/api/src/hooks/usePostActivity.ts @@ -1,5 +1,4 @@ -import Observable from 'core-js/features/observable'; -import type { WebChatActivity } from 'botframework-webchat-core'; +import { type Observable, type WebChatActivity } from 'botframework-webchat-core'; import useWebChatAPIContext from './internal/useWebChatAPIContext'; diff --git a/packages/api/src/hooks/useRenderActivity.js b/packages/api/src/hooks/useRenderActivity.js deleted file mode 100644 index 548e2c8c83..0000000000 --- a/packages/api/src/hooks/useRenderActivity.js +++ /dev/null @@ -1,53 +0,0 @@ -import { useMemo } from 'react'; - -import useCreateActivityRendererInternal from './internal/useCreateActivityRendererInternal'; - -// In the old days, the useRenderActivity() will be called like this: -// -// const renderActivity = useRenderActivity(); -// const element = renderActivity({ activity, nextVisibleActivity }); - -// In the new days, the useCreateActivityRenderer() is a 3-pass function: -// -// const createActivityRenderer = useCreateActivityRenderer(); -// const renderActivity = createActivityRenderer({ activity, nextVisibleActivity }); -// const element = renderActivity && renderActivity(undefined, { renderActivityStatus, renderAvatar, showCallout }); - -// Despite deprecation, useRenderActivity() can be retrofitted using useCreateActivityRenderer(). - -let showDeprecationNotes = true; - -/** @deprecated Please use `useCreateActivityRenderer()` instead. */ -export default function useRenderActivity(renderAttachment) { - if (showDeprecationNotes) { - console.warn( - 'botframework-webchat: "useRenderActivity" is deprecated and will be removed on or after 2022-07-22. Please use "useCreateActivityRenderer()" instead.' - ); - - showDeprecationNotes = false; - } - - if (typeof renderAttachment !== 'function') { - throw new Error('botframework-webchat: First argument passed to "useRenderActivity" must be a function.'); - } - - const createActivityRenderer = useCreateActivityRendererInternal(renderAttachment); - - return useMemo( - () => - (renderActivityArg, renderOptions = {}) => { - const { activity } = renderActivityArg || {}; - - if (!activity) { - throw new Error( - 'botframework-webchat: First argument passed to the callback of useRenderActivity() must contain an "activity" property.' - ); - } - - const renderActivity = createActivityRenderer(renderActivityArg); - - return !!renderActivity && renderActivity(renderOptions); - }, - [createActivityRenderer] - ); -} diff --git a/packages/api/src/hooks/useRenderActivityStatus.js b/packages/api/src/hooks/useRenderActivityStatus.js deleted file mode 100644 index 3e22b0e3b4..0000000000 --- a/packages/api/src/hooks/useRenderActivityStatus.js +++ /dev/null @@ -1,36 +0,0 @@ -import { useMemo } from 'react'; - -import useCreateActivityStatusRenderer from './useCreateActivityStatusRenderer'; - -// Previously, useRenderActivity() was called like this: -// -// const element = useRenderActivityStatus({ activity, nextVisibleActivity }); - -// Now, the useCreateActivityRenderer() is a 3-pass function: -// -// const createActivityStatusRenderer = useCreateActivityStatusRenderer(); -// const renderActivityStatus = createActivityStatusRenderer({ activity, hideTimestamp }); -// const element = renderActivityStatus && renderActivityStatus(undefined); - -// Despite deprecation, useRenderActivityStatus() can be retrofitted using useCreateActivityStatusRenderer(). - -let showDeprecationNotes = true; - -/** @deprecated Please use `useCreateActivityStatusRenderer()` instead. */ -export default function useRenderActivityStatus({ activity, nextVisibleActivity }) { - if (showDeprecationNotes) { - console.warn( - 'botframework-webchat: "useRenderActivityStatus" is deprecated and will be removed on or after 2022-07-22. Please use "useCreateActivityStatusRenderer()" instead.' - ); - - showDeprecationNotes = false; - } - - const createActivityStatusRenderer = useCreateActivityStatusRenderer(); - - return useMemo(() => { - const renderActivityStatus = createActivityStatusRenderer({ activity, nextVisibleActivity }); - - return !!renderActivityStatus && renderActivityStatus; - }, [activity, createActivityStatusRenderer, nextVisibleActivity]); -} diff --git a/packages/api/src/hooks/useRenderAttachment.js b/packages/api/src/hooks/useRenderAttachment.ts similarity index 51% rename from packages/api/src/hooks/useRenderAttachment.js rename to packages/api/src/hooks/useRenderAttachment.ts index 7179f64970..5add4176fd 100644 --- a/packages/api/src/hooks/useRenderAttachment.js +++ b/packages/api/src/hooks/useRenderAttachment.ts @@ -1,6 +1,7 @@ +import { type RenderAttachment } from '../types/AttachmentMiddleware'; import useWebChatAPIContext from './internal/useWebChatAPIContext'; -export default function useRenderAttachment() { +export default function useRenderAttachment(): RenderAttachment | undefined { const { attachmentRenderer } = useWebChatAPIContext(); return attachmentRenderer; diff --git a/packages/api/src/hooks/useRenderAvatar.js b/packages/api/src/hooks/useRenderAvatar.js deleted file mode 100644 index 89552d1757..0000000000 --- a/packages/api/src/hooks/useRenderAvatar.js +++ /dev/null @@ -1,18 +0,0 @@ -import useCreateAvatarRenderer from './useCreateAvatarRenderer'; - -let showDeprecationNotes = true; - -/** @deprecated Please use "useRenderAvatar()" instead. */ -export default function useRenderAvatar({ activity }) { - if (showDeprecationNotes) { - console.warn( - 'botframework-webchat: "useRenderAvatar" is deprecated and will be removed on or after 2022-07-28. Please use "useRenderAvatar()" instead.' - ); - - showDeprecationNotes = false; - } - - const createAvatarRenderer = useCreateAvatarRenderer(); - - return createAvatarRenderer({ activity }); -} diff --git a/packages/api/src/hooks/useSendFiles.ts b/packages/api/src/hooks/useSendFiles.ts index 29a27c190e..bd666f887a 100644 --- a/packages/api/src/hooks/useSendFiles.ts +++ b/packages/api/src/hooks/useSendFiles.ts @@ -17,7 +17,7 @@ const warnDeprecation = warnOnce( 'This hook will be removed on or after 2026-04-03. Please use `useSendMessage` instead.' ); -export default function useSendFiles(): (files: PostActivityFile[]) => void { +function useSendFiles(): (files: PostActivityFile[]) => void { const { sendFiles } = useWebChatAPIContext(); const trackEvent = useTrackEvent(); @@ -36,3 +36,6 @@ export default function useSendFiles(): (files: PostActivityFile[]) => void { [sendFiles, trackEvent] ); } + +export default useSendFiles; +export { type PostActivityFile }; diff --git a/packages/api/src/hooks/useSendMessage.ts b/packages/api/src/hooks/useSendMessage.ts index 359532648a..8473026285 100644 --- a/packages/api/src/hooks/useSendMessage.ts +++ b/packages/api/src/hooks/useSendMessage.ts @@ -4,17 +4,15 @@ import { useCallback } from 'react'; import useWebChatAPIContext from './internal/useWebChatAPIContext'; import useTrackEvent from './useTrackEvent'; -type SendMessage = ( +export default function useSendMessage(): ( text?: string, method?: string, init?: { attachments?: readonly SendBoxAttachment[] | undefined; channelData?: any } -) => void; - -export default function useSendMessage(): SendMessage { +) => void { const { sendMessage } = useWebChatAPIContext(); const trackEvent = useTrackEvent(); - return useCallback( + return useCallback( (text, method, { attachments, channelData } = {}) => { trackEvent('sendMessage', { numAttachments: attachments?.length || 0, diff --git a/packages/api/src/hooks/useSetNotification.ts b/packages/api/src/hooks/useSetNotification.ts index 5934c5565c..85166d0927 100644 --- a/packages/api/src/hooks/useSetNotification.ts +++ b/packages/api/src/hooks/useSetNotification.ts @@ -1,4 +1,4 @@ -import Notification from '../types/Notification'; +import { type Notification } from '../types/Notification'; import useWebChatAPIContext from './internal/useWebChatAPIContext'; export default function useSetNotification(): (notification: Notification) => void { diff --git a/packages/api/src/hooks/useStyleOptions.ts b/packages/api/src/hooks/useStyleOptions.ts index 72c4add239..791fcbf169 100644 --- a/packages/api/src/hooks/useStyleOptions.ts +++ b/packages/api/src/hooks/useStyleOptions.ts @@ -1,4 +1,4 @@ -import { StrictStyleOptions } from '../StyleOptions'; +import { type StrictStyleOptions } from '../StyleOptions'; import useWebChatAPIContext from './internal/useWebChatAPIContext'; export default function useStyleOptions(): [StrictStyleOptions] { diff --git a/packages/api/src/hooks/utils/observableToPromise.ts b/packages/api/src/hooks/utils/observableToPromise.ts index 00365dba9c..cda1af7cb3 100644 --- a/packages/api/src/hooks/utils/observableToPromise.ts +++ b/packages/api/src/hooks/utils/observableToPromise.ts @@ -1,6 +1,4 @@ -import Observable from 'core-js/features/observable'; - -import type { GlobalScopePonyfill } from 'botframework-webchat-core'; +import { type GlobalScopePonyfill, type Observable } from 'botframework-webchat-core'; export default function observableToPromise( observable: Observable, diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts index 14bf88eb4c..a142836903 100644 --- a/packages/api/src/index.ts +++ b/packages/api/src/index.ts @@ -1,7 +1,7 @@ import StyleOptions, { StrictStyleOptions } from './StyleOptions'; import defaultStyleOptions from './defaultStyleOptions'; -import * as hooks from './hooks'; import Composer, { ComposerProps } from './hooks/Composer'; +import * as hooks from './hooks/index'; import { SendBoxMiddlewareProxy, rectifySendBoxMiddlewareProps, @@ -17,40 +17,58 @@ import { type SendBoxToolbarMiddlewareRequest } from './hooks/internal/SendBoxToolbarMiddleware'; import concatMiddleware from './hooks/middleware/concatMiddleware'; +import { type ActivityStatusRenderer } from './hooks/useCreateActivityStatusRenderer'; // TODO: [P1] This line should export the one from the version from "middleware rework" workstream. +import { type DebouncedNotification, type DebouncedNotifications } from './hooks/useDebouncedNotifications'; +import { type PostActivityFile } from './hooks/useSendFiles'; import { localize } from './localization/Localize'; import normalizeStyleOptions from './normalizeStyleOptions'; -import ActivityMiddleware, { ActivityComponentFactory } from './types/ActivityMiddleware'; +import ActivityMiddleware, { type ActivityComponentFactory } from './types/ActivityMiddleware'; import { type ActivityStatusMiddleware, type RenderActivityStatus } from './types/ActivityStatusMiddleware'; import AttachmentForScreenReaderMiddleware, { AttachmentForScreenReaderComponentFactory } from './types/AttachmentForScreenReaderMiddleware'; -import AttachmentMiddleware, { RenderAttachment } from './types/AttachmentMiddleware'; -import AvatarMiddleware, { AvatarComponentFactory } from './types/AvatarMiddleware'; -import CardActionMiddleware, { PerformCardAction } from './types/CardActionMiddleware'; -import GroupActivitiesMiddleware, { GroupActivities } from './types/GroupActivitiesMiddleware'; -import ScrollToEndButtonMiddleware, { ScrollToEndButtonComponentFactory } from './types/ScrollToEndButtonMiddleware'; -import ToastMiddleware, { RenderToast } from './types/ToastMiddleware'; -import TypingIndicatorMiddleware, { RenderTypingIndicator } from './types/TypingIndicatorMiddleware'; -import WebSpeechPonyfill from './types/WebSpeechPonyfill'; -import WebSpeechPonyfillFactory from './types/WebSpeechPonyfillFactory'; +import AttachmentMiddleware, { type RenderAttachment } from './types/AttachmentMiddleware'; +import AvatarMiddleware, { type AvatarComponentFactory } from './types/AvatarMiddleware'; +import CardActionMiddleware, { type PerformCardAction } from './types/CardActionMiddleware'; +import { type ContextOf } from './types/ContextOf'; +import GroupActivitiesMiddleware, { type GroupActivities } from './types/GroupActivitiesMiddleware'; +import { type Notification } from './types/Notification'; +import ScrollToEndButtonMiddleware, { + type ScrollToEndButtonComponentFactory +} from './types/ScrollToEndButtonMiddleware'; +import { type SendStatus } from './types/SendStatus'; +import ToastMiddleware, { type RenderToast } from './types/ToastMiddleware'; +import { type Typing } from './types/Typing'; +import TypingIndicatorMiddleware, { type RenderTypingIndicator } from './types/TypingIndicatorMiddleware'; +import { type WebSpeechPonyfill } from './types/WebSpeechPonyfill'; +import { type WebSpeechPonyfillFactory } from './types/WebSpeechPonyfillFactory'; + +const buildTool = process.env.build_tool; +const moduleFormat = process.env.module_format; +const version = process.env.npm_package_version; + +const buildInfo = { buildTool, moduleFormat, version }; export { Composer, SendBoxMiddlewareProxy, SendBoxToolbarMiddlewareProxy, + buildInfo, concatMiddleware, defaultStyleOptions, hooks, localize, normalizeStyleOptions, rectifySendBoxMiddlewareProps, - rectifySendBoxToolbarMiddlewareProps + rectifySendBoxToolbarMiddlewareProps, + version }; export type { ActivityComponentFactory, ActivityMiddleware, ActivityStatusMiddleware, + ActivityStatusRenderer, AttachmentForScreenReaderComponentFactory, AttachmentForScreenReaderMiddleware, AttachmentMiddleware, @@ -58,9 +76,14 @@ export type { AvatarMiddleware, CardActionMiddleware, ComposerProps, + ContextOf, + DebouncedNotification, + DebouncedNotifications, GroupActivities, GroupActivitiesMiddleware, + Notification, PerformCardAction, + PostActivityFile, RenderActivityStatus, RenderAttachment, RenderToast, @@ -73,9 +96,11 @@ export type { SendBoxToolbarMiddleware, SendBoxToolbarMiddlewareProps, SendBoxToolbarMiddlewareRequest, + SendStatus, StrictStyleOptions, StyleOptions, ToastMiddleware, + Typing, TypingIndicatorMiddleware, WebSpeechPonyfill, WebSpeechPonyfillFactory diff --git a/packages/api/src/internal.ts b/packages/api/src/internal.ts new file mode 100644 index 0000000000..296f8dc199 --- /dev/null +++ b/packages/api/src/internal.ts @@ -0,0 +1,3 @@ +import useSetDictateState from './hooks/internal/useSetDictateState'; + +export { useSetDictateState }; diff --git a/packages/api/src/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.tsx b/packages/api/src/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.tsx index 57381cbb65..adfe1539e4 100644 --- a/packages/api/src/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.tsx +++ b/packages/api/src/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.tsx @@ -1,17 +1,16 @@ -import React, { useCallback, useMemo, useState } from 'react'; +import React, { useCallback, useMemo, useState, type ReactNode } from 'react'; -import type { FC, PropsWithChildren } from 'react'; - -import ActivityAcknowledgementContext, { ActivityAcknowledgementContextType } from './private/Context'; -import findLastIndex from '../../utils/findLastIndex'; -import useActivities from '../../hooks/useActivities'; -import useActivityKeys from '../ActivityKeyer/useActivityKeys'; import usePrevious from '../../hooks/internal/usePrevious'; import useValueRef from '../../hooks/internal/useValueRef'; +import useActivities from '../../hooks/useActivities'; +import findLastIndex from '../../utils/findLastIndex'; +import useActivityKeys from '../ActivityKeyer/useActivityKeys'; +import ActivityAcknowledgementContext, { ActivityAcknowledgementContextType } from './private/Context'; -import type { ActivityAcknowledgement } from './private/types'; - -type ActivityAcknowledgementComposerProps = PropsWithChildren<{}>; +type ActivityAcknowledgement = { + get acknowledged(): boolean; + get read(): boolean; +}; function findClosestActivityKeyIfNotExists( activityKey: string, @@ -42,7 +41,7 @@ function findClosestActivityKeyIfNotExists( // If nothing is found, return `undefined`. } -const ActivityAcknowledgementComposer: FC = ({ children }) => { +const ActivityAcknowledgementComposer = ({ children }: Readonly<{ children?: ReactNode | undefined }>) => { const [activities] = useActivities(); const [allActivityKeys] = useActivityKeys(); const [rawLastAcknowledgedActivityKey, setRawLastAcknowledgedActivityKey] = useState(); diff --git a/packages/api/src/providers/ActivityAcknowledgement/private/types.ts b/packages/api/src/providers/ActivityAcknowledgement/private/types.ts deleted file mode 100644 index 51f55c082c..0000000000 --- a/packages/api/src/providers/ActivityAcknowledgement/private/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -type ActivityAcknowledgement = { - get acknowledged(): boolean; - get read(): boolean; -}; - -export type { ActivityAcknowledgement }; diff --git a/packages/api/src/providers/ActivityKeyer/ActivityKeyerComposer.tsx b/packages/api/src/providers/ActivityKeyer/ActivityKeyerComposer.tsx index 19208a7db2..c0508b9ca3 100644 --- a/packages/api/src/providers/ActivityKeyer/ActivityKeyerComposer.tsx +++ b/packages/api/src/providers/ActivityKeyer/ActivityKeyerComposer.tsx @@ -1,17 +1,14 @@ -import PropTypes from 'prop-types'; -import React, { useCallback, useMemo, useRef } from 'react'; +import type { WebChatActivity } from 'botframework-webchat-core'; +import React, { useCallback, useMemo, useRef, type ReactNode } from 'react'; +import useActivities from '../../hooks/useActivities'; +import type { ActivityKeyerContextType } from './private/Context'; import ActivityKeyerContext from './private/Context'; import getActivityId from './private/getActivityId'; import getClientActivityId from './private/getClientActivityId'; import uniqueId from './private/uniqueId'; -import useActivities from '../../hooks/useActivities'; import useActivityKeyerContext from './private/useContext'; -import type { ActivityKeyerContextType } from './private/Context'; -import type { FC, PropsWithChildren } from 'react'; -import type { WebChatActivity } from 'botframework-webchat-core'; - type ActivityIdToKeyMap = Map; type ActivityToKeyMap = Map; type ClientActivityIdToKeyMap = Map; @@ -31,7 +28,7 @@ type KeyToActivityMap = Map; * * Local key are only persisted in memory. On refresh, they will be a new random key. */ -const ActivityKeyerComposer: FC> = ({ children }) => { +const ActivityKeyerComposer = ({ children }: Readonly<{ children?: ReactNode | undefined }>) => { const existingContext = useActivityKeyerContext(false); if (existingContext) { @@ -141,12 +138,4 @@ const ActivityKeyerComposer: FC> = ({ children }) => { return {children}; }; -ActivityKeyerComposer.defaultProps = { - children: undefined -}; - -ActivityKeyerComposer.propTypes = { - children: PropTypes.any -}; - export default ActivityKeyerComposer; diff --git a/packages/api/src/providers/ActivitySendStatus/ActivitySendStatusComposer.tsx b/packages/api/src/providers/ActivitySendStatus/ActivitySendStatusComposer.tsx index c2cfda5072..194a85c112 100644 --- a/packages/api/src/providers/ActivitySendStatus/ActivitySendStatusComposer.tsx +++ b/packages/api/src/providers/ActivitySendStatus/ActivitySendStatusComposer.tsx @@ -1,18 +1,14 @@ -import React, { useEffect, useMemo, useRef } from 'react'; +import React, { useEffect, useMemo, useRef, type FC, type PropsWithChildren } from 'react'; -import { SENDING, SEND_FAILED, SENT } from '../../types/internal/SendStatus'; -import ActivitySendStatusContext from './private/Context'; -import freezeArray from '../../utils/freezeArray'; -import isMapEqual from './private/isMapEqual'; -import useActivities from '../../hooks/useActivities'; +import { useActivities, usePonyfill } from '../../hooks/index'; import useForceRender from '../../hooks/internal/useForceRender'; -import useGetKeyByActivity from '../ActivityKeyer/useGetKeyByActivity'; import useGetSendTimeoutForActivity from '../../hooks/useGetSendTimeoutForActivity'; -import usePonyfill from '../../hooks/usePonyfill'; - +import type { SendStatus } from '../../types/SendStatus'; +import freezeArray from '../../utils/freezeArray'; +import useGetKeyByActivity from '../ActivityKeyer/useGetKeyByActivity'; import type { ActivitySendStatusContextType } from './private/Context'; -import type { FC, PropsWithChildren } from 'react'; -import type { SendStatus } from '../../types/internal/SendStatus'; +import ActivitySendStatusContext from './private/Context'; +import isMapEqual from './private/isMapEqual'; // Magic numbers for `expiryByActivityKey`. const EXPIRY_SEND_FAILED = -Infinity; @@ -52,11 +48,11 @@ const ActivitySendStatusComposer: FC> = ({ children }) => // `channelData.state` is being deprecated in favor of `channelData['webchat:send-status']`. // Please refer to #4362 for details. Remove on or after 2024-07-31. - const rectifiedSendStatus = sendStatus || (state === SENT ? SENT : SENDING); + const rectifiedSendStatus = sendStatus || (state === 'sent' ? 'sent' : 'sending'); - if (rectifiedSendStatus === SENT) { + if (rectifiedSendStatus === 'sent') { expiryByActivityKey.set(key, EXPIRY_SENT); - } else if (rectifiedSendStatus === SEND_FAILED) { + } else if (rectifiedSendStatus === 'send failed') { expiryByActivityKey.set(key, EXPIRY_SEND_FAILED); } else { const expiry = +new Date(activity.localTimestamp) + getSendTimeoutForActivity({ activity }); @@ -78,7 +74,7 @@ const ActivitySendStatusComposer: FC> = ({ children }) => // Turns the expiry (epoch time) into `SendStatus`, which is based on current clock. for (const [key, expiry] of expiryByActivityKey) { - nextSendStatusByActivityKey.set(key, expiry === EXPIRY_SENT ? SENT : now >= expiry ? SEND_FAILED : SENDING); + nextSendStatusByActivityKey.set(key, expiry === EXPIRY_SENT ? 'sent' : now >= expiry ? 'send failed' : 'sending'); } // Only memoize the new result if it has changed. diff --git a/packages/api/src/providers/ActivitySendStatus/private/Context.ts b/packages/api/src/providers/ActivitySendStatus/private/Context.ts index 4a1b1f5efc..7646b36407 100644 --- a/packages/api/src/providers/ActivitySendStatus/private/Context.ts +++ b/packages/api/src/providers/ActivitySendStatus/private/Context.ts @@ -1,6 +1,6 @@ import { createContext } from 'react'; -import type { SendStatus } from '../../../types/internal/SendStatus'; +import type { SendStatus } from '../../../types/SendStatus'; type ActivitySendStatusContextType = { sendStatusByActivityKeyState: readonly [ReadonlyMap]; diff --git a/packages/api/src/providers/ActivitySendStatus/useSendStatusByActivityKey.ts b/packages/api/src/providers/ActivitySendStatus/useSendStatusByActivityKey.ts index 27890dd257..e78b6c7758 100644 --- a/packages/api/src/providers/ActivitySendStatus/useSendStatusByActivityKey.ts +++ b/packages/api/src/providers/ActivitySendStatus/useSendStatusByActivityKey.ts @@ -1,6 +1,6 @@ import useActivitySendStatusContext from './private/useContext'; -import type { SendStatus } from '../../types/internal/SendStatus'; +import type { SendStatus } from '../../types/SendStatus'; /** * Returns a key/value map which stores the outgoing activity send status by activity key: diff --git a/packages/api/src/providers/Ponyfill/PonyfillComposer.tsx b/packages/api/src/providers/Ponyfill/PonyfillComposer.tsx index 5cd66a9232..c5a4aace4e 100644 --- a/packages/api/src/providers/Ponyfill/PonyfillComposer.tsx +++ b/packages/api/src/providers/Ponyfill/PonyfillComposer.tsx @@ -1,12 +1,10 @@ +import type { GlobalScopePonyfill } from 'botframework-webchat-core'; import PropTypes from 'prop-types'; -import React, { useMemo, useRef } from 'react'; +import React, { useMemo, useRef, type PropsWithChildren } from 'react'; +import type { ContextOf } from '../../types/ContextOf'; import PonyfillContext from './private/PonyfillContext'; -import type { ContextOf } from '../../types/internal/ContextOf'; -import type { GlobalScopePonyfill } from 'botframework-webchat-core'; -import type { PropsWithChildren } from 'react'; - type Props = PropsWithChildren<{ ponyfill?: Partial; }>; diff --git a/packages/api/src/tsconfig.json b/packages/api/src/tsconfig.json index d7a9bce1b3..fe93844f28 100644 --- a/packages/api/src/tsconfig.json +++ b/packages/api/src/tsconfig.json @@ -7,11 +7,12 @@ "downlevelIteration": true, "emitDeclarationOnly": true, "jsx": "react", + "module": "ESNext", + "moduleResolution": "Bundler", "preserveWatchOutput": true, "pretty": true, "resolveJsonModule": true, // Required for localization files "skipLibCheck": true, "sourceMap": true - }, - "files": ["index.ts"] + } } diff --git a/packages/api/src/types/ActivityStatusMiddleware.ts b/packages/api/src/types/ActivityStatusMiddleware.ts index 9a67094281..0357363037 100644 --- a/packages/api/src/types/ActivityStatusMiddleware.ts +++ b/packages/api/src/types/ActivityStatusMiddleware.ts @@ -1,7 +1,7 @@ import type { ReactElement } from 'react'; import type { WebChatActivity } from 'botframework-webchat-core'; -import type { SendStatus } from '../types/internal/SendStatus'; +import type { SendStatus } from '../types/SendStatus'; // TODO: Migrate this legacy middleware signature. type RenderActivityStatusOptions = { diff --git a/packages/api/src/types/internal/ContextOf.ts b/packages/api/src/types/ContextOf.ts similarity index 100% rename from packages/api/src/types/internal/ContextOf.ts rename to packages/api/src/types/ContextOf.ts diff --git a/packages/api/src/types/Notification.ts b/packages/api/src/types/Notification.ts index 944d1b1a35..8693e60101 100644 --- a/packages/api/src/types/Notification.ts +++ b/packages/api/src/types/Notification.ts @@ -7,4 +7,4 @@ type Notification = { timestamp?: number; }; -export default Notification; +export { type Notification }; diff --git a/packages/api/src/types/SendStatus.ts b/packages/api/src/types/SendStatus.ts new file mode 100644 index 0000000000..450850dc71 --- /dev/null +++ b/packages/api/src/types/SendStatus.ts @@ -0,0 +1,3 @@ +type SendStatus = 'send failed' | 'sending' | 'sent'; + +export type { SendStatus }; diff --git a/packages/api/src/types/ToastMiddleware.ts b/packages/api/src/types/ToastMiddleware.ts index bc6c8b1dce..7dfc7de419 100644 --- a/packages/api/src/types/ToastMiddleware.ts +++ b/packages/api/src/types/ToastMiddleware.ts @@ -1,6 +1,6 @@ import { ReactNode } from 'react'; -import Notification from './Notification'; +import { type Notification } from './Notification'; type ToastProps = { notification: Notification; diff --git a/packages/api/src/types/Typing.ts b/packages/api/src/types/Typing.ts index 18210d7daf..b16a8adde3 100644 --- a/packages/api/src/types/Typing.ts +++ b/packages/api/src/types/Typing.ts @@ -5,4 +5,4 @@ type Typing = { role: 'bot' | 'user'; }; -export default Typing; +export type { Typing }; diff --git a/packages/api/src/types/TypingIndicatorMiddleware.ts b/packages/api/src/types/TypingIndicatorMiddleware.ts index 33bef62351..3cde41b1f3 100644 --- a/packages/api/src/types/TypingIndicatorMiddleware.ts +++ b/packages/api/src/types/TypingIndicatorMiddleware.ts @@ -1,6 +1,6 @@ import { ReactNode } from 'react'; -import Typing from './Typing'; +import { type Typing } from './Typing'; type TypingIndicatorProps = { activeTyping: { [id: string]: Typing }; diff --git a/packages/api/src/types/WebSpeechPonyfill.ts b/packages/api/src/types/WebSpeechPonyfill.ts index baef831438..dee36f7948 100644 --- a/packages/api/src/types/WebSpeechPonyfill.ts +++ b/packages/api/src/types/WebSpeechPonyfill.ts @@ -21,4 +21,4 @@ type WebSpeechPonyfill = { SpeechSynthesisUtterance?: typeof SpeechSynthesisUtterance; }; -export default WebSpeechPonyfill; +export { type WebSpeechPonyfill }; diff --git a/packages/api/src/types/WebSpeechPonyfillFactory.ts b/packages/api/src/types/WebSpeechPonyfillFactory.ts index f5098379e3..e18a31e0be 100644 --- a/packages/api/src/types/WebSpeechPonyfillFactory.ts +++ b/packages/api/src/types/WebSpeechPonyfillFactory.ts @@ -1,5 +1,5 @@ -import WebSpeechPonyfill from './WebSpeechPonyfill'; +import { type WebSpeechPonyfill } from './WebSpeechPonyfill'; type WebSpeechPonyfillFactory = ({ referenceGrammarID }: { referenceGrammarID?: string }) => WebSpeechPonyfill; -export default WebSpeechPonyfillFactory; +export { type WebSpeechPonyfillFactory }; diff --git a/packages/api/src/types/internal/SendStatus.ts b/packages/api/src/types/internal/SendStatus.ts deleted file mode 100644 index 806accdb7f..0000000000 --- a/packages/api/src/types/internal/SendStatus.ts +++ /dev/null @@ -1,14 +0,0 @@ -// This type is only for this package only and help reducing size of the bundle. -// Externals should use the string literal directly instead. - -// TODO: [P3] #4040 When improve treeshaking with named exports, we could export internals from `core` package. -// import { SENDING, SEND_FAILED, SENT } from 'botframework-webchat-core/internal/SendStatus'; - -const SENDING = 'sending'; -const SEND_FAILED = 'send failed'; -const SENT = 'sent'; - -type SendStatus = typeof SENDING | typeof SEND_FAILED | typeof SENT; - -export { SENDING, SEND_FAILED, SENT }; -export type { SendStatus }; diff --git a/packages/api/tsup.config.ts b/packages/api/tsup.config.ts new file mode 100644 index 0000000000..c92bbfa0f3 --- /dev/null +++ b/packages/api/tsup.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'tsup'; +import baseConfig from '../../tsup.base.config'; + +export default defineConfig({ + ...baseConfig, + entry: { + 'botframework-webchat-api': './src/index.ts', + 'botframework-webchat-api.internal': './src/internal.ts' + }, + noExternal: ['globalize'] +}); diff --git a/packages/bundle/.gitignore b/packages/bundle/.gitignore index 488006dcd1..9379743d15 100644 --- a/packages/bundle/.gitignore +++ b/packages/bundle/.gitignore @@ -1,5 +1,5 @@ /*.tgz -/dist -/lib -/lib.instrumented -/node_modules +/dist/ +/lib/ +/lib.instrumented/ +/node_modules/ diff --git a/packages/bundle/babel.config.json b/packages/bundle/babel.config.json index 0b4793d5be..91ce4eccc6 100644 --- a/packages/bundle/babel.config.json +++ b/packages/bundle/babel.config.json @@ -10,7 +10,7 @@ [ "babel-plugin-transform-inline-environment-variables", { - "include": ["NODE_ENV", "node_env", "npm_package_version"] + "include": ["build_tool", "module_format", "NODE_ENV", "node_env", "npm_package_version"] } ] ], diff --git a/packages/bundle/package-lock.json b/packages/bundle/package-lock.json index 944ef07ca8..25cff1412a 100644 --- a/packages/bundle/package-lock.json +++ b/packages/bundle/package-lock.json @@ -37,9 +37,10 @@ "@babel/preset-env": "^7.19.1", "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.18.6", + "@types/dom-speech-recognition": "^0.0.4", "@types/mdast": "^4.0.3", "@types/node": "^20.10.3", - "@types/react": "^18.2.42", + "@types/react": "^16.14.60", "babel-loader": "^9.1.3", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-transform-inline-environment-variables": "^0.4.4", @@ -70,6 +71,38 @@ "node": ">=6.0.0" } }, + "node_modules/@angular/common": { + "version": "17.3.5", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.5.tgz", + "integrity": "sha512-Ox91WxSnOSrQ6I21cHi69EfT2Pxtd5Knb5AsdwpxqE57V2E7EnWMhb+LP+holCtFUhK529EGXCk788M+Elyw6g==", + "peer": true, + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/core": "17.3.5", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/core": { + "version": "17.3.5", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.5.tgz", + "integrity": "sha512-y6P27lcrKy3yMx/rtMuGsAnDyVEsS3BdyArTXcD0TOImVGHhVIaB0L95DUCam3ajTe2f2x39eozJZDh7QSpJaw==", + "peer": true, + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "rxjs": "^6.5.3 || ^7.4.0", + "zone.js": "~0.14.0" + } + }, "node_modules/@babel/cli": { "version": "7.18.10", "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.18.10.tgz", @@ -2368,6 +2401,12 @@ "@types/ms": "*" } }, + "node_modules/@types/dom-speech-recognition": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@types/dom-speech-recognition/-/dom-speech-recognition-0.0.4.tgz", + "integrity": "sha512-zf2GwV/G6TdaLwpLDcGTIkHnXf8JEf/viMux+khqKQKDa8/8BAUtXXZS563GnvJ4Fg0PBLGAaFf2GekEVSZ6GQ==", + "dev": true + }, "node_modules/@types/eslint": { "version": "8.4.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz", @@ -2439,20 +2478,20 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "16.14.60", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", + "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", "dev": true, "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, "node_modules/@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", "dev": true }, "node_modules/@types/unist": { @@ -3610,9 +3649,9 @@ } }, "node_modules/csstype": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", - "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "dev": true }, "node_modules/date-fns": { @@ -7206,6 +7245,31 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -7538,7 +7602,6 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, "dependencies": { "tslib": "^2.1.0" } @@ -7585,6 +7648,15 @@ "node": ">=0.10.0" } }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, "node_modules/schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", @@ -8105,8 +8177,7 @@ "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type-fest": { "version": "4.9.0", @@ -8611,6 +8682,15 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zone.js": { + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.4.tgz", + "integrity": "sha512-NtTUvIlNELez7Q1DzKVIFZBzNb646boQMgpATo9z3Ftuu/gWvzxCW7jdjcUDoRGxRikrhVHB/zLXh1hxeJawvw==", + "peer": true, + "dependencies": { + "tslib": "^2.3.0" + } } }, "dependencies": { @@ -8622,6 +8702,24 @@ "@jridgewell/trace-mapping": "^0.3.0" } }, + "@angular/common": { + "version": "17.3.5", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.5.tgz", + "integrity": "sha512-Ox91WxSnOSrQ6I21cHi69EfT2Pxtd5Knb5AsdwpxqE57V2E7EnWMhb+LP+holCtFUhK529EGXCk788M+Elyw6g==", + "peer": true, + "requires": { + "tslib": "^2.3.0" + } + }, + "@angular/core": { + "version": "17.3.5", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.5.tgz", + "integrity": "sha512-y6P27lcrKy3yMx/rtMuGsAnDyVEsS3BdyArTXcD0TOImVGHhVIaB0L95DUCam3ajTe2f2x39eozJZDh7QSpJaw==", + "peer": true, + "requires": { + "tslib": "^2.3.0" + } + }, "@babel/cli": { "version": "7.18.10", "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.18.10.tgz", @@ -10111,6 +10209,12 @@ "@types/ms": "*" } }, + "@types/dom-speech-recognition": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@types/dom-speech-recognition/-/dom-speech-recognition-0.0.4.tgz", + "integrity": "sha512-zf2GwV/G6TdaLwpLDcGTIkHnXf8JEf/viMux+khqKQKDa8/8BAUtXXZS563GnvJ4Fg0PBLGAaFf2GekEVSZ6GQ==", + "dev": true + }, "@types/eslint": { "version": "8.4.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz", @@ -10182,20 +10286,20 @@ "dev": true }, "@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "16.14.60", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", + "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", "dev": true, "requires": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, "@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", "dev": true }, "@types/unist": { @@ -10361,19 +10465,22 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true + "dev": true, + "requires": {} }, "@webpack-cli/info": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true + "dev": true, + "requires": {} }, "@webpack-cli/serve": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true + "dev": true, + "requires": {} }, "@xtuc/ieee754": { "version": "1.2.0", @@ -10402,12 +10509,14 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true + "dev": true, + "requires": {} }, "adaptivecards": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/adaptivecards/-/adaptivecards-3.0.2.tgz", - "integrity": "sha512-ioniHtm8c5uENw6jmddnntpjC4MvSOjN2Xrg9YhxuTtoVqz0XoYrInRIq0uf9WmONm7p+wqjAqBkoI6IRDeNwA==" + "integrity": "sha512-ioniHtm8c5uENw6jmddnntpjC4MvSOjN2Xrg9YhxuTtoVqz0XoYrInRIq0uf9WmONm7p+wqjAqBkoI6IRDeNwA==", + "requires": {} }, "agent-base": { "version": "6.0.2", @@ -10462,7 +10571,8 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true + "dev": true, + "requires": {} }, "ansi-escapes": { "version": "4.3.2", @@ -11071,9 +11181,9 @@ } }, "csstype": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", - "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "dev": true }, "date-fns": { @@ -12278,7 +12388,8 @@ "markdown-it-attrs": { "version": "4.1.6", "resolved": "https://registry.npmjs.org/markdown-it-attrs/-/markdown-it-attrs-4.1.6.tgz", - "integrity": "sha512-O7PDKZlN8RFMyDX13JnctQompwrrILuz2y43pW2GagcwpIIElkAdfeek+erHfxUOlXWPsjFeWmZ8ch1xtRLWpA==" + "integrity": "sha512-O7PDKZlN8RFMyDX13JnctQompwrrILuz2y43pW2GagcwpIIElkAdfeek+erHfxUOlXWPsjFeWmZ8ch1xtRLWpA==", + "requires": {} }, "markdown-it-attrs-es5": { "version": "2.0.2", @@ -13368,6 +13479,25 @@ "safe-buffer": "^5.1.0" } }, + "react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0" + } + }, + "react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + } + }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -13600,7 +13730,6 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, "requires": { "tslib": "^2.1.0" } @@ -13640,6 +13769,15 @@ } } }, + "scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0" + } + }, "schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", @@ -14015,8 +14153,7 @@ "tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "type-fest": { "version": "4.9.0", @@ -14317,7 +14454,8 @@ "ws": { "version": "7.5.9", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==" + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "requires": {} }, "xmlhttprequest-ts": { "version": "1.0.1", @@ -14370,6 +14508,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==" + }, + "zone.js": { + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.4.tgz", + "integrity": "sha512-NtTUvIlNELez7Q1DzKVIFZBzNb646boQMgpATo9z3Ftuu/gWvzxCW7jdjcUDoRGxRikrhVHB/zLXh1hxeJawvw==", + "peer": true, + "requires": { + "tslib": "^2.3.0" + } } } } diff --git a/packages/bundle/package.json b/packages/bundle/package.json index 3cd6feb4d4..a606072d84 100644 --- a/packages/bundle/package.json +++ b/packages/bundle/package.json @@ -2,8 +2,20 @@ "name": "botframework-webchat", "version": "0.0.0-0", "description": "A highly-customizable web-based chat client for Azure Bot Services.", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/botframework-webchat.d.mts", + "default": "./dist/botframework-webchat.mjs" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "publishConfig": { "access": "public" }, @@ -18,10 +30,9 @@ }, "homepage": "https://github.com/microsoft/BotFramework-WebChat/#readme", "files": [ - "dist/**/*.js", - "dist/**/*.map", - "lib/**/*", - "src/**/*" + "./dist/**/*", + "./lib/**/*", + "./src/**/*" ], "tsd": { "compilerOptions": { @@ -36,8 +47,9 @@ }, "scripts": { "auditfix": "npm audit fix --legacy-peer-deps || exit 0", - "build": "npm run build:typescript && npm run build:babel && npm run build:webpack", - "build:babel": "babel src --extensions .js,.ts,.tsx --ignore **/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.ts,**/*.test.tsx,__tests__/**/*.js,__tests__/**/*.ts,__tests__/**/*.tsx --out-dir lib --verbose", + "build": "npm run build:tsup && npm run build:typescript && npm run build:babel && npm run build:webpack", + "build:babel": "build_tool=babel module_format=commonjs babel src --extensions .js,.ts,.tsx --ignore **/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.ts,**/*.test.tsx,__tests__/**/*.js,__tests__/**/*.ts,__tests__/**/*.tsx --out-dir lib --verbose", + "build:tsup": "tsup --config ./tsup.config.ts", "build:typescript": "tsc --project src/tsconfig.json", "build:webpack": "webpack-cli", "bump": "npm run bump:prod && npm run bump:dev && npm run bump:auditfix", @@ -52,9 +64,10 @@ "precommit": "npm run precommit:eslint -- src && npm run precommit:typecheck", "precommit:eslint": "../../node_modules/.bin/eslint --report-unused-disable-directives --max-warnings 0", "precommit:typecheck": "tsc --project ./src --emitDeclarationOnly false --esModuleInterop true --noEmit --pretty false", - "start": "concurrently --kill-others --names \"babel,devserver,tsc\" \"npm run start:babel\" \"npm run start:devserver\" \"npm run start:typescript\"", + "start": "concurrently --kill-others --names \"babel,devserver,tsc,tsup\" \"npm run start:babel\" \"npm run start:devserver\" \"npm run start:typescript\" \"npm run start:tsup\"", "start:babel": "npm run build:babel -- --skip-initial-build --watch", "start:devserver": "node ./scripts/devServer.mjs", + "start:tsup": "npm run build:tsup -- --watch", "start:typescript": "npm run build:typescript -- --watch" }, "pinDependencies": { @@ -86,6 +99,10 @@ "7.19.0", "@babel/*@7.21 is causing out-of-memory (OOM) issues" ], + "@types/react": [ + "16", + "react@16.8.6 is our baseline" + ], "adaptivecards": [ "3.0.2", "needs to bump manually" @@ -136,9 +153,10 @@ "@babel/preset-env": "^7.19.1", "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.18.6", + "@types/dom-speech-recognition": "^0.0.4", "@types/mdast": "^4.0.3", "@types/node": "^20.10.3", - "@types/react": "^18.2.42", + "@types/react": "^16.14.60", "babel-loader": "^9.1.3", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-transform-inline-environment-variables": "^0.4.4", diff --git a/packages/bundle/scripts/devServer.mjs b/packages/bundle/scripts/devServer.mjs index 0131876e42..b4180e9e0b 100644 --- a/packages/bundle/scripts/devServer.mjs +++ b/packages/bundle/scripts/devServer.mjs @@ -27,7 +27,9 @@ const BUILD_OPTIONS = { // Currently, we are only serving webchat-es5.js for development and testing purpose. // Saving some CPUs by not building other bundles. entryPoints: { - 'webchat-es5': resolveFromProjectRoot('./lib/index-es5.js') + webchat: resolveFromProjectRoot('./dist/botframework-webchat.mjs'), + 'webchat-es5': resolveFromProjectRoot('./dist/botframework-webchat.es5.mjs'), + 'webchat-minimal': resolveFromProjectRoot('./dist/botframework-webchat.minimal.mjs') }, logLevel: 'info', // Generate stats.json. diff --git a/packages/bundle/src/AddFullBundle.tsx b/packages/bundle/src/AddFullBundle.tsx index c4a07950fc..5fdc9b5144 100644 --- a/packages/bundle/src/AddFullBundle.tsx +++ b/packages/bundle/src/AddFullBundle.tsx @@ -1,15 +1,18 @@ -import { AttachmentForScreenReaderMiddleware, AttachmentMiddleware, StyleOptions } from 'botframework-webchat-api'; -import { OneOrMany, singleToArray, warnOnce } from 'botframework-webchat-core'; -import PropTypes from 'prop-types'; -import React, { FC, ReactNode } from 'react'; +import { + type AttachmentForScreenReaderMiddleware, + type AttachmentMiddleware, + type StyleOptions +} from 'botframework-webchat-api'; +import { singleToArray, warnOnce, type OneOrMany } from 'botframework-webchat-core'; +import React, { type ReactNode } from 'react'; -import { StrictFullBundleStyleOptions } from './types/FullBundleStyleOptions'; import AdaptiveCardsComposer from './adaptiveCards/AdaptiveCardsComposer'; -import AdaptiveCardsPackage from './types/AdaptiveCardsPackage'; -import AdaptiveCardsStyleOptions from './adaptiveCards/AdaptiveCardsStyleOptions'; +import { type AdaptiveCardsStyleOptions } from './adaptiveCards/AdaptiveCardsStyleOptions'; +import { type AdaptiveCardsPackage } from './types/AdaptiveCardsPackage'; +import { type StrictFullBundleStyleOptions } from './types/FullBundleStyleOptions'; import useComposerProps from './useComposerProps'; -type AddFullBundleProps = { +type AddFullBundleProps = Readonly<{ adaptiveCardsHostConfig?: any; adaptiveCardsPackage?: AdaptiveCardsPackage; attachmentForScreenReaderMiddleware?: OneOrMany; @@ -25,13 +28,13 @@ type AddFullBundleProps = { /** @deprecated Rename to "adaptiveCardsHostConfig" */ adaptiveCardHostConfig?: any; -}; +}>; const adaptiveCardHostConfigDeprecation = warnOnce( '"adaptiveCardHostConfig" is deprecated. Please use "adaptiveCardsHostConfig" instead. "adaptiveCardHostConfig" will be removed on or after 2022-01-01.' ); -const AddFullBundle: FC = ({ +const AddFullBundle = ({ adaptiveCardHostConfig, adaptiveCardsHostConfig, adaptiveCardsPackage, @@ -41,7 +44,7 @@ const AddFullBundle: FC = ({ renderMarkdown, styleOptions, styleSet -}) => { +}: AddFullBundleProps) => { adaptiveCardHostConfig && adaptiveCardHostConfigDeprecation(); const patchedProps = useComposerProps({ @@ -62,36 +65,6 @@ const AddFullBundle: FC = ({ ); }; -AddFullBundle.defaultProps = { - adaptiveCardHostConfig: undefined, - adaptiveCardsHostConfig: undefined, - adaptiveCardsPackage: undefined, - attachmentForScreenReaderMiddleware: undefined, - attachmentMiddleware: undefined, - renderMarkdown: undefined, - styleOptions: undefined, - styleSet: undefined -}; - -AddFullBundle.propTypes = { - adaptiveCardHostConfig: PropTypes.any, - adaptiveCardsHostConfig: PropTypes.any, - // TypeScript class is not mappable to PropTypes.func - // @ts-ignore - adaptiveCardsPackage: PropTypes.shape({ - AdaptiveCard: PropTypes.func.isRequired, - HorizontalAlignment: PropTypes.any.isRequired, - TextSize: PropTypes.any.isRequired, - TextWeight: PropTypes.any.isRequired - }), - attachmentForScreenReaderMiddleware: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.func), PropTypes.func]), - attachmentMiddleware: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.func), PropTypes.func]), - children: PropTypes.func.isRequired, - renderMarkdown: PropTypes.func, - styleOptions: PropTypes.any, - styleSet: PropTypes.any -}; - export default AddFullBundle; export type { AddFullBundleProps }; diff --git a/packages/bundle/src/FullComposer.tsx b/packages/bundle/src/FullComposer.tsx index 7e66113069..2d0f440a37 100644 --- a/packages/bundle/src/FullComposer.tsx +++ b/packages/bundle/src/FullComposer.tsx @@ -1,18 +1,14 @@ -import { Components } from 'botframework-webchat-component'; +import { Components, type ComposerProps } from 'botframework-webchat-component'; import PropTypes from 'prop-types'; import React from 'react'; -import AddFullBundle from './AddFullBundle'; - -import type { AddFullBundleProps } from './AddFullBundle'; -import type { ComposerProps } from 'botframework-webchat-component'; -import type { FC } from 'react'; +import AddFullBundle, { type AddFullBundleProps } from './AddFullBundle'; const { Composer } = Components; type FullComposerProps = ComposerProps & AddFullBundleProps; -const FullComposer: FC = props => ( +const FullComposer = (props: FullComposerProps) => ( {extraProps => ( diff --git a/packages/bundle/src/FullReactWebChat.tsx b/packages/bundle/src/FullReactWebChat.tsx index 98ed3573af..6adecc304f 100644 --- a/packages/bundle/src/FullReactWebChat.tsx +++ b/packages/bundle/src/FullReactWebChat.tsx @@ -1,32 +1,15 @@ -import PropTypes from 'prop-types'; -import React, { VFC } from 'react'; -import ReactWebChat, { ReactWebChatProps } from 'botframework-webchat-component'; +import ReactWebChat, { type ReactWebChatProps } from 'botframework-webchat-component'; +import React from 'react'; -import AddFullBundle, { AddFullBundleProps } from './AddFullBundle'; +import AddFullBundle, { type AddFullBundleProps } from './AddFullBundle'; -type FullReactWebChatProps = ReactWebChatProps & Omit; +type FullReactWebChatProps = Readonly>; // Add additional props to , so it support additional features -const FullReactWebChat: VFC = props => ( +const FullReactWebChat = (props: FullReactWebChatProps) => ( {extraProps => } ); -FullReactWebChat.defaultProps = { - ...ReactWebChat.defaultProps, - adaptiveCardHostConfig: undefined, - adaptiveCardsHostConfig: undefined, - adaptiveCardsPackage: undefined, - renderMarkdown: undefined -}; - -FullReactWebChat.propTypes = { - ...ReactWebChat.propTypes, - adaptiveCardHostConfig: PropTypes.any, - adaptiveCardsHostConfig: PropTypes.any, - adaptiveCardsPackage: PropTypes.any, - renderMarkdown: PropTypes.func -}; - export default FullReactWebChat; export type { FullReactWebChatProps }; diff --git a/packages/bundle/src/adaptiveCards/AdaptiveCardsComposer.tsx b/packages/bundle/src/adaptiveCards/AdaptiveCardsComposer.tsx index 73e5ef3d80..2ab5d432dc 100644 --- a/packages/bundle/src/adaptiveCards/AdaptiveCardsComposer.tsx +++ b/packages/bundle/src/adaptiveCards/AdaptiveCardsComposer.tsx @@ -1,21 +1,20 @@ import * as defaultAdaptiveCardsPackage from 'adaptivecards'; -import PropTypes from 'prop-types'; -import React, { FC, ReactNode, useMemo } from 'react'; +import React, { useMemo, type ReactNode } from 'react'; +import { type AdaptiveCardsPackage } from '../types/AdaptiveCardsPackage'; import AdaptiveCardsContext from './AdaptiveCardsContext'; -import AdaptiveCardsPackage from '../types/AdaptiveCardsPackage'; -type AdaptiveCardsComposerProps = { +type AdaptiveCardsComposerProps = Readonly<{ adaptiveCardsHostConfig: any; adaptiveCardsPackage: AdaptiveCardsPackage; - children: ReactNode; -}; + children?: ReactNode | undefined; +}>; -const AdaptiveCardsComposer: FC = ({ +const AdaptiveCardsComposer = ({ adaptiveCardsHostConfig, adaptiveCardsPackage, children -}) => { +}: AdaptiveCardsComposerProps) => { const patchedAdaptiveCardsPackage = useMemo( () => adaptiveCardsPackage || defaultAdaptiveCardsPackage, [adaptiveCardsPackage] @@ -32,16 +31,4 @@ const AdaptiveCardsComposer: FC = ({ return {children}; }; -AdaptiveCardsComposer.defaultProps = { - adaptiveCardsHostConfig: undefined, - adaptiveCardsPackage: undefined, - children: undefined -}; - -AdaptiveCardsComposer.propTypes = { - adaptiveCardsHostConfig: PropTypes.any, - adaptiveCardsPackage: PropTypes.any, - children: PropTypes.any -}; - export default AdaptiveCardsComposer; diff --git a/packages/bundle/src/adaptiveCards/AdaptiveCardsContext.ts b/packages/bundle/src/adaptiveCards/AdaptiveCardsContext.ts index 2089f81013..0f7466aa99 100644 --- a/packages/bundle/src/adaptiveCards/AdaptiveCardsContext.ts +++ b/packages/bundle/src/adaptiveCards/AdaptiveCardsContext.ts @@ -1,12 +1,13 @@ import { createContext } from 'react'; -import AdaptiveCardsPackage from '../types/AdaptiveCardsPackage'; +import { type AdaptiveCardsPackage } from '../types/AdaptiveCardsPackage'; -type AdaptiveCardsContext = { +type AdaptiveCardsContextType = { adaptiveCardsPackage: AdaptiveCardsPackage; hostConfigFromProps: any; }; -const AdaptiveCardsContext = createContext(undefined); +const AdaptiveCardsContext = createContext(undefined); export default AdaptiveCardsContext; +export type { AdaptiveCardsContextType }; diff --git a/packages/bundle/src/adaptiveCards/AdaptiveCardsStyleOptions.ts b/packages/bundle/src/adaptiveCards/AdaptiveCardsStyleOptions.ts index dcef5beb06..e37e06ad78 100644 --- a/packages/bundle/src/adaptiveCards/AdaptiveCardsStyleOptions.ts +++ b/packages/bundle/src/adaptiveCards/AdaptiveCardsStyleOptions.ts @@ -29,5 +29,4 @@ type AdaptiveCardsStyleOptions = { type StrictAdaptiveCardsStyleOptions = Required; -export default AdaptiveCardsStyleOptions; -export { StrictAdaptiveCardsStyleOptions }; +export type { AdaptiveCardsStyleOptions, StrictAdaptiveCardsStyleOptions }; diff --git a/packages/bundle/src/adaptiveCards/AdaptiveCardsStyleSet.ts b/packages/bundle/src/adaptiveCards/AdaptiveCardsStyleSet.ts index be09edf418..2526275c2d 100644 --- a/packages/bundle/src/adaptiveCards/AdaptiveCardsStyleSet.ts +++ b/packages/bundle/src/adaptiveCards/AdaptiveCardsStyleSet.ts @@ -4,4 +4,4 @@ type AdaptiveCardsStyleSet = { audioCardAttachment: any; }; -export default AdaptiveCardsStyleSet; +export { type AdaptiveCardsStyleSet }; diff --git a/packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardBuilder.ts b/packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardBuilder.ts index 2dcf479ea3..56013d869d 100644 --- a/packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardBuilder.ts +++ b/packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardBuilder.ts @@ -1,6 +1,4 @@ import { - AdaptiveCard, - CardElement, Column, ColumnSet, Container, @@ -13,13 +11,15 @@ import { TextBlock, TextColor, TextSize, - TextWeight + TextWeight, + type AdaptiveCard, + type CardElement } from 'adaptivecards'; -import { isForbiddenPropertyName } from 'botframework-webchat-core'; import type { DirectLineCardAction } from 'botframework-webchat-core'; +import { isForbiddenPropertyName } from 'botframework-webchat-core'; -import AdaptiveCardsPackage from '../../types/AdaptiveCardsPackage'; -import AdaptiveCardsStyleOptions from '../AdaptiveCardsStyleOptions'; +import { type AdaptiveCardsPackage } from '../../types/AdaptiveCardsPackage'; +import { type AdaptiveCardsStyleOptions } from '../AdaptiveCardsStyleOptions'; export interface BotFrameworkCardAction { __isBotFrameworkCardAction: true; diff --git a/packages/bundle/src/adaptiveCards/Styles/createAdaptiveCardsStyleSet.ts b/packages/bundle/src/adaptiveCards/Styles/createAdaptiveCardsStyleSet.ts index d6ba53a548..85e48f396a 100644 --- a/packages/bundle/src/adaptiveCards/Styles/createAdaptiveCardsStyleSet.ts +++ b/packages/bundle/src/adaptiveCards/Styles/createAdaptiveCardsStyleSet.ts @@ -1,11 +1,11 @@ import { normalizeStyleOptions, StrictStyleOptions, StyleOptions } from 'botframework-webchat-api'; -import AdaptiveCardsStyleOptions, { StrictAdaptiveCardsStyleOptions } from '../AdaptiveCardsStyleOptions'; -import AdaptiveCardsStyleSet from '../AdaptiveCardsStyleSet'; +import { type AdaptiveCardsStyleOptions, type StrictAdaptiveCardsStyleOptions } from '../AdaptiveCardsStyleOptions'; +import { type AdaptiveCardsStyleSet } from '../AdaptiveCardsStyleSet'; +import normalizeAdaptiveCardsStyleOptions from '../normalizeStyleOptions'; import createAdaptiveCardRendererStyle from './StyleSet/AdaptiveCardRenderer'; import createAnimationCardAttachmentStyle from './StyleSet/AnimationCardAttachment'; import createAudioCardAttachmentStyle from './StyleSet/AudioCardAttachment'; -import normalizeAdaptiveCardsStyleOptions from '../normalizeStyleOptions'; // TODO: [P4] We should add a notice for people who want to use "styleSet" instead of "styleOptions". // "styleSet" is actually CSS stylesheet and it is based on the DOM tree. diff --git a/packages/bundle/src/adaptiveCards/defaultStyleOptions.ts b/packages/bundle/src/adaptiveCards/defaultStyleOptions.ts index 4845d8adb8..b327208656 100644 --- a/packages/bundle/src/adaptiveCards/defaultStyleOptions.ts +++ b/packages/bundle/src/adaptiveCards/defaultStyleOptions.ts @@ -1,4 +1,4 @@ -import AdaptiveCardsStyleOptions from './AdaptiveCardsStyleOptions'; +import { type AdaptiveCardsStyleOptions } from './AdaptiveCardsStyleOptions'; const ADAPTIVE_CARDS_DEFAULT_STYLE_OPTIONS: Required = { adaptiveCardsParserMaxVersion: undefined, diff --git a/packages/bundle/src/adaptiveCards/hooks/internal/useAdaptiveCardsContext.ts b/packages/bundle/src/adaptiveCards/hooks/internal/useAdaptiveCardsContext.ts index ba39f2ca72..791f9f43f1 100644 --- a/packages/bundle/src/adaptiveCards/hooks/internal/useAdaptiveCardsContext.ts +++ b/packages/bundle/src/adaptiveCards/hooks/internal/useAdaptiveCardsContext.ts @@ -1,8 +1,8 @@ import { useContext } from 'react'; -import AdaptiveCardsContext from '../../AdaptiveCardsContext'; +import AdaptiveCardsContext, { type AdaptiveCardsContextType } from '../../AdaptiveCardsContext'; -export default function useAdaptiveCardsContext(): AdaptiveCardsContext { +export default function useAdaptiveCardsContext(): AdaptiveCardsContextType { const context = useContext(AdaptiveCardsContext); if (!context) { diff --git a/packages/bundle/src/adaptiveCards/hooks/useAdaptiveCardsPackage.ts b/packages/bundle/src/adaptiveCards/hooks/useAdaptiveCardsPackage.ts index 24c4fdf03d..6eb47cab81 100644 --- a/packages/bundle/src/adaptiveCards/hooks/useAdaptiveCardsPackage.ts +++ b/packages/bundle/src/adaptiveCards/hooks/useAdaptiveCardsPackage.ts @@ -1,4 +1,4 @@ -import AdaptiveCardsPackage from '../../types/AdaptiveCardsPackage'; +import { type AdaptiveCardsPackage } from '../../types/AdaptiveCardsPackage'; import useAdaptiveCardsContext from './internal/useAdaptiveCardsContext'; export default function useAdaptiveCardsPackage(): [AdaptiveCardsPackage] { diff --git a/packages/bundle/src/adaptiveCards/normalizeStyleOptions.ts b/packages/bundle/src/adaptiveCards/normalizeStyleOptions.ts index 68c30bef97..cd388e220b 100644 --- a/packages/bundle/src/adaptiveCards/normalizeStyleOptions.ts +++ b/packages/bundle/src/adaptiveCards/normalizeStyleOptions.ts @@ -1,4 +1,4 @@ -import AdaptiveCardsStyleOptions, { StrictAdaptiveCardsStyleOptions } from './AdaptiveCardsStyleOptions'; +import { type AdaptiveCardsStyleOptions, type StrictAdaptiveCardsStyleOptions } from './AdaptiveCardsStyleOptions'; import defaultStyleOptions from './defaultStyleOptions'; export default function normalizeStyleOptions( diff --git a/packages/bundle/src/addVersion.js b/packages/bundle/src/addVersion.js index b359afd429..e6bb3f3663 100644 --- a/packages/bundle/src/addVersion.js +++ b/packages/bundle/src/addVersion.js @@ -1,12 +1,15 @@ -/* global global:readonly, process:readonly */ +/* global globalThis:readonly, process:readonly */ /* eslint no-empty: ["error", { "allowEmptyCatch": true }] */ -import { version as componentVersion } from 'botframework-webchat-component'; -import { version as coreVersion } from 'botframework-webchat-core'; +import { buildInfo as apiBuildInfo } from 'botframework-webchat-api'; +import { buildInfo as componentBuildInfo } from 'botframework-webchat-component'; +import { buildInfo as coreBuildInfo } from 'botframework-webchat-core'; + +const bundleVersion = process.env.npm_package_version; function setMetaTag(name, content) { try { - const { document } = global; + const { document } = globalThis; if (typeof document !== 'undefined' && document.createElement && document.head && document.head.appendChild) { const meta = document.querySelector(`html meta[name="${encodeURI(name)}"]`) || document.createElement('meta'); @@ -20,8 +23,25 @@ function setMetaTag(name, content) { } export default function addVersion(variant) { + setMetaTag( + 'botframework-webchat:api', + `version=${apiBuildInfo.version}; build-tool=${apiBuildInfo.buildTool}; module-format=${apiBuildInfo.moduleFormat}` + ); + setMetaTag( + 'botframework-webchat:bundle', + `version=${bundleVersion}; variant=${variant}; build-tool=${process.env.build_tool}; module-format=${process.env.module_format}` + ); + setMetaTag( + 'botframework-webchat:component', + `version=${componentBuildInfo.version}; build-tool=${componentBuildInfo.buildTool}; module-format=${componentBuildInfo.moduleFormat}` + ); + setMetaTag( + 'botframework-webchat:core', + `version=${coreBuildInfo.version}; build-tool=${coreBuildInfo.buildTool}; module-format=${coreBuildInfo.moduleFormat}` + ); + setMetaTag('botframework-webchat:bundle:variant', variant); setMetaTag('botframework-webchat:bundle:version', process.env.npm_package_version); - setMetaTag('botframework-webchat:core:version', coreVersion); - setMetaTag('botframework-webchat:ui:version', componentVersion); + setMetaTag('botframework-webchat:core:version', coreBuildInfo.version); + setMetaTag('botframework-webchat:ui:version', componentBuildInfo.version); } diff --git a/packages/bundle/src/createBrowserWebSpeechPonyfillFactory.ts b/packages/bundle/src/createBrowserWebSpeechPonyfillFactory.ts index cbea3553e7..1982e759e3 100644 --- a/packages/bundle/src/createBrowserWebSpeechPonyfillFactory.ts +++ b/packages/bundle/src/createBrowserWebSpeechPonyfillFactory.ts @@ -1,8 +1,7 @@ import { WebSpeechPonyfill } from 'botframework-webchat-api'; export default function createBrowserWebSpeechPonyfillFactory(): () => WebSpeechPonyfill { - // eslint-disable-next-line dot-notation - if (!window.SpeechRecognition && !window['webkitSpeechRecognition']) { + if (!window.SpeechRecognition && !window.webkitSpeechRecognition) { console.warn('Web Chat: This browser does not support Web Speech API Speech Recognition.'); } @@ -11,10 +10,8 @@ export default function createBrowserWebSpeechPonyfillFactory(): () => WebSpeech } return () => ({ - // eslint-disable-next-line dot-notation - SpeechGrammarList: window.SpeechGrammarList || window['webkitSpeechGrammarList'], - // eslint-disable-next-line dot-notation - SpeechRecognition: window.SpeechRecognition || window['webkitSpeechRecognition'], + SpeechGrammarList: window.SpeechGrammarList || window.webkitSpeechGrammarList, + SpeechRecognition: window.SpeechRecognition || window.webkitSpeechRecognition, speechSynthesis: window.speechSynthesis, SpeechSynthesisUtterance: window.SpeechSynthesisUtterance }); diff --git a/packages/bundle/src/createDirectLineSpeechAdapters.ts b/packages/bundle/src/createDirectLineSpeechAdapters.ts index cb06bc63de..51ccb4aa49 100644 --- a/packages/bundle/src/createDirectLineSpeechAdapters.ts +++ b/packages/bundle/src/createDirectLineSpeechAdapters.ts @@ -1,12 +1,12 @@ -import { AudioConfig } from 'microsoft-cognitiveservices-speech-sdk'; import { createAdapters } from 'botframework-directlinespeech-sdk'; import { WebSpeechPonyfill } from 'botframework-webchat-api'; import type { DirectLineJSBotConnection } from 'botframework-webchat-core'; +import { AudioConfig } from 'microsoft-cognitiveservices-speech-sdk'; +import createMicrophoneAudioConfigAndAudioContext from './speech/createMicrophoneAudioConfigAndAudioContext'; import CognitiveServicesAudioOutputFormat from './types/CognitiveServicesAudioOutputFormat'; import CognitiveServicesCredentials from './types/CognitiveServicesCredentials'; import CognitiveServicesTextNormalization from './types/CognitiveServicesTextNormalization'; -import createMicrophoneAudioConfigAndAudioContext from './speech/createMicrophoneAudioConfigAndAudioContext'; const DEFAULT_LANGUAGE = 'en-US'; @@ -39,10 +39,10 @@ export default function createDirectLineSpeechAdapters({ textNormalization?: CognitiveServicesTextNormalization; userID?: string; username?: string; -}): { +}): Promise<{ directLine: DirectLineJSBotConnection; webSpeechPonyfill: WebSpeechPonyfill; -} { +}> { if (audioConfig) { audioInputDeviceId && console.warn( @@ -70,6 +70,7 @@ export default function createDirectLineSpeechAdapters({ return createAdapters({ audioConfig, audioContext, + audioInputDeviceId: undefined, enableInternalHTTPSupport, enableTelemetry, fetchCredentials, @@ -80,5 +81,6 @@ export default function createDirectLineSpeechAdapters({ textNormalization, userID, username - }); + // TODO: [P1] Need to port Direct Line Speech SDK to TypeScript to remove this any. + }) as any; } diff --git a/packages/bundle/src/hooks/useStyleSet.ts b/packages/bundle/src/hooks/useStyleSet.ts index 766b4ddb18..3b69223476 100644 --- a/packages/bundle/src/hooks/useStyleSet.ts +++ b/packages/bundle/src/hooks/useStyleSet.ts @@ -1,6 +1,6 @@ import { hooks } from 'botframework-webchat-component'; -import type AdaptiveCardsStyleSet from '../adaptiveCards/AdaptiveCardsStyleSet'; +import { type AdaptiveCardsStyleSet } from '../adaptiveCards/AdaptiveCardsStyleSet'; const useMinimalStyleSet = hooks.useStyleSet; diff --git a/packages/bundle/src/index-es5.ts b/packages/bundle/src/index-es5.ts index e32fae66a1..2f83d6bc82 100644 --- a/packages/bundle/src/index-es5.ts +++ b/packages/bundle/src/index-es5.ts @@ -4,10 +4,12 @@ // Importing polyfills required for IE11/ES5. import './polyfill'; -import { version } from './index-minimal'; import addVersion from './addVersion'; import defaultCreateDirectLine from './createDirectLine'; import defaultCreateDirectLineAppServiceExtension from './createDirectLineAppServiceExtension'; +import { buildInfo as minimalBuildInfo, version } from './index-minimal'; + +const buildInfo = { ...minimalBuildInfo, variant: 'full-es5' }; export * from './index'; @@ -29,8 +31,11 @@ export const createDirectLineAppServiceExtension = options => { return defaultCreateDirectLineAppServiceExtension({ ...options, botAgent: `WebChat/${version} (ES5)` }); }; +export { buildInfo }; + window['WebChat'] = { ...window['WebChat'], + buildInfo, createDirectLine, createDirectLineAppServiceExtension }; diff --git a/packages/bundle/src/index-minimal.ts b/packages/bundle/src/index-minimal.ts index f206c11bef..e30d1be592 100644 --- a/packages/bundle/src/index-minimal.ts +++ b/packages/bundle/src/index-minimal.ts @@ -1,32 +1,31 @@ /* eslint dot-notation: ["error", { "allowPattern": "^WebChat$" }] */ // window['WebChat'] is required for TypeScript -import { - Constants, - createStore, - createStoreWithDevTools, - createStoreWithOptions, - version -} from 'botframework-webchat-core'; import { StrictStyleOptions, StyleOptions } from 'botframework-webchat-api'; +import { Constants, createStore, createStoreWithDevTools, createStoreWithOptions } from 'botframework-webchat-core'; import ReactWebChat, { Components, concatMiddleware, - connectToWebChat, createStyleSet, hooks, withEmoji } from 'botframework-webchat-component'; import addVersion from './addVersion'; -import coreRenderWebChat from './renderWebChat'; import createBrowserWebSpeechPonyfillFactory from './createBrowserWebSpeechPonyfillFactory'; import defaultCreateDirectLine from './createDirectLine'; import defaultCreateDirectLineAppServiceExtension from './createDirectLineAppServiceExtension'; +import coreRenderWebChat from './renderWebChat'; const renderWebChat = coreRenderWebChat.bind(null, ReactWebChat); +const buildTool = process.env.build_tool; +const moduleFormat = process.env.module_format; +const version = process.env.npm_package_version; + +const buildInfo = { buildTool, moduleFormat, variant: 'minimal', version }; + export const createDirectLine = options => { options.botAgent && console.warn( @@ -49,9 +48,9 @@ export default ReactWebChat; export { Components, - concatMiddleware, - connectToWebChat, Constants, + buildInfo, + concatMiddleware, createBrowserWebSpeechPonyfillFactory, createStore, createStoreWithDevTools, @@ -63,13 +62,12 @@ export { withEmoji }; -export type { StyleOptions, StrictStyleOptions }; +export type { StrictStyleOptions, StyleOptions }; // Until we have a development-specific bundle, we are not shipping createStoreWithDevTools in bundle. window['WebChat'] = { ...window['WebChat'], concatMiddleware, - connectToWebChat, Constants, createBrowserWebSpeechPonyfillFactory, createDirectLine, diff --git a/packages/bundle/src/index.ts b/packages/bundle/src/index.ts index 109dc67b15..40b9b468ab 100644 --- a/packages/bundle/src/index.ts +++ b/packages/bundle/src/index.ts @@ -3,35 +3,43 @@ export * from './index-minimal'; -import { Components as MinimalComponents, hooks, version, withEmoji } from './index-minimal'; +import FullComposer from './FullComposer'; +import ReactWebChat from './FullReactWebChat'; import AdaptiveCardContent from './adaptiveCards/Attachment/AdaptiveCardContent'; -import addVersion from './addVersion'; import AnimationCardContent from './adaptiveCards/Attachment/AnimationCardContent'; import AudioCardContent from './adaptiveCards/Attachment/AudioCardContent'; -import coreRenderWebChat from './renderWebChat'; -import createAdaptiveCardsAttachmentMiddleware from './adaptiveCards/createAdaptiveCardsAttachmentMiddleware'; -import createAdaptiveCardsAttachmentForScreenReaderMiddleware from './adaptiveCards/createAdaptiveCardsAttachmentForScreenReaderMiddleware'; -import createCognitiveServicesSpeechServicesPonyfillFactory from './createCognitiveServicesSpeechServicesPonyfillFactory'; -import createDirectLineSpeechAdapters from './createDirectLineSpeechAdapters'; -import createStyleSet from './createFullStyleSet'; -import defaultCreateDirectLine from './createDirectLine'; -import defaultCreateDirectLineAppServiceExtension from './createDirectLineAppServiceExtension'; -import FullBundleStyleOptions, { StrictFullBundleStyleOptions } from './types/FullBundleStyleOptions'; -import FullComposer from './FullComposer'; import HeroCardContent from './adaptiveCards/Attachment/HeroCardContent'; import OAuthCardContent from './adaptiveCards/Attachment/OAuthCardContent'; -import ReactWebChat from './FullReactWebChat'; import ReceiptCardContent from './adaptiveCards/Attachment/ReceiptCardContent'; -import renderMarkdown from './markdown/renderMarkdown'; import SignInCardContent from './adaptiveCards/Attachment/SignInCardContent'; import ThumbnailCardContent from './adaptiveCards/Attachment/ThumbnailCardContent'; +import VideoCardContent from './adaptiveCards/Attachment/VideoCardContent'; +import createAdaptiveCardsAttachmentForScreenReaderMiddleware from './adaptiveCards/createAdaptiveCardsAttachmentForScreenReaderMiddleware'; +import createAdaptiveCardsAttachmentMiddleware from './adaptiveCards/createAdaptiveCardsAttachmentMiddleware'; import useAdaptiveCardsHostConfig from './adaptiveCards/hooks/useAdaptiveCardsHostConfig'; import useAdaptiveCardsPackage from './adaptiveCards/hooks/useAdaptiveCardsPackage'; +import addVersion from './addVersion'; +import createCognitiveServicesSpeechServicesPonyfillFactory from './createCognitiveServicesSpeechServicesPonyfillFactory'; +import defaultCreateDirectLine from './createDirectLine'; +import defaultCreateDirectLineAppServiceExtension from './createDirectLineAppServiceExtension'; +import createDirectLineSpeechAdapters from './createDirectLineSpeechAdapters'; +import createStyleSet from './createFullStyleSet'; import useStyleOptions from './hooks/useStyleOptions'; import useStyleSet from './hooks/useStyleSet'; -import VideoCardContent from './adaptiveCards/Attachment/VideoCardContent'; +import { + Components as MinimalComponents, + hooks, + buildInfo as minimalBuildInfo, + version, + withEmoji +} from './index-minimal'; +import renderMarkdown from './markdown/renderMarkdown'; +import coreRenderWebChat from './renderWebChat'; +import { type AdaptiveCardsPackage } from './types/AdaptiveCardsPackage'; +import FullBundleStyleOptions, { StrictFullBundleStyleOptions } from './types/FullBundleStyleOptions'; const renderWebChat = coreRenderWebChat.bind(null, ReactWebChat); +const buildInfo = { ...minimalBuildInfo, variant: 'full' }; export const createDirectLine = (options: Omit[0], 'botAgent'>) => { (options as any).botAgent && @@ -86,8 +94,9 @@ export default ReactWebChat; export { Components, - createAdaptiveCardsAttachmentMiddleware, + buildInfo, createAdaptiveCardsAttachmentForScreenReaderMiddleware, + createAdaptiveCardsAttachmentMiddleware, createCognitiveServicesSpeechServicesPonyfillFactory, createDirectLineSpeechAdapters, createStyleSet, @@ -97,10 +106,11 @@ export { withEmoji }; -export type { StyleOptions, StrictStyleOptions }; +export type { AdaptiveCardsPackage, StrictStyleOptions, StyleOptions }; window['WebChat'] = { ...window['WebChat'], + buildInfo, Components, createAdaptiveCardsAttachmentMiddleware, createAdaptiveCardsAttachmentForScreenReaderMiddleware, diff --git a/packages/bundle/src/polyfill.ts b/packages/bundle/src/polyfill.ts index b36e807bdd..363e2f22b9 100644 --- a/packages/bundle/src/polyfill.ts +++ b/packages/bundle/src/polyfill.ts @@ -5,25 +5,25 @@ // To reduce conflicts with hosting app, we should consider using // @babel/plugin-transform-runtime to polyfill in transpiled code directly. -import 'core-js/features/array/find-index'; -import 'core-js/features/array/find'; -import 'core-js/features/array/from'; -import 'core-js/features/array/includes'; -import 'core-js/features/array/iterator'; -import 'core-js/features/dom-collections'; -import 'core-js/features/map'; -import 'core-js/features/math/sign'; -import 'core-js/features/number/is-finite'; -import 'core-js/features/object/assign'; -import 'core-js/features/object/entries'; -import 'core-js/features/object/from-entries'; -import 'core-js/features/object/is'; -import 'core-js/features/object/values'; -import 'core-js/features/promise'; -import 'core-js/features/promise/finally'; -import 'core-js/features/set'; -import 'core-js/features/string/ends-with'; -import 'core-js/features/string/starts-with'; -import 'core-js/features/symbol'; +import 'core-js/features/array/find-index.js'; +import 'core-js/features/array/find.js'; +import 'core-js/features/array/from.js'; +import 'core-js/features/array/includes.js'; +import 'core-js/features/array/iterator.js'; +import 'core-js/features/dom-collections/index.js'; +import 'core-js/features/map/index.js'; +import 'core-js/features/math/sign.js'; +import 'core-js/features/number/is-finite.js'; +import 'core-js/features/object/assign.js'; +import 'core-js/features/object/entries.js'; +import 'core-js/features/object/from-entries.js'; +import 'core-js/features/object/is.js'; +import 'core-js/features/object/values.js'; +import 'core-js/features/promise/index.js'; +import 'core-js/features/promise/finally.js'; +import 'core-js/features/set/index.js'; +import 'core-js/features/string/ends-with.js'; +import 'core-js/features/string/starts-with.js'; +import 'core-js/features/symbol/index.js'; import 'url-search-params-polyfill'; import 'whatwg-fetch'; diff --git a/packages/bundle/src/tsconfig.json b/packages/bundle/src/tsconfig.json index d3493c30d2..2cb13081a5 100644 --- a/packages/bundle/src/tsconfig.json +++ b/packages/bundle/src/tsconfig.json @@ -6,10 +6,11 @@ "declarationMap": true, "emitDeclarationOnly": true, "jsx": "react", + "module": "ESNext", + "moduleResolution": "Bundler", "preserveWatchOutput": true, "pretty": true, "skipLibCheck": true, "sourceMap": true - }, - "files": ["index.ts", "index-es5.ts", "index-minimal.ts"] + } } diff --git a/packages/bundle/src/types/AdaptiveCardsPackage.ts b/packages/bundle/src/types/AdaptiveCardsPackage.ts index 4ca8c4d416..6a19938960 100644 --- a/packages/bundle/src/types/AdaptiveCardsPackage.ts +++ b/packages/bundle/src/types/AdaptiveCardsPackage.ts @@ -3,9 +3,9 @@ import { GlobalSettings, HorizontalAlignment, HostConfig, + SerializationContext, TextSize, TextWeight, - SerializationContext, Version } from 'adaptivecards'; @@ -20,4 +20,4 @@ type AdaptiveCardsPackage = { Version: typeof Version; }; -export default AdaptiveCardsPackage; +export { type AdaptiveCardsPackage }; diff --git a/packages/bundle/src/types/FullBundleStyleOptions.ts b/packages/bundle/src/types/FullBundleStyleOptions.ts index 1cbb643c55..efed1f43cf 100644 --- a/packages/bundle/src/types/FullBundleStyleOptions.ts +++ b/packages/bundle/src/types/FullBundleStyleOptions.ts @@ -1,8 +1,11 @@ import { StrictStyleOptions, StyleOptions } from 'botframework-webchat-api'; -import AdaptiveCardStyleOptions, { StrictAdaptiveCardsStyleOptions } from '../adaptiveCards/AdaptiveCardsStyleOptions'; +import { + type AdaptiveCardsStyleOptions, + type StrictAdaptiveCardsStyleOptions +} from '../adaptiveCards/AdaptiveCardsStyleOptions'; -type FullBundleStyleOptions = StyleOptions & AdaptiveCardStyleOptions; +type FullBundleStyleOptions = StyleOptions & AdaptiveCardsStyleOptions; type StrictFullBundleStyleOptions = StrictStyleOptions & StrictAdaptiveCardsStyleOptions; export default FullBundleStyleOptions; diff --git a/packages/bundle/tsup.config.ts b/packages/bundle/tsup.config.ts new file mode 100644 index 0000000000..03b2fd6737 --- /dev/null +++ b/packages/bundle/tsup.config.ts @@ -0,0 +1,38 @@ +import path from 'path'; +import { defineConfig } from 'tsup'; +import baseConfig from '../../tsup.base.config'; + +// Redirect import paths for "microsoft-cognitiveservices-speech-sdk(...)" +// to point to es2015 distribution for all importing modules +const resolveCognitiveServicesToES2015 = { + name: 'microsoft-cognitiveservices-speech-sdk', + setup(build) { + build.onResolve({ filter: /microsoft-cognitiveservices-speech-sdk.+/u }, args => ({ + path: path.join(process.cwd(), 'node_modules', args.path.replace('distrib/lib', 'distrib/es2015') + '.js') + })); + } +}; + +export default defineConfig({ + ...baseConfig, + entry: { + 'botframework-webchat': './src/index.ts', + 'botframework-webchat.es5': './src/index-es5.ts', + 'botframework-webchat.minimal': './src/index-minimal.ts' + }, + env: { + ...baseConfig.env, + + // Followings are required by microsoft-cognitiveservices-speech-sdk: + NODE_TLS_REJECT_UNAUTHORIZED: '', + SPEECH_CONDUCT_OCSP_CHECK: '', + SPEECH_OCSP_CACHE_ROOT: '' + }, + esbuildPlugins: [...(baseConfig.esbuildPlugins || []), resolveCognitiveServicesToES2015], + noExternal: [ + '@babel/runtime', + 'memoize-one', + 'microsoft-cognitiveservices-speech-sdk', + 'web-speech-cognitive-services' + ] +}); diff --git a/packages/bundle/webpack.config.js b/packages/bundle/webpack.config.js index 68d9ac3b1c..9787e0aee5 100644 --- a/packages/bundle/webpack.config.js +++ b/packages/bundle/webpack.config.js @@ -9,9 +9,9 @@ const TerserPlugin = require('terser-webpack-plugin'); let config = { entry: { - webchat: './lib/index.js', - 'webchat-es5': './lib/index-es5.js', - 'webchat-minimal': './lib/index-minimal.js' + webchat: './dist/botframework-webchat.mjs', + 'webchat-es5': './dist/botframework-webchat.es5.mjs', + 'webchat-minimal': './dist/botframework-webchat.minimal.mjs' }, mode: 'production', module: { diff --git a/packages/component/.gitignore b/packages/component/.gitignore index d5e6cb6e00..62b899b6ae 100644 --- a/packages/component/.gitignore +++ b/packages/component/.gitignore @@ -1,3 +1,4 @@ /*.tgz -/lib -/node_modules +/dist/ +/lib/ +/node_modules/ diff --git a/packages/component/babel.config.json b/packages/component/babel.config.json index 4e04278270..20cd218298 100644 --- a/packages/component/babel.config.json +++ b/packages/component/babel.config.json @@ -26,7 +26,7 @@ [ "transform-inline-environment-variables", { - "include": ["NODE_ENV", "node_env", "npm_package_version"] + "include": ["build_tool", "module_format", "NODE_ENV", "node_env", "npm_package_version"] } ] ], diff --git a/packages/component/package-lock.json b/packages/component/package-lock.json index 3f37373263..0236b17f7b 100644 --- a/packages/component/package-lock.json +++ b/packages/component/package-lock.json @@ -40,7 +40,7 @@ "@babel/preset-typescript": "^7.18.6", "@types/mdast": "^4.0.3", "@types/node": "^20.10.3", - "@types/react": "^18.2.42", + "@types/react": "^16.14.60", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-transform-inline-environment-variables": "^0.4.4", "concurrently": "^8.2.2", @@ -58,7 +58,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.0" }, @@ -111,7 +111,7 @@ "version": "7.19.1", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.1.tgz", "integrity": "sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.9.0" } @@ -120,7 +120,7 @@ "version": "7.19.1", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.1.tgz", "integrity": "sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==", - "dev": true, + "devOptional": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", @@ -150,7 +150,7 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, + "devOptional": true, "bin": { "semver": "bin/semver.js" } @@ -159,7 +159,7 @@ "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/types": "^7.23.5", "@jridgewell/gen-mapping": "^0.3.2", @@ -199,7 +199,7 @@ "version": "7.19.1", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz", "integrity": "sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/compat-data": "^7.19.1", "@babel/helper-validator-option": "^7.18.6", @@ -217,7 +217,7 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, + "devOptional": true, "bin": { "semver": "bin/semver.js" } @@ -289,7 +289,7 @@ "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.9.0" } @@ -310,7 +310,7 @@ "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/template": "^7.22.15", "@babel/types": "^7.23.0" @@ -323,7 +323,7 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -358,7 +358,7 @@ "version": "7.19.0", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", @@ -432,7 +432,7 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/types": "^7.18.6" }, @@ -456,7 +456,7 @@ "version": "7.22.6", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -484,7 +484,7 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.9.0" } @@ -508,7 +508,7 @@ "version": "7.19.0", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/template": "^7.18.10", "@babel/traverse": "^7.19.0", @@ -535,7 +535,7 @@ "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", - "dev": true, + "devOptional": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -1820,7 +1820,7 @@ "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/code-frame": "^7.22.13", "@babel/parser": "^7.22.15", @@ -1834,7 +1834,7 @@ "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", - "dev": true, + "devOptional": true, "dependencies": { "@babel/code-frame": "^7.23.5", "@babel/generator": "^7.23.5", @@ -2034,7 +2034,7 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -2048,7 +2048,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.0.0" } @@ -2057,7 +2057,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.0.0" } @@ -2066,13 +2066,13 @@ "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "devOptional": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.17", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" @@ -2135,12 +2135,12 @@ "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" }, "node_modules/@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "16.14.60", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", + "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, @@ -2164,9 +2164,9 @@ } }, "node_modules/@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" }, "node_modules/@types/unist": { "version": "3.0.0", @@ -2371,7 +2371,7 @@ "version": "4.21.4", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -2429,7 +2429,7 @@ "version": "1.0.30001412", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -2828,7 +2828,7 @@ "version": "1.4.262", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.262.tgz", "integrity": "sha512-Ckn5haqmGh/xS8IbcgK3dnwAVnhDyo/WQnklWn6yaMucYTq7NNxwlGE8ElzEOnonzRLzUCo2Ot3vUb2GYUF2Hw==", - "dev": true + "devOptional": true }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -2859,7 +2859,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } @@ -2972,7 +2972,7 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.9.0" } @@ -3046,7 +3046,7 @@ "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=4" } @@ -3295,7 +3295,7 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, + "devOptional": true, "bin": { "jsesc": "bin/jsesc" }, @@ -3312,7 +3312,7 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, + "devOptional": true, "bin": { "json5": "lib/cli.js" }, @@ -3993,7 +3993,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true + "devOptional": true }, "node_modules/normalize-path": { "version": "3.0.0", @@ -4124,7 +4124,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "devOptional": true }, "node_modules/picomatch": { "version": "2.3.0", @@ -4158,6 +4158,18 @@ "react-is": "^16.13.1" } }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react-chain-of-responsibility": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/react-chain-of-responsibility/-/react-chain-of-responsibility-0.1.0.tgz", @@ -4211,6 +4223,19 @@ "react-is": "^16.8.1" } }, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, "node_modules/react-film": { "version": "3.1.1-main.df870ea", "resolved": "https://registry.npmjs.org/react-film/-/react-film-3.1.1-main.df870ea.tgz", @@ -4519,6 +4544,15 @@ "tslib": "^2.1.0" } }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, "node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -4772,7 +4806,7 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -4973,7 +5007,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", - "dev": true, + "devOptional": true, "requires": { "@jridgewell/trace-mapping": "^0.3.0" } @@ -5008,13 +5042,13 @@ "version": "7.19.1", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.1.tgz", "integrity": "sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==", - "dev": true + "devOptional": true }, "@babel/core": { "version": "7.19.1", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.1.tgz", "integrity": "sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==", - "dev": true, + "devOptional": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", @@ -5037,7 +5071,7 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true + "devOptional": true } } }, @@ -5045,7 +5079,7 @@ "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", - "dev": true, + "devOptional": true, "requires": { "@babel/types": "^7.23.5", "@jridgewell/gen-mapping": "^0.3.2", @@ -5076,7 +5110,7 @@ "version": "7.19.1", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz", "integrity": "sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==", - "dev": true, + "devOptional": true, "requires": { "@babel/compat-data": "^7.19.1", "@babel/helper-validator-option": "^7.18.6", @@ -5088,7 +5122,7 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true + "devOptional": true } } }, @@ -5143,7 +5177,7 @@ "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true + "devOptional": true }, "@babel/helper-explode-assignable-expression": { "version": "7.18.6", @@ -5158,7 +5192,7 @@ "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, + "devOptional": true, "requires": { "@babel/template": "^7.22.15", "@babel/types": "^7.23.0" @@ -5168,7 +5202,7 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, + "devOptional": true, "requires": { "@babel/types": "^7.22.5" } @@ -5194,7 +5228,7 @@ "version": "7.19.0", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", - "dev": true, + "devOptional": true, "requires": { "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", @@ -5250,7 +5284,7 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, + "devOptional": true, "requires": { "@babel/types": "^7.18.6" } @@ -5268,7 +5302,7 @@ "version": "7.22.6", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, + "devOptional": true, "requires": { "@babel/types": "^7.22.5" } @@ -5287,7 +5321,7 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "dev": true + "devOptional": true }, "@babel/helper-wrap-function": { "version": "7.18.11", @@ -5305,7 +5339,7 @@ "version": "7.19.0", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", - "dev": true, + "devOptional": true, "requires": { "@babel/template": "^7.18.10", "@babel/traverse": "^7.19.0", @@ -5326,7 +5360,7 @@ "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", - "dev": true + "devOptional": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", @@ -6186,7 +6220,7 @@ "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", - "dev": true, + "devOptional": true, "requires": { "@babel/code-frame": "^7.22.13", "@babel/parser": "^7.22.15", @@ -6197,7 +6231,7 @@ "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", - "dev": true, + "devOptional": true, "requires": { "@babel/code-frame": "^7.23.5", "@babel/generator": "^7.23.5", @@ -6371,7 +6405,7 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, + "devOptional": true, "requires": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -6382,25 +6416,25 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true + "devOptional": true }, "@jridgewell/set-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true + "devOptional": true }, "@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "devOptional": true }, "@jridgewell/trace-mapping": { "version": "0.3.17", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", - "dev": true, + "devOptional": true, "requires": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" @@ -6463,12 +6497,12 @@ "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" }, "@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "16.14.60", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", + "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", "requires": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, @@ -6494,9 +6528,9 @@ } }, "@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" }, "@types/unist": { "version": "3.0.0", @@ -6655,7 +6689,7 @@ "version": "4.21.4", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", - "dev": true, + "devOptional": true, "requires": { "caniuse-lite": "^1.0.30001400", "electron-to-chromium": "^1.4.251", @@ -6688,7 +6722,7 @@ "version": "1.0.30001412", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", - "dev": true + "devOptional": true }, "chalk": { "version": "2.4.2", @@ -6976,7 +7010,7 @@ "version": "1.4.262", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.262.tgz", "integrity": "sha512-Ckn5haqmGh/xS8IbcgK3dnwAVnhDyo/WQnklWn6yaMucYTq7NNxwlGE8ElzEOnonzRLzUCo2Ot3vUb2GYUF2Hw==", - "dev": true + "devOptional": true }, "emoji-regex": { "version": "8.0.0", @@ -7001,7 +7035,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "devOptional": true }, "escape-string-regexp": { "version": "1.0.5", @@ -7082,7 +7116,7 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true + "devOptional": true }, "get-caller-file": { "version": "2.0.5", @@ -7135,7 +7169,7 @@ "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "devOptional": true }, "growly": { "version": "1.3.0", @@ -7322,7 +7356,7 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true + "devOptional": true }, "json-parse-even-better-errors": { "version": "2.3.1", @@ -7333,7 +7367,7 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true + "devOptional": true }, "lines-and-columns": { "version": "1.2.4", @@ -7451,7 +7485,8 @@ "merge-refs": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.2.2.tgz", - "integrity": "sha512-RwcT7GsQR3KbuLw1rRuodq4Nt547BKEBkliZ0qqsrpyNne9bGTFtsFIsIpx82huWhcl3kOlOlH4H0xkPk/DqVw==" + "integrity": "sha512-RwcT7GsQR3KbuLw1rRuodq4Nt547BKEBkliZ0qqsrpyNne9bGTFtsFIsIpx82huWhcl3kOlOlH4H0xkPk/DqVw==", + "requires": {} }, "micromark": { "version": "4.0.0", @@ -7749,7 +7784,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true + "devOptional": true }, "normalize-path": { "version": "3.0.0", @@ -7844,7 +7879,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "devOptional": true }, "picomatch": { "version": "2.3.0", @@ -7869,6 +7904,15 @@ "react-is": "^16.13.1" } }, + "react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0" + } + }, "react-chain-of-responsibility": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/react-chain-of-responsibility/-/react-chain-of-responsibility-0.1.0.tgz", @@ -7917,6 +7961,16 @@ } } }, + "react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + } + }, "react-film": { "version": "3.1.1-main.df870ea", "resolved": "https://registry.npmjs.org/react-film/-/react-film-3.1.1-main.df870ea.tgz", @@ -8166,6 +8220,15 @@ "tslib": "^2.1.0" } }, + "scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "peer": true, + "requires": { + "loose-envify": "^1.1.0" + } + }, "semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -8351,7 +8414,7 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", - "dev": true, + "devOptional": true, "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" diff --git a/packages/component/package.json b/packages/component/package.json index 04fc07af05..fba084519f 100644 --- a/packages/component/package.json +++ b/packages/component/package.json @@ -2,8 +2,20 @@ "name": "botframework-webchat-component", "version": "0.0.0-0", "description": "React component of botframework-webchat", - "main": "lib/index.js", - "typings": "lib/index.d.ts", + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/botframework-webchat-component.d.mts", + "default": "./dist/botframework-webchat-component.mjs" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "publishConfig": { "access": "public" }, @@ -17,14 +29,16 @@ "url": "https://github.com/microsoft/BotFramework-WebChat/issues" }, "files": [ - "lib/**/*", - "src/**/*" + "./dist/**/*", + "./lib/**/*", + "./src/**/*" ], "homepage": "https://github.com/microsoft/BotFramework-WebChat/tree/main/packages/component#readme", "scripts": { "auditfix": "npm audit fix --legacy-peer-deps || exit 0", - "build": "npm run build:typescript && npm run build:babel", - "build:babel": "babel src --copy-files --extensions .js,.ts,.tsx --ignore **/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.ts,**/*.test.tsx,__tests__/**/*.js,__tests__/**/*.ts,__tests__/**/*.tsx --no-copy-ignored --out-dir lib --verbose", + "build": "npm run build:tsup && npm run build:typescript && npm run build:babel", + "build:babel": "build_tool=babel module_format=commonjs babel src --copy-files --extensions .js,.ts,.tsx --ignore **/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.ts,**/*.test.tsx,__tests__/**/*.js,__tests__/**/*.ts,__tests__/**/*.tsx --no-copy-ignored --out-dir lib --verbose", + "build:tsup": "tsup --config ./tsup.config.ts", "build:typescript": "tsc --project src/tsconfig.json", "bump": "npm run bump:prod && npm run bump:dev && npm run bump:auditfix", "bump:auditfix": "npm audit fix --legacy-peer-deps || exit 0", @@ -39,8 +53,9 @@ "precommit:eslint": "../../node_modules/.bin/eslint --report-unused-disable-directives --max-warnings 0", "precommit:typecheck": "tsc --project ./src --emitDeclarationOnly false --esModuleInterop true --noEmit --pretty false", "prestart": "npm run build:babel", - "start": "concurrently --kill-others --names \"babel,tsc\" \"npm run start:babel\" \"npm run start:typescript\"", + "start": "concurrently --kill-others --names \"babel,tsc,tsup\" \"npm run start:babel\" \"npm run start:typescript\" \"npm run start:tsup\"", "start:babel": "npm run build:babel -- --skip-initial-build --watch", + "start:tsup": "npm run build:tsup -- --watch", "start:typescript": "npm run build:typescript -- --watch" }, "pinDependencies": { @@ -64,6 +79,10 @@ "7.18.6", "@babel/*@7.21 is causing out-of-memory (OOM) issues" ], + "@types/react": [ + "16", + "react@16.8.6 is our baseline" + ], "compute-scroll-into-view": [ "1", "@>=2 does not support IE Mode" @@ -84,7 +103,7 @@ "@babel/preset-typescript": "^7.18.6", "@types/mdast": "^4.0.3", "@types/node": "^20.10.3", - "@types/react": "^18.2.42", + "@types/react": "^16.14.60", "babel-plugin-istanbul": "^6.1.1", "babel-plugin-transform-inline-environment-variables": "^0.4.4", "concurrently": "^8.2.2", diff --git a/packages/component/src/Activity/CarouselFilmStrip.js b/packages/component/src/Activity/CarouselFilmStrip.js index 5722b75d11..ba442accf2 100644 --- a/packages/component/src/Activity/CarouselFilmStrip.js +++ b/packages/component/src/Activity/CarouselFilmStrip.js @@ -8,7 +8,6 @@ import React from 'react'; import Bubble from './Bubble'; import CarouselFilmStripAttachment from './CarouselFilmStripAttachment'; -import connectToWebChat from '../connectToWebChat'; import isZeroOrPositive from '../Utils/isZeroOrPositive'; import ScreenReaderText from '../ScreenReaderText'; import textFormatToContentType from '../Utils/textFormatToContentType'; @@ -96,23 +95,6 @@ const ROOT_STYLE = { } }; -const connectCarouselFilmStrip = (...selectors) => - connectToWebChat( - ( - { - language, - styleSet: { - options: { botAvatarInitials, userAvatarInitials } - } - }, - { activity: { from: { role } = {} } = {} } - ) => ({ - avatarInitials: role === 'user' ? userAvatarInitials : botAvatarInitials, - language - }), - ...selectors - ); - const CarouselFilmStrip = ({ activity, className, @@ -283,5 +265,3 @@ CarouselFilmStrip.propTypes = { }; export default CarouselFilmStrip; - -export { connectCarouselFilmStrip }; diff --git a/packages/component/src/Activity/Speak.tsx b/packages/component/src/Activity/Speak.tsx index 7d27721a56..85a4b3cb0e 100644 --- a/packages/component/src/Activity/Speak.tsx +++ b/packages/component/src/Activity/Speak.tsx @@ -1,28 +1,18 @@ import { hooks } from 'botframework-webchat-api'; +import type { WebChatActivity } from 'botframework-webchat-core'; import PropTypes from 'prop-types'; import React, { FC, useCallback, useMemo } from 'react'; -import Say, { SayUtterance } from 'react-say'; -import type { WebChatActivity } from 'botframework-webchat-core'; +import ReactSay, { SayUtterance } from 'react-say'; -import connectToWebChat from '../connectToWebChat'; import SayAlt from './SayAlt'; +// TODO: [P1] Interop between Babel and esbuild. +const Say = 'default' in ReactSay ? ReactSay.default : ReactSay; const { useMarkActivityAsSpoken, useStyleOptions, useVoiceSelector } = hooks; // TODO: [P4] Consider moving this feature into BasicActivity // And it has better DOM position for showing visual spoken text -// TODO: [P3] We should add a "spoken" or "speakState" flag to indicate whether this activity is going to speak, or spoken -const connectSpeakActivity = (...selectors) => - connectToWebChat( - ({ language, markActivity, selectVoice }, { activity }) => ({ - language, - markAsSpoken: () => markActivity(activity, 'speak', false), - selectVoice: voices => selectVoice(voices, activity) - }), - ...selectors - ); - type SpeakProps = { activity: WebChatActivity; }; @@ -92,5 +82,3 @@ Speak.propTypes = { }; export default Speak; - -export { connectSpeakActivity }; diff --git a/packages/component/src/Activity/StackedLayout.tsx b/packages/component/src/Activity/StackedLayout.tsx index 64ebde8d7d..9ba7b4fb2e 100644 --- a/packages/component/src/Activity/StackedLayout.tsx +++ b/packages/component/src/Activity/StackedLayout.tsx @@ -6,7 +6,6 @@ import PropTypes from 'prop-types'; import React from 'react'; import Bubble from './Bubble'; -import connectToWebChat from '../connectToWebChat'; import isZeroOrPositive from '../Utils/isZeroOrPositive'; import ScreenReaderText from '../ScreenReaderText'; import textFormatToContentType from '../Utils/textFormatToContentType'; @@ -69,27 +68,6 @@ const ROOT_STYLE = { } }; -const connectStackedLayout = (...selectors) => - connectToWebChat( - ( - { - language, - styleSet: { - options: { botAvatarInitials, userAvatarInitials } - } - }, - { activity: { from: { role = undefined } = {} } = {} } - ) => ({ - avatarInitials: role === 'user' ? userAvatarInitials : botAvatarInitials, - language, - - // TODO: [P4] We want to deprecate botAvatarInitials/userAvatarInitials because they are not as helpful as avatarInitials - botAvatarInitials, - userAvatarInitials - }), - ...selectors - ); - type StackedLayoutProps = { activity: WebChatActivity; hideTimestamp?: boolean; @@ -267,5 +245,3 @@ StackedLayout.propTypes = { }; export default StackedLayout; - -export { connectStackedLayout }; diff --git a/packages/component/src/ActivityStatus/SendStatus/SendStatus.tsx b/packages/component/src/ActivityStatus/SendStatus/SendStatus.tsx index 0c11273b16..d99e8ec64b 100644 --- a/packages/component/src/ActivityStatus/SendStatus/SendStatus.tsx +++ b/packages/component/src/ActivityStatus/SendStatus/SendStatus.tsx @@ -5,7 +5,6 @@ import React, { FC, useCallback } from 'react'; import type { WebChatActivity } from 'botframework-webchat-core'; import { SENDING, SEND_FAILED, SENT } from '../../types/internal/SendStatus'; -import connectToWebChat from '../../connectToWebChat'; import SendFailedRetry from './private/SendFailedRetry'; import useFocus from '../../hooks/useFocus'; import useStyleSet from '../../hooks/useStyleSet'; @@ -14,23 +13,6 @@ import type { SendStatus as SendStatusType } from '../../types/internal/SendStat const { useLocalizer, usePostActivity } = hooks; -const connectSendStatus = (...selectors) => - connectToWebChat( - ({ focusSendBox, language, postActivity }, { activity }) => ({ - language, - retrySend: evt => { - evt.preventDefault(); - - postActivity(activity); - - // After clicking on "retry", the button will be removed from the DOM and focus will be lost (back to document.body) - // This ensures that focus will stay within Web Chat - focusSendBox(); - } - }), - ...selectors - ); - type SendStatusProps = { activity: WebChatActivity; sendStatus: SendStatusType; @@ -74,5 +56,3 @@ SendStatus.propTypes = { }; export default SendStatus; - -export { connectSendStatus }; diff --git a/packages/component/src/Attachment/Text/private/MarkdownTextContent.tsx b/packages/component/src/Attachment/Text/private/MarkdownTextContent.tsx index 3d94061cc5..81b0d53a88 100644 --- a/packages/component/src/Attachment/Text/private/MarkdownTextContent.tsx +++ b/packages/component/src/Attachment/Text/private/MarkdownTextContent.tsx @@ -8,7 +8,6 @@ import { } from 'botframework-webchat-core'; import classNames from 'classnames'; import type { Definition } from 'mdast'; -// @ts-expect-error TS1479 should be fixed when bumping to typescript@5. import { fromMarkdown } from 'mdast-util-from-markdown'; import React, { memo, useCallback, useMemo, type MouseEventHandler } from 'react'; import { useRefFrom } from 'use-ref-from'; @@ -20,7 +19,7 @@ import useStyleSet from '../../../hooks/useStyleSet'; import useShowModal from '../../../providers/ModalDialog/useShowModal'; import { type PropsOf } from '../../../types/PropsOf'; import CitationModalContext from './CitationModalContent'; -import MessageSensitivityLabel from './MessageSensitivityLabel'; +import MessageSensitivityLabel, { type MessageSensitivityLabelProps } from './MessageSensitivityLabel'; import isHTMLButtonElement from './isHTMLButtonElement'; const { useLocalizer } = hooks; @@ -196,7 +195,7 @@ const MarkdownTextContent = memo(({ activity, markdown }: Props) => { onClick={handleClick} /> {!!entries.length && ( - accessoryComponentType={messageSensitivityLabelProps && MessageSensitivityLabel} accessoryProps={messageSensitivityLabelProps} > diff --git a/packages/component/src/Attachment/Text/private/MessageSensitivityLabel.tsx b/packages/component/src/Attachment/Text/private/MessageSensitivityLabel.tsx index da3d6284e4..0f98d289b5 100644 --- a/packages/component/src/Attachment/Text/private/MessageSensitivityLabel.tsx +++ b/packages/component/src/Attachment/Text/private/MessageSensitivityLabel.tsx @@ -3,7 +3,7 @@ import React, { memo, useMemo } from 'react'; import ShieldIcon from './ShieldIcon'; -type Props = Readonly<{ +type MessageSensitivityLabelProps = Readonly<{ className?: string | undefined; color?: string | undefined; isEncrypted?: boolean | undefined; @@ -11,7 +11,7 @@ type Props = Readonly<{ title?: string | undefined; }>; -const MessageSensitivityLabel = memo(({ className, color, isEncrypted, name, title }: Props) => ( +const MessageSensitivityLabel = memo(({ className, color, isEncrypted, name, title }: MessageSensitivityLabelProps) => (
; -const ComposerCore: FC = ({ +const ComposerCore = ({ children, extraStyleSet, nonce, @@ -108,7 +107,7 @@ const ComposerCore: FC = ({ styleSet, suggestedActionsAccessKey, webSpeechPonyfillFactory -}) => { +}: ComposerCoreProps) => { const [dictateAbortable, setDictateAbortable] = useState(); const [referenceGrammarID] = useReferenceGrammarID(); const [styleOptions] = useStyleOptions(); @@ -274,7 +273,6 @@ const ComposerCore: FC = ({ }; ComposerCore.defaultProps = { - children: undefined, extraStyleSet: undefined, nonce: undefined, renderMarkdown: undefined, @@ -294,7 +292,7 @@ ComposerCore.propTypes = { type ComposerProps = APIComposerProps & ComposerCoreProps; -const Composer: FC = ({ +const Composer = ({ activityMiddleware, activityStatusMiddleware, attachmentForScreenReaderMiddleware, @@ -314,7 +312,7 @@ const Composer: FC = ({ typingIndicatorMiddleware, webSpeechPonyfillFactory, ...composerProps -}) => { +}: ComposerProps) => { const { nonce, onTelemetry } = composerProps; const theme = useTheme(); diff --git a/packages/component/src/Dictation.js b/packages/component/src/Dictation.js index 3f90066223..bccfbcbc61 100644 --- a/packages/component/src/Dictation.js +++ b/packages/component/src/Dictation.js @@ -1,16 +1,15 @@ -import { Composer as DictateComposer } from 'react-dictate-button'; -import { Constants } from 'botframework-webchat-core'; import { hooks } from 'botframework-webchat-api'; +// TODO: [P1] #3350 No import from internal, we need to move setDictateState from bf-wc-core (Redux) to React Context. +import { useSetDictateState } from 'botframework-webchat-api/internal'; +import { Constants } from 'botframework-webchat-core'; import PropTypes from 'prop-types'; import React, { useCallback, useEffect, useMemo } from 'react'; +import { Composer as DictateComposer } from 'react-dictate-button'; import useResumeAudioContext from './hooks/internal/useResumeAudioContext'; import useSettableDictateAbortable from './hooks/internal/useSettableDictateAbortable'; import useWebSpeechPonyfill from './hooks/useWebSpeechPonyfill'; -// TODO: [P1] #3350 No /lib/, we need to move setDictateState from bf-wc-core (Redux) to React Context. -import useSetDictateState from 'botframework-webchat-api/lib/hooks/internal/useSetDictateState'; - const { useActivities, useDictateInterims, diff --git a/packages/component/src/LinkDefinition/LinkDefinitions.tsx b/packages/component/src/LinkDefinition/LinkDefinitions.tsx index b03034ae4f..cd2e1d1577 100644 --- a/packages/component/src/LinkDefinition/LinkDefinitions.tsx +++ b/packages/component/src/LinkDefinition/LinkDefinitions.tsx @@ -1,17 +1,16 @@ import { hooks } from 'botframework-webchat-api'; import classNames from 'classnames'; -import React, { Children, memo, type ComponentType, type ReactNode } from 'react'; +import React, { Children, type ComponentType, type ReactNode } from 'react'; import useStyleSet from '../hooks/useStyleSet'; -import { type PropsOf } from '../types/PropsOf'; import Chevron from './private/Chevron'; const { useLocalizer } = hooks; const { count: childrenCount, map: childrenMap } = Children; -type Props = Readonly<{ - accessoryComponentType: TAccessory; - accessoryProps: PropsOf; +type Props = Readonly<{ + accessoryComponentType: ComponentType; + accessoryProps: TAccessoryProps; children?: ReactNode | undefined; }>; @@ -23,11 +22,11 @@ const REFERENCE_LIST_HEADER_IDS = { two: 'REFERENCE_LIST_HEADER_TWO' }; -const LinkDefinitions = ({ +const LinkDefinitions = ({ accessoryComponentType, accessoryProps, children -}: Props) => { +}: Props) => { const [{ linkDefinitions }] = useStyleSet(); const localizeWithPlural = useLocalizer({ plural: true }); @@ -58,4 +57,5 @@ const LinkDefinitions = ({ LinkDefinitions.displayName = 'LinkDefinitions'; -export default memo(LinkDefinitions); +// TODO: [P1] Add memo(). +export default LinkDefinitions; diff --git a/packages/component/src/LiveRegion/private/LiveRegionAttachments.tsx b/packages/component/src/LiveRegion/private/LiveRegionAttachments.tsx index 607c8debf2..b9b0de929e 100644 --- a/packages/component/src/LiveRegion/private/LiveRegionAttachments.tsx +++ b/packages/component/src/LiveRegion/private/LiveRegionAttachments.tsx @@ -1,10 +1,7 @@ import { hooks } from 'botframework-webchat-api'; -import PropTypes from 'prop-types'; +import { type WebChatActivity } from 'botframework-webchat-core'; import React, { Fragment } from 'react'; -import type { VFC } from 'react'; -import type { WebChatActivity } from 'botframework-webchat-core'; - const { useCreateAttachmentForScreenReaderRenderer, useLocalizer } = hooks; const ACTIVITY_NUM_ATTACHMENTS_ALT_IDS = { @@ -15,14 +12,14 @@ const ACTIVITY_NUM_ATTACHMENTS_ALT_IDS = { two: 'ACTIVITY_NUM_ATTACHMENTS_TWO_ALT' }; -type LiveRegionAttachmentsProps = { - activity: WebChatActivity & { type: 'message' }; -}; +type LiveRegionAttachmentsProps = Readonly<{ + activity: Readonly; +}>; // When "renderAttachments" is false, we will not render the content of attachments. // That means, it will only render "2 attachments", instead of "image attachment". // This is used in the visual transcript, where we render "Press ENTER to interact." -const LiveRegionAttachments: VFC = ({ activity }) => { +const LiveRegionAttachments = ({ activity }: LiveRegionAttachmentsProps) => { const { attachments = [] } = activity; const createAttachmentForScreenReaderRenderer = useCreateAttachmentForScreenReaderRenderer(); const localizeWithPlural = useLocalizer({ plural: true }); @@ -41,22 +38,13 @@ const LiveRegionAttachments: VFC = ({ activity }) => {attachmentForScreenReaderRenderers.map((render, index) => ( // Direct Line does not have key for attachment other than index. // eslint-disable-next-line react/no-array-index-key -
{render()}
+
{typeof render === 'function' && render()}
))} {numAttachmentsAlt &&

{numAttachmentsAlt}

} ); }; -LiveRegionAttachments.propTypes = { - // PropTypes is not fully compatible with TypeScript definition. - // @ts-ignore - activity: PropTypes.shape({ - attachments: PropTypes.array, - type: PropTypes.oneOf(['message']) - }).isRequired -}; - export default LiveRegionAttachments; export type { LiveRegionAttachmentsProps }; diff --git a/packages/component/src/ReactWebChat.tsx b/packages/component/src/ReactWebChat.tsx index 953050949e..2103379247 100644 --- a/packages/component/src/ReactWebChat.tsx +++ b/packages/component/src/ReactWebChat.tsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import React, { VFC } from 'react'; +import React from 'react'; import BasicWebChat from './BasicWebChat'; import Composer, { ComposerProps } from './Composer'; @@ -15,12 +15,14 @@ import Composer, { ComposerProps } from './Composer'; // Subset of landmark roles: https://w3.org/TR/wai-aria/#landmark_roles const ARIA_LANDMARK_ROLES = ['complementary', 'contentinfo', 'form', 'main', 'region']; -type ReactWebChatProps = Omit & { - className?: string; - role?: 'complementary' | 'contentinfo' | 'form' | 'main' | 'region'; -}; +type ReactWebChatProps = Readonly< + Omit & { + className?: string; + role?: 'complementary' | 'contentinfo' | 'form' | 'main' | 'region'; + } +>; -const ReactWebChat: VFC = ({ className, role, ...composerProps }) => ( +const ReactWebChat = ({ className, role, ...composerProps }: ReactWebChatProps) => ( diff --git a/packages/component/src/SendBox/DictationInterims.tsx b/packages/component/src/SendBox/DictationInterims.tsx index c5c2ec3a8a..cc6fd7f1c5 100644 --- a/packages/component/src/SendBox/DictationInterims.tsx +++ b/packages/component/src/SendBox/DictationInterims.tsx @@ -6,7 +6,6 @@ import classNames from 'classnames'; import PropTypes from 'prop-types'; import React, { FC } from 'react'; -import connectToWebChat from '../connectToWebChat'; import useStyleSet from '../hooks/useStyleSet'; import useStyleToEmotionObject from '../hooks/internal/useStyleToEmotionObject'; @@ -21,16 +20,6 @@ const ROOT_STYLE = { display: 'flex' }; -const connectDictationInterims = (...selectors) => - connectToWebChat( - ({ dictateInterims, dictateState, language }) => ({ - dictateInterims, - dictateState, - language - }), - ...selectors - ); - type DictationInterimsProps = { className?: string; }; @@ -77,5 +66,3 @@ DictationInterims.propTypes = { // stop the dictation and allow the user to type-correct the transcript export default DictationInterims; - -export { connectDictationInterims }; diff --git a/packages/component/src/SendBox/MicrophoneButton.tsx b/packages/component/src/SendBox/MicrophoneButton.tsx index ce4c1f40b9..a9d6d69361 100644 --- a/packages/component/src/SendBox/MicrophoneButton.tsx +++ b/packages/component/src/SendBox/MicrophoneButton.tsx @@ -1,20 +1,19 @@ // This is required for aria-controls. /* eslint react/forbid-dom-props: "off" */ -import { Constants } from 'botframework-webchat-core'; import { hooks } from 'botframework-webchat-api'; +import { Constants } from 'botframework-webchat-core'; import classNames from 'classnames'; import memoize from 'memoize-one'; import PropTypes from 'prop-types'; import React, { FC, useCallback, useState } from 'react'; -import connectToWebChat from '../connectToWebChat'; -import IconButton from './IconButton'; -import MicrophoneIcon from './Assets/MicrophoneIcon'; +import useStyleToEmotionObject from '../hooks/internal/useStyleToEmotionObject'; import useDictateAbortable from '../hooks/useDictateAbortable'; import useStyleSet from '../hooks/useStyleSet'; -import useStyleToEmotionObject from '../hooks/internal/useStyleToEmotionObject'; import useWebSpeechPonyfill from '../hooks/useWebSpeechPonyfill'; +import MicrophoneIcon from './Assets/MicrophoneIcon'; +import IconButton from './IconButton'; const { DictateState } = Constants; @@ -46,53 +45,6 @@ const ROOT_STYLE = { } }; -const connectMicrophoneButton = (...selectors) => { - const primeSpeechSynthesis = memoize((speechSynthesis, SpeechSynthesisUtterance) => { - if (speechSynthesis && SpeechSynthesisUtterance) { - const utterance = new SpeechSynthesisUtterance(''); - - [utterance.voice] = speechSynthesis.getVoices(); - speechSynthesis.speak(utterance); - } - }); - - return connectToWebChat( - ({ - disabled, - dictateInterims, - dictateState, - language, - setSendBox, - startDictate, - stopDictate, - stopSpeakingActivity, - webSpeechPonyfill - }) => { - const { speechSynthesis, SpeechSynthesisUtterance } = webSpeechPonyfill || {}; - - return { - click: () => { - if (dictateState === DictateState.WILL_START) { - stopSpeakingActivity(); - } else if (dictateState === DictateState.DICTATING) { - stopDictate(); - setSendBox(dictateInterims.join(' ')); - } else { - stopSpeakingActivity(); - startDictate(); - } - - primeSpeechSynthesis(speechSynthesis, SpeechSynthesisUtterance); - }, - dictating: dictateState === DictateState.DICTATING, - disabled: disabled || (dictateState === DictateState.STARTING && dictateState === DictateState.STOPPING), - language - }; - }, - ...selectors - ); -}; - function useMicrophoneButtonClick(): () => void { const [, setSendBox] = useSendBoxValue(); const [, setShouldSpeakIncomingActivity] = useShouldSpeakIncomingActivity(); @@ -205,4 +157,4 @@ MicrophoneButton.propTypes = { export default MicrophoneButton; -export { connectMicrophoneButton, useMicrophoneButtonClick, useMicrophoneButtonDisabled }; +export { useMicrophoneButtonClick, useMicrophoneButtonDisabled }; diff --git a/packages/component/src/SendBox/SendButton.tsx b/packages/component/src/SendBox/SendButton.tsx index b3409a3ce8..112509130c 100644 --- a/packages/component/src/SendBox/SendButton.tsx +++ b/packages/component/src/SendBox/SendButton.tsx @@ -3,7 +3,6 @@ import classNames from 'classnames'; import PropTypes from 'prop-types'; import React, { useCallback } from 'react'; -import connectToWebChat from '../connectToWebChat'; import IconButton from './IconButton'; import SendIcon from './Assets/SendIcon'; import useSubmit from '../providers/internal/SendBox/useSubmit'; @@ -12,16 +11,6 @@ import type { FC } from 'react'; const { useDisabled, useLocalizer } = hooks; -const connectSendButton = (...selectors) => - connectToWebChat( - ({ disabled, language, submitSendBox }) => ({ - disabled, - language, - submitSendBox - }), - ...selectors - ); - type SendButtonProps = { className?: string; }; @@ -54,5 +43,3 @@ SendButton.propTypes = { }; export default SendButton; - -export { connectSendButton }; diff --git a/packages/component/src/SendBox/SuggestedAction.tsx b/packages/component/src/SendBox/SuggestedAction.tsx index 021fdd7cc1..e06c806d52 100644 --- a/packages/component/src/SendBox/SuggestedAction.tsx +++ b/packages/component/src/SendBox/SuggestedAction.tsx @@ -4,7 +4,6 @@ import classNames from 'classnames'; import PropTypes from 'prop-types'; import React, { MouseEventHandler, useCallback, VFC } from 'react'; -import connectToWebChat from '../connectToWebChat'; import useFocusVisible from '../hooks/internal/useFocusVisible'; import useLocalizeAccessKey from '../hooks/internal/useLocalizeAccessKey'; import useStyleToEmotionObject from '../hooks/internal/useStyleToEmotionObject'; @@ -25,19 +24,6 @@ const ROOT_STYLE = { } }; -const connectSuggestedAction = (...selectors) => - connectToWebChat( - ({ clearSuggestedActions, disabled, language, onCardAction }, { displayText, text, type, value }) => ({ - click: () => { - onCardAction({ displayText, text, type, value }); - type === 'openUrl' && clearSuggestedActions(); - }, - disabled, - language - }), - ...selectors - ); - type SuggestedActionProps = { buttonText: string; className?: string; @@ -173,5 +159,3 @@ SuggestedAction.propTypes = { }; export default SuggestedAction; - -export { connectSuggestedAction }; diff --git a/packages/component/src/SendBox/SuggestedActions.tsx b/packages/component/src/SendBox/SuggestedActions.tsx index e397c6401a..66ea062352 100644 --- a/packages/component/src/SendBox/SuggestedActions.tsx +++ b/packages/component/src/SendBox/SuggestedActions.tsx @@ -1,24 +1,22 @@ /* eslint react/no-array-index-key: "off" */ import { hooks } from 'botframework-webchat-api'; -// eslint-disable-next-line import/no-named-as-default -import BasicFilm, { createBasicStyleSet as createBasicStyleSetForReactFilm } from 'react-film'; import classNames from 'classnames'; import PropTypes from 'prop-types'; -import React, { FC, useCallback, useMemo, useRef } from 'react'; -import type { DirectLineCardAction } from 'botframework-webchat-core'; +import React, { useCallback, useMemo, useRef } from 'react'; +// eslint-disable-next-line import/no-named-as-default +import BasicFilm, { createBasicStyleSet as createBasicStyleSetForReactFilm } from 'react-film'; import computeSuggestedActionText from '../Utils/computeSuggestedActionText'; -import connectToWebChat from '../connectToWebChat'; -import RovingTabIndexComposer from '../providers/RovingTabIndex/RovingTabIndexComposer'; -import SuggestedAction from './SuggestedAction'; -import useFocus from '../hooks/useFocus'; import useFocusWithin from '../hooks/internal/useFocusWithin'; import useNonce from '../hooks/internal/useNonce'; -import useStyleSet from '../hooks/useStyleSet'; import useStyleToEmotionObject from '../hooks/internal/useStyleToEmotionObject'; +import useFocus from '../hooks/useFocus'; +import useStyleSet from '../hooks/useStyleSet'; +import RovingTabIndexComposer from '../providers/RovingTabIndex/RovingTabIndexComposer'; +import SuggestedAction from './SuggestedAction'; -const { useDirection, useLocalizer, useStyleOptions } = hooks; +const { useDirection, useLocalizer, useStyleOptions, useSuggestedActions } = hooks; const ROOT_STYLE = { '&.webchat__suggested-actions': { @@ -34,15 +32,6 @@ const ROOT_STYLE = { } }; -const connectSuggestedActions = (...selectors) => - connectToWebChat( - ({ language, suggestedActions }) => ({ - language, - suggestedActions - }), - ...selectors - ); - const SuggestedActionCarouselContainer = ({ children, className, label }) => { const [ { @@ -209,12 +198,12 @@ SuggestedActionStackedContainer.propTypes = { label: PropTypes.string.isRequired }; -type SuggestedActionsProps = { +type SuggestedActionsProps = Readonly<{ className?: string; - suggestedActions?: DirectLineCardAction[]; -}; +}>; -const SuggestedActions: FC = ({ className, suggestedActions = [] }) => { +const SuggestedActions = ({ className }: SuggestedActionsProps) => { + const [suggestedActions] = useSuggestedActions(); const [{ suggestedActionLayout, suggestedActionsStackedLayoutButtonTextWrap }] = useStyleOptions(); const localize = useLocalizer(); const focus = useFocus(); @@ -301,28 +290,4 @@ const SuggestedActions: FC = ({ className, suggestedActio ); }; -SuggestedActions.defaultProps = { - className: '' -}; - -SuggestedActions.propTypes = { - className: PropTypes.string, - - // TypeScript class is not mappable to PropTypes.func - // @ts-ignore - suggestedActions: PropTypes.arrayOf( - PropTypes.shape({ - displayText: PropTypes.string, - image: PropTypes.string, - imageAltText: PropTypes.string, - text: PropTypes.string, - title: PropTypes.string, - type: PropTypes.string.isRequired, - value: PropTypes.any - }) - ).isRequired -}; - -export default connectSuggestedActions()(SuggestedActions); - -export { connectSuggestedActions }; +export default SuggestedActions; diff --git a/packages/component/src/SendBox/TextBox.tsx b/packages/component/src/SendBox/TextBox.tsx index 3f464df986..7891b5baea 100644 --- a/packages/component/src/SendBox/TextBox.tsx +++ b/packages/component/src/SendBox/TextBox.tsx @@ -1,6 +1,5 @@ import { hooks } from 'botframework-webchat-api'; import classNames from 'classnames'; -import PropTypes from 'prop-types'; import React, { useCallback, useMemo, useRef } from 'react'; import AccessibleInputText from '../Utils/AccessibleInputText'; @@ -79,7 +78,7 @@ const PREVENT_DEFAULT_HANDLER = event => event.preventDefault(); const SingleLineTextBox = withEmoji(AccessibleInputText); const MultiLineTextBox = withEmoji(AutoResizeTextArea); -const TextBox = ({ className }) => { +const TextBox = ({ className = '' }: Readonly<{ className?: string | undefined }>) => { const [value, setValue] = useSendBoxValue(); const [{ sendBoxTextBox: sendBoxTextBoxStyleSet }] = useStyleSet(); const [{ emojiSet, sendBoxTextWrap }] = useStyleOptions(); @@ -202,7 +201,7 @@ const TextBox = ({ className }) => { useRegisterFocusSendBox(focusCallback); - const emojiMap = useMemo(() => new Map(Object.entries(emojiSet)), [emojiSet]); + const emojiMap = useMemo(() => new Map(Object.entries(emojiSet)), [emojiSet]); return (
{ ); }; -TextBox.defaultProps = { - className: '' -}; - -TextBox.propTypes = { - className: PropTypes.string -}; - export default TextBox; export { useTextBoxSubmit, useTextBoxValue }; diff --git a/packages/component/src/SendBoxToolbar/UploadButton.tsx b/packages/component/src/SendBoxToolbar/UploadButton.tsx index 51b58e6b0d..6526d8f30d 100644 --- a/packages/component/src/SendBoxToolbar/UploadButton.tsx +++ b/packages/component/src/SendBoxToolbar/UploadButton.tsx @@ -5,8 +5,6 @@ import React, { useCallback, useRef, type FC, type FormEventHandler, type MouseE import { useRefFrom } from 'use-ref-from'; import IconButton from '../SendBox/IconButton'; -import downscaleImageToDataURL from '../Utils/downscaleImageToDataURL/index'; -import connectToWebChat from '../connectToWebChat'; import useMakeThumbnail from '../hooks/useMakeThumbnail'; import useStyleToEmotionObject from '../hooks/internal/useStyleToEmotionObject'; import useFocus from '../hooks/useFocus'; @@ -35,63 +33,6 @@ const ROOT_STYLE = { const PREVENT_DEFAULT_HANDLER = event => event.preventDefault(); -async function makeThumbnail(file, width, height, contentType, quality) { - if (/\.(gif|jpe?g|png)$/iu.test(file.name)) { - try { - return await downscaleImageToDataURL(file, width, height, contentType, quality); - } catch (error) { - console.warn(`Web Chat: Failed to downscale image due to ${error}.`); - } - } -} - -const connectUploadButton = (...selectors) => - connectToWebChat( - ({ - disabled, - language, - sendFiles, - styleSet: { - options: { - enableUploadThumbnail, - uploadThumbnailContentType, - uploadThumbnailHeight, - uploadThumbnailQuality, - uploadThumbnailWidth - } - } - }) => ({ - disabled, - language, - sendFiles: async files => { - if (files && files.length) { - // TODO: [P3] We need to find revokeObjectURL on the UI side - // Redux store should not know about the browser environment - // One fix is to use ArrayBuffer instead of object URL, but that would requires change to DirectLineJS - sendFiles( - await Promise.all( - [].map.call(files, async file => ({ - name: file.name, - size: file.size, - url: window.URL.createObjectURL(file), - ...(enableUploadThumbnail && { - thumbnail: await makeThumbnail( - file, - uploadThumbnailWidth, - uploadThumbnailHeight, - uploadThumbnailContentType, - uploadThumbnailQuality - ) - }) - })) - ) - ); - } - } - }), - ...selectors - ); - type UploadButtonProps = { className?: string; }; @@ -167,5 +108,3 @@ UploadButton.propTypes = { }; export default UploadButton; - -export { connectUploadButton }; diff --git a/packages/component/src/Utils/addTargetBlankToHyperlinksMarkdown.spec.js b/packages/component/src/Utils/addTargetBlankToHyperlinksMarkdown.spec.js index 2076803152..3c7fcab57b 100644 --- a/packages/component/src/Utils/addTargetBlankToHyperlinksMarkdown.spec.js +++ b/packages/component/src/Utils/addTargetBlankToHyperlinksMarkdown.spec.js @@ -1,12 +1,7 @@ -// TODO: [P4] Object.fromEntries is not on Node.js 11.* -// If all devs are on Node.js >= 12.0, we can remove "core-js" -import fromEntries from 'core-js/features/object/from-entries'; import MarkdownIt from 'markdown-it'; import addTargetBlankToHyperlinksMarkdown from './addTargetBlankToHyperlinksMarkdown'; -Object.fromEntries = fromEntries; - test('add to external links', () => { const markdownIt = new MarkdownIt(); const markdown = 'Hello, [Microsoft](https://microsoft.com/)!'; diff --git a/packages/component/src/Utils/updateMarkdownAttrs.spec.js b/packages/component/src/Utils/updateMarkdownAttrs.spec.js index 18c414de72..a92d1a1768 100644 --- a/packages/component/src/Utils/updateMarkdownAttrs.spec.js +++ b/packages/component/src/Utils/updateMarkdownAttrs.spec.js @@ -1,11 +1,5 @@ -// TODO: [P4] Object.fromEntries is not on Node.js 11.* -// If all devs are on Node.js >= 12.0, we can remove "core-js" -import fromEntries from 'core-js/features/object/from-entries'; - import updateMarkdownAttrs from './updateMarkdownAttrs'; -Object.fromEntries = fromEntries; - test('add "rel" and "target" attributes', () => { const token = { attrs: [['href', 'https://example.org/']] diff --git a/packages/component/src/connectToWebChat.js b/packages/component/src/connectToWebChat.js deleted file mode 100644 index 8b2c4233c6..0000000000 --- a/packages/component/src/connectToWebChat.js +++ /dev/null @@ -1,60 +0,0 @@ -import { connect } from 'react-redux'; -import { isForbiddenPropertyName } from 'botframework-webchat-core'; -import React from 'react'; - -import WebChatAPIContext from 'botframework-webchat-api/lib/hooks/internal/WebChatAPIContext'; -import WebChatReduxContext from 'botframework-webchat-api/lib/hooks/internal/WebChatReduxContext'; - -function removeUndefinedValues(map) { - return Object.keys(map).reduce((result, key) => { - if (!isForbiddenPropertyName(key)) { - // Mitigated through denylisting. - // eslint-disable-next-line security/detect-object-injection - const value = map[key]; - - if (typeof value !== 'undefined') { - // Mitigated through denylisting. - // eslint-disable-next-line security/detect-object-injection - result[key] = value; - } - } - - return result; - }, {}); -} - -function combineSelectors(...selectors) { - return (...args) => - selectors.reduce( - (result, selector) => ({ - ...result, - ...removeUndefinedValues((selector && selector(...args)) || {}) - }), - {} - ); -} - -export default function connectToWebChat(...selectors) { - const combinedSelector = combineSelectors(...selectors); - - // TODO: [P1] Instead of exposing Redux store via props, we should consider exposing via Context. - // We should also hide dispatch function. - return Component => { - const ConnectedComponent = connect( - (state, { context, ...ownProps }) => combinedSelector({ ...state, ...context }, ownProps), - null, - null, - { - context: WebChatReduxContext - } - )(Component); - - const WebChatConnectedComponent = props => ( - - {context => } - - ); - - return WebChatConnectedComponent; - }; -} diff --git a/packages/component/src/hooks/internal/BypassSpeechSynthesisPonyfill.js b/packages/component/src/hooks/internal/BypassSpeechSynthesisPonyfill.js index 968a053d39..e9790300fd 100644 --- a/packages/component/src/hooks/internal/BypassSpeechSynthesisPonyfill.js +++ b/packages/component/src/hooks/internal/BypassSpeechSynthesisPonyfill.js @@ -6,7 +6,7 @@ /* eslint max-classes-per-file: ["error", 4] */ /* eslint no-empty-function: "off" */ -import EventTarget, { Event, getEventAttributeValue, setEventAttributeValue } from 'event-target-shim/es5'; +import EventTarget, { Event, getEventAttributeValue, setEventAttributeValue } from 'event-target-shim'; class SpeechSynthesisEvent extends Event { constructor(type, utterance) { diff --git a/packages/component/src/index.ts b/packages/component/src/index.ts index 4caac3fe54..4abbce7934 100644 --- a/packages/component/src/index.ts +++ b/packages/component/src/index.ts @@ -1,4 +1,5 @@ import { hooks as apiHooks, concatMiddleware, localize } from 'botframework-webchat-api'; +import { type WebChatActivity } from 'botframework-webchat-core'; import ReactWebChat, { ReactWebChatProps } from './ReactWebChat'; @@ -15,8 +16,8 @@ import BasicSendBoxToolbar from './SendBoxToolbar/BasicSendBoxToolbar'; import Avatar from './Activity/Avatar'; import Bubble from './Activity/Bubble'; -import SpeakActivity, { connectSpeakActivity } from './Activity/Speak'; -import SendStatus, { connectSendStatus } from './ActivityStatus/SendStatus/SendStatus'; +import SpeakActivity from './Activity/Speak'; +import SendStatus from './ActivityStatus/SendStatus/SendStatus'; import Timestamp from './ActivityStatus/Timestamp'; import ErrorBox from './ErrorBox'; @@ -31,19 +32,18 @@ import VideoContent from './Attachment/VideoContent'; import VimeoContent from './Attachment/VimeoContent'; import YouTubeContent from './Attachment/YouTubeContent'; -import DictationInterims, { connectDictationInterims } from './SendBox/DictationInterims'; -import MicrophoneButton, { connectMicrophoneButton } from './SendBox/MicrophoneButton'; -import SendButton, { connectSendButton } from './SendBox/SendButton'; -import SuggestedActions, { connectSuggestedActions } from './SendBox/SuggestedActions'; +import DictationInterims from './SendBox/DictationInterims'; +import MicrophoneButton from './SendBox/MicrophoneButton'; +import SendButton from './SendBox/SendButton'; +import SuggestedActions from './SendBox/SuggestedActions'; import SendTextBox from './SendBox/TextBox'; -import UploadButton, { connectUploadButton } from './SendBoxToolbar/UploadButton'; +import UploadButton from './SendBoxToolbar/UploadButton'; import createCoreAttachmentMiddleware from './Attachment/createMiddleware'; import createCoreActivityMiddleware from './Middleware/Activity/createCoreMiddleware'; import createCoreActivityStatusMiddleware from './Middleware/ActivityStatus/createCoreMiddleware'; import createStyleSet from './Styles/createStyleSet'; import getTabIndex from './Utils/TypeFocusSink/getTabIndex'; -import connectToWebChat from './connectToWebChat'; import Context from './hooks/internal/WebChatUIContext'; import ThemeProvider from './providers/Theme/ThemeProvider'; import withEmoji from './withEmoji/withEmoji'; @@ -55,8 +55,12 @@ const hooks = { ...componentHooks }; +const buildTool = process.env.build_tool; +const moduleFormat = process.env.module_format; const version = process.env.npm_package_version; +const buildInfo = { buildTool, moduleFormat, version }; + const Components = { BasicWebChat, Composer, @@ -88,9 +92,6 @@ const Components = { SpeakActivity, Timestamp, - connectSendStatus, - connectSpeakActivity, - // Components for recomposing send box DictationInterims, MicrophoneButton, @@ -99,12 +100,6 @@ const Components = { SuggestedActions, UploadButton, - connectDictationInterims, - connectMicrophoneButton, - connectSendButton, - connectSuggestedActions, - connectUploadButton, - // Components for localization LocalizedString }; @@ -114,8 +109,8 @@ export default ReactWebChat; export { Components, Context, + buildInfo, concatMiddleware, - connectToWebChat, createCoreActivityMiddleware, createCoreActivityStatusMiddleware, createCoreAttachmentMiddleware, @@ -127,4 +122,4 @@ export { withEmoji }; -export type { BasicWebChatProps, ComposerProps, ReactWebChatProps }; +export type { BasicWebChatProps, ComposerProps, ReactWebChatProps, WebChatActivity }; diff --git a/packages/component/src/tsconfig.json b/packages/component/src/tsconfig.json index a8e108c83c..155ef2b6cc 100644 --- a/packages/component/src/tsconfig.json +++ b/packages/component/src/tsconfig.json @@ -7,13 +7,12 @@ "downlevelIteration": true, "emitDeclarationOnly": true, "jsx": "react", - "module": "NodeNext", - "moduleResolution": "NodeNext", + "module": "ESNext", + "moduleResolution": "Bundler", "preserveWatchOutput": true, "pretty": true, "skipLibCheck": true, "sourceMap": true, "target": "ESNext" - }, - "files": ["index.ts"] + } } diff --git a/packages/component/tsup.config.ts b/packages/component/tsup.config.ts new file mode 100644 index 0000000000..4e7a924794 --- /dev/null +++ b/packages/component/tsup.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'tsup'; +import baseConfig from '../../tsup.base.config'; + +export default defineConfig({ + ...baseConfig, + entry: { + 'botframework-webchat-component': './src/index.ts' + }, + noExternal: ['event-target-shim'] +}); diff --git a/packages/core/.gitignore b/packages/core/.gitignore index d5e6cb6e00..62b899b6ae 100644 --- a/packages/core/.gitignore +++ b/packages/core/.gitignore @@ -1,3 +1,4 @@ /*.tgz -/lib -/node_modules +/dist/ +/lib/ +/node_modules/ diff --git a/packages/core/babel.config.json b/packages/core/babel.config.json index 4a72ef0a8d..5b2337a762 100644 --- a/packages/core/babel.config.json +++ b/packages/core/babel.config.json @@ -10,7 +10,7 @@ [ "transform-inline-environment-variables", { - "include": ["npm_package_version"] + "include": ["build_tool", "module_format", "npm_package_version"] } ] ], diff --git a/packages/core/package.json b/packages/core/package.json index 6cf01df292..4118f1223e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -2,8 +2,20 @@ "name": "botframework-webchat-core", "version": "0.0.0-0", "description": "Core of botframework-webchat", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/botframework-webchat-core.d.mts", + "default": "./dist/botframework-webchat-core.mjs" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "publishConfig": { "access": "public" }, @@ -17,8 +29,9 @@ "url": "https://github.com/microsoft/BotFramework-WebChat/issues" }, "files": [ - "lib/**/*", - "src/**/*" + "./dist/**/*", + "./lib/**/*", + "./src/**/*" ], "homepage": "https://github.com/microsoft/BotFramework-WebChat/packages/core#readme", "tsd": { @@ -34,8 +47,9 @@ }, "scripts": { "auditfix": "npm audit fix --legacy-peer-deps || exit 0", - "build": "npm run build:typescript && npm run build:babel", - "build:babel": "babel src --extensions .js,.ts,.tsx --ignore **/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.ts,**/*.test.tsx,__tests__/**/*.js,__tests__/**/*.ts,__tests__/**/*.tsx --out-dir lib --verbose", + "build": "npm run build:tsup && npm run build:typescript && npm run build:babel", + "build:babel": "build_tool=babel module_format=commonjs babel src --extensions .js,.ts,.tsx --ignore **/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.ts,**/*.test.tsx,__tests__/**/*.js,__tests__/**/*.ts,__tests__/**/*.tsx --out-dir lib --verbose", + "build:tsup": "tsup --config ./tsup.config.ts", "build:typescript": "tsc --project src/tsconfig.json", "bump": "npm run bump:prod && npm run bump:dev && npm run bump:auditfix", "bump:auditfix": "npm audit fix --legacy-peer-deps || exit 0", @@ -50,8 +64,9 @@ "precommit:eslint": "../../node_modules/.bin/eslint --report-unused-disable-directives --max-warnings 0", "precommit:typecheck": "tsc --project ./src --emitDeclarationOnly false --esModuleInterop true --noEmit --pretty false", "prestart": "npm run build:babel", + "start": "concurrently --kill-others --names \"babel,tsc,tsup\" \"npm run start:babel\" \"npm run start:typescript\" \"npm run start:tsup\"", "start:babel": "npm run build:babel -- --skip-initial-build --watch", - "start": "concurrently --kill-others --names \"babel,tsc\" \"npm run start:babel\" \"npm run start:typescript\"", + "start:tsup": "npm run build:tsup -- --watch", "start:typescript": "npm run build:typescript -- --watch" }, "devDependencies": { diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 46f3a4891d..753e5faf87 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -68,10 +68,15 @@ import type { Project as OrgSchemaProject } from './types/external/OrgSchema/Pro import type { Thing as OrgSchemaThing } from './types/external/OrgSchema/Thing'; const Constants = { ActivityClientState, DictateState }; +const buildTool = process.env.build_tool; +const moduleFormat = process.env.module_format; const version = process.env.npm_package_version; +const buildInfo = { buildTool, moduleFormat, version }; + export { Constants, + buildInfo, clearSuggestedActions, connect, createStore, @@ -83,6 +88,7 @@ export { getOrgSchemaMessage, isForbiddenPropertyName, markActivity, + moduleFormat, onErrorResumeNext, parseAction, parseClaim, diff --git a/packages/core/src/tsconfig.json b/packages/core/src/tsconfig.json index d7a9bce1b3..66fac1ebad 100644 --- a/packages/core/src/tsconfig.json +++ b/packages/core/src/tsconfig.json @@ -7,6 +7,8 @@ "downlevelIteration": true, "emitDeclarationOnly": true, "jsx": "react", + "module": "ESNext", + "moduleResolution": "Bundler", "preserveWatchOutput": true, "pretty": true, "resolveJsonModule": true, // Required for localization files diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts new file mode 100644 index 0000000000..b420a3920a --- /dev/null +++ b/packages/core/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup'; +import baseConfig from '../../tsup.base.config'; + +export default defineConfig({ + ...baseConfig, + entry: { + 'botframework-webchat-core': './src/index.ts' + } +}); diff --git a/packages/directlinespeech/.gitignore b/packages/directlinespeech/.gitignore index c8d20095ff..b280f29f60 100644 --- a/packages/directlinespeech/.gitignore +++ b/packages/directlinespeech/.gitignore @@ -1,6 +1,6 @@ /.env /*.tgz -/coverage -/dist -/lib -/node_modules +/coverage/ +/dist/ +/lib/ +/node_modules/ diff --git a/packages/directlinespeech/babel.config.json b/packages/directlinespeech/babel.config.json index 5b901ef95c..aa7f398c26 100644 --- a/packages/directlinespeech/babel.config.json +++ b/packages/directlinespeech/babel.config.json @@ -20,7 +20,7 @@ [ "babel-plugin-transform-inline-environment-variables", { - "include": ["npm_package_version"] + "include": ["build_tool", "module_format", "npm_package_version"] } ] ], diff --git a/packages/directlinespeech/package.json b/packages/directlinespeech/package.json index 547e1d63b5..041acedbc1 100644 --- a/packages/directlinespeech/package.json +++ b/packages/directlinespeech/package.json @@ -3,16 +3,28 @@ "version": "0.0.0-0", "description": "Direct Line Speech SDK", "files": [ - "dist/**/*.js", - "dist/**/*.map", - "lib/**/*", - "src/**/*" + "./dist/**/*", + "./lib/**/*", + "./src/**/*" ], - "main": "lib/index.js", + "main": "./lib/index.js", + "exports": { + ".": { + "import": { + "types": "./dist/botframework-directlinespeech-sdk.d.mts", + "default": "./dist/botframework-directlinespeech-sdk.mjs" + }, + "require": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + } + }, "scripts": { "auditfix": "npm audit fix --legacy-peer-deps || exit 0", - "build": "npm run build:babel && npm run build:webpack", - "build:babel": "babel src --ignore **/*.spec.js,**/*.test.js,__tests__/**/*.js --out-dir lib --verbose", + "build": "npm run build:tsup && npm run build:babel && npm run build:webpack", + "build:babel": "build_tool=babel module_format=commonjs babel src --ignore **/*.spec.js,**/*.test.js,__tests__/**/*.js --out-dir lib --verbose", + "build:tsup": "tsup --config ./tsup.config.ts", "build:webpack:development": "cross-env node_env=development webpack-cli", "build:webpack:production": "cross-env node_env=production webpack-cli", "build:webpack": "concurrently --names \"dev,prod\" \"npm run build:webpack:development\" \"npm run build:webpack:production\"", @@ -29,10 +41,11 @@ "precommit:eslint": "eslint --report-unused-disable-directives --max-warnings 0", "prestart": "npm run build:babel", "prettier": "prettier --check src/**/*.{js,ts}", - "start": "npm run start:babel && concurrently --kill-others --names \"babel,serve,webpack\" \"npm run start:babel:watch\" \"npm run start:serve\" \"npm run start:webpack\"", + "start": "npm run start:babel && concurrently --kill-others --names \"babel,serve,tsup,webpack\" \"npm run start:babel:watch\" \"npm run start:serve\" \"npm run start:tsup\" \"npm run start:webpack\"", "start:babel:watch": "npm run start:babel -- --skip-initial-build --watch", "start:babel": "npm run build:babel --", "start:serve": "serve", + "start:tsup": "npm run build:tsup -- --watch", "start:webpack": "npm run build:webpack:development -- --watch", "test": "jest --watch" }, diff --git a/packages/directlinespeech/src/DirectLineSpeech.js b/packages/directlinespeech/src/DirectLineSpeech.js index 5c39d94a5f..e8c53b1ac1 100644 --- a/packages/directlinespeech/src/DirectLineSpeech.js +++ b/packages/directlinespeech/src/DirectLineSpeech.js @@ -1,6 +1,6 @@ /* eslint no-magic-numbers: ["error", { "ignore": [0, 1, 2, 4, 36] }] */ -import Observable from 'core-js/features/observable'; +import Observable from 'core-js/features/observable/index.js'; import random from 'math-random'; import shareObservable from './shareObservable'; diff --git a/packages/directlinespeech/src/SpeechSynthesisAudioStreamUtterance.js b/packages/directlinespeech/src/SpeechSynthesisAudioStreamUtterance.js index 51dab29060..a2ff24c7dd 100644 --- a/packages/directlinespeech/src/SpeechSynthesisAudioStreamUtterance.js +++ b/packages/directlinespeech/src/SpeechSynthesisAudioStreamUtterance.js @@ -1,4 +1,4 @@ -import EventTarget, { getEventAttributeValue, setEventAttributeValue } from 'event-target-shim/es5'; +import EventTarget, { getEventAttributeValue, setEventAttributeValue } from 'event-target-shim'; class SpeechSynthesisAudioStreamUtterance extends EventTarget { constructor(audioStream) { diff --git a/packages/directlinespeech/src/createWebSpeechPonyfillFactory.js b/packages/directlinespeech/src/createWebSpeechPonyfillFactory.js index c9a1d3c7d8..5408dbfb1f 100644 --- a/packages/directlinespeech/src/createWebSpeechPonyfillFactory.js +++ b/packages/directlinespeech/src/createWebSpeechPonyfillFactory.js @@ -1,10 +1,10 @@ /* eslint class-methods-use-this: ["error", { "exceptMethods": ["cancel", "getVoices", "speak"] }] */ import { AbortController } from 'abort-controller-es5'; -import { createSpeechRecognitionPonyfillFromRecognizer } from 'web-speech-cognitive-services/lib/SpeechServices/SpeechToText'; +import { createSpeechRecognitionPonyfillFromRecognizer } from 'web-speech-cognitive-services/lib/SpeechServices/SpeechToText.js'; import createTaskQueue from './createTaskQueue'; -import EventTarget, { Event, getEventAttributeValue, setEventAttributeValue } from 'event-target-shim/es5'; +import EventTarget, { Event, getEventAttributeValue, setEventAttributeValue } from 'event-target-shim'; import playCognitiveServicesStream from './playCognitiveServicesStream'; import playWhiteNoise from './playWhiteNoise'; import SpeechSynthesisAudioStreamUtterance from './SpeechSynthesisAudioStreamUtterance'; diff --git a/packages/directlinespeech/src/index.js b/packages/directlinespeech/src/index.js index 74a39ccd01..43722f4227 100644 --- a/packages/directlinespeech/src/index.js +++ b/packages/directlinespeech/src/index.js @@ -1,17 +1,29 @@ -import 'core-js/features/object/entries'; +/* global process:readonly */ +import 'core-js/features/object/entries.js'; import createAdapters from './createAdapters'; -export { createAdapters }; +const buildTool = process.env.build_tool; +const moduleFormat = process.env.module_format; +const version = process.env.npm_package_version; + +const buildInfo = { buildTool, moduleFormat, version }; + +export { buildInfo, createAdapters }; if (typeof HTMLDocument !== 'undefined' && typeof document !== 'undefined' && document instanceof HTMLDocument) { - const meta = document.createElement('meta'); + const version = process.env.npm_package_version; + const versionMeta = document.createElement('meta'); + + versionMeta.setAttribute('name', 'botframework-directlinespeech:version'); + versionMeta.setAttribute('content', version); + + document.head.appendChild(versionMeta); - meta.setAttribute('name', 'botframework-directlinespeech:version'); + const packageMeta = document.createElement('meta'); - // We injected "process.env.npm_package_version" during compilation. - // eslint-disable-next-line no-undef - meta.setAttribute('content', process.env.npm_package_version); + packageMeta.setAttribute('name', 'botframework-directlinespeech'); + packageMeta.setAttribute('content', `version=${version}; build_tool=${buildTool}; format=${moduleFormat}`); - document.head.appendChild(meta); + document.head.appendChild(packageMeta); } diff --git a/packages/directlinespeech/tsup.config.ts b/packages/directlinespeech/tsup.config.ts new file mode 100644 index 0000000000..61d2294427 --- /dev/null +++ b/packages/directlinespeech/tsup.config.ts @@ -0,0 +1,31 @@ +import { join } from 'path'; +import { defineConfig } from 'tsup'; +import baseConfig from '../../tsup.base.config'; + +// Redirect import paths for "microsoft-cognitiveservices-speech-sdk(...)" +// to point to es2015 distribution for all importing modules +const resolveCognitiveServicesToES2015 = { + name: 'microsoft-cognitiveservices-speech-sdk', + setup(build) { + build.onResolve({ filter: /microsoft-cognitiveservices-speech-sdk.+/u }, args => ({ + path: join(process.cwd(), 'node_modules', args.path.replace('distrib/lib', 'distrib/es2015') + '.js') + })); + } +}; + +export default defineConfig({ + ...baseConfig, + entry: { + 'botframework-directlinespeech-sdk': './src/index.js' + }, + env: { + ...baseConfig.env, + + // Followings are required by microsoft-cognitiveservices-speech-sdk: + NODE_TLS_REJECT_UNAUTHORIZED: '', + SPEECH_CONDUCT_OCSP_CHECK: '', + SPEECH_OCSP_CACHE_ROOT: '' + }, + esbuildPlugins: [resolveCognitiveServicesToES2015], + noExternal: ['event-target-shim'] +}); diff --git a/packages/fluent-theme/.gitignore b/packages/fluent-theme/.gitignore index 62ef8a24b8..62b899b6ae 100644 --- a/packages/fluent-theme/.gitignore +++ b/packages/fluent-theme/.gitignore @@ -1,4 +1,4 @@ /*.tgz -/dist -/lib -/node_modules +/dist/ +/lib/ +/node_modules/ diff --git a/packages/fluent-theme/package-lock.json b/packages/fluent-theme/package-lock.json index 7afb2d2aa8..f3a846f9dd 100644 --- a/packages/fluent-theme/package-lock.json +++ b/packages/fluent-theme/package-lock.json @@ -18,7 +18,7 @@ "@tsconfig/strictest": "^2.0.5", "@types/math-random": "^1.0.2", "@types/node": "^20.10.3", - "@types/react": "^18.2.74", + "@types/react": "^16.14.60", "tsup": "^8.0.2", "typescript": "^5.3.2" }, @@ -745,15 +745,22 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.74", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.74.tgz", - "integrity": "sha512-9AEqNZZyBx8OdZpxzQlaFEVCSFUM2YXJH46yPOiOpm078k6ZLOCcuAzGum/zK8YBwY+dbahVNbHrbgrAwIRlqw==", + "version": "16.14.60", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.60.tgz", + "integrity": "sha512-wIFmnczGsTcgwCBeIYOuy2mdXEiKZ5znU/jNOnMZPQyCcIxauMGWlX0TNG4lZ7NxRKj7YUIZRneJQSSdB2jKgg==", "dev": true, "dependencies": { "@types/prop-types": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, + "node_modules/@types/scheduler": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", + "dev": true + }, "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -1325,6 +1332,12 @@ "node": ">=10" } }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, "node_modules/lilconfig": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", @@ -1358,6 +1371,18 @@ "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", "dev": true }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "peer": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/lru-cache": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", @@ -1614,6 +1639,18 @@ } ] }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", diff --git a/packages/fluent-theme/package.json b/packages/fluent-theme/package.json index a54949128e..7f3cd2a1ee 100644 --- a/packages/fluent-theme/package.json +++ b/packages/fluent-theme/package.json @@ -2,20 +2,20 @@ "name": "botframework-webchat-fluent-theme", "version": "0.0.0-0", "description": "Fluent theme for Bot Framework Web Chat", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "./dist/botframework-webchat-fluent-theme.js", + "types": "./dist/botframework-webchat-fluent-theme.d.ts", "publishConfig": { "access": "public" }, "exports": { ".": { "import": { - "default": "./dist/index.mjs", - "types": "./dist/index.d.mts" + "types": "./dist/botframework-webchat-fluent-theme.d.mts", + "default": "./dist/botframework-webchat-fluent-theme.mjs" }, "required": { - "default": "./dist/index.js", - "types": "./dist/index.d.ts" + "types": "./dist/botframework-webchat-fluent-theme.d.ts", + "default": "./dist/botframework-webchat-fluent-theme.js" } } }, @@ -54,12 +54,17 @@ "precommit:typecheck": "tsc --project ./src --emitDeclarationOnly false --esModuleInterop true --noEmit --pretty false", "start": "npm run build -- --watch" }, - "pinDependencies": {}, + "pinDependencies": { + "@types/react": [ + "16", + "react@16.8.6 is our baseline" + ] + }, "devDependencies": { "@tsconfig/strictest": "^2.0.5", "@types/math-random": "^1.0.2", "@types/node": "^20.10.3", - "@types/react": "^18.2.74", + "@types/react": "^16.14.60", "tsup": "^8.0.2", "typescript": "^5.3.2" }, diff --git a/packages/fluent-theme/src/components/telephoneKeypad/Surrogate.tsx b/packages/fluent-theme/src/components/telephoneKeypad/Surrogate.tsx index 006e670ccd..a7e5d4afd6 100644 --- a/packages/fluent-theme/src/components/telephoneKeypad/Surrogate.tsx +++ b/packages/fluent-theme/src/components/telephoneKeypad/Surrogate.tsx @@ -6,7 +6,7 @@ import useShown from './useShown'; type Props = PropsOf; -const TelephoneKeypadSurrogate = memo((props: Props) => (useShown()[0] ? : false)); +const TelephoneKeypadSurrogate = memo((props: Props) => (useShown()[0] ? : null)); TelephoneKeypadSurrogate.displayName = 'TelephoneKeypad.Surrogate'; diff --git a/packages/fluent-theme/src/components/telephoneKeypad/private/TelephoneKeypad.tsx b/packages/fluent-theme/src/components/telephoneKeypad/private/TelephoneKeypad.tsx index 7bdff9bafc..cd4295f338 100644 --- a/packages/fluent-theme/src/components/telephoneKeypad/private/TelephoneKeypad.tsx +++ b/packages/fluent-theme/src/components/telephoneKeypad/private/TelephoneKeypad.tsx @@ -1,16 +1,16 @@ -import React, { KeyboardEventHandler, memo, useCallback, useEffect, useRef, type ReactNode } from 'react'; +import { Components } from 'botframework-webchat-component'; import cx from 'classnames'; +import React, { memo, useCallback, useEffect, useRef, type KeyboardEventHandler, type ReactNode } from 'react'; import { useRefFrom } from 'use-ref-from'; -import { Components } from 'botframework-webchat-component'; import Button from './Button'; // import HorizontalDialPadController from './HorizontalDialPadController'; +import InfoSmallIcon from '../../../icons/InfoSmallIcon'; +import { useStyles } from '../../../styles'; import testIds from '../../../testIds'; import { type DTMF } from '../types'; import useShown from '../useShown'; import styles from './TelephoneKeypad.module.css'; -import { useStyles } from '../../../styles'; -import InfoSmallIcon from '../../../icons/InfoSmallIcon'; const { LocalizedString } = Components; @@ -25,10 +25,7 @@ const Orientation = memo( ({ children, isHorizontal }: Readonly<{ children?: ReactNode | undefined; isHorizontal: boolean }>) => { const classNames = useStyles(styles); - return isHorizontal ? ( - // {children} - false - ) : ( + return isHorizontal ? null : ( // {children}
{children}
); } diff --git a/packages/fluent-theme/src/index.ts b/packages/fluent-theme/src/index.ts index a60e93e2ed..35d180cf35 100644 --- a/packages/fluent-theme/src/index.ts +++ b/packages/fluent-theme/src/index.ts @@ -1,13 +1,20 @@ import { injectMetaTag } from 'inject-meta-tag'; import FluentThemeProvider from './private/FluentThemeProvider'; -import testIds from './testIds'; import { injectStyle } from './styles'; +import testIds from './testIds'; + +const buildTool = process.env['build_tool']; +const moduleFormat = process.env['module_format']; +const version = process.env['npm_package_version']; -declare const NPM_PACKAGE_VERSION: string; +const buildInfo = { buildTool, moduleFormat, version }; -injectMetaTag('botframework-webchat-fluent-theme:version', NPM_PACKAGE_VERSION); +injectMetaTag( + 'botframework-webchat:fluent-theme', + `version=${process.env['npm_package_version']}; build-tool=${process.env['build_tool']}; module-format=${process.env['module_format']}` +); injectStyle(); -export { FluentThemeProvider, testIds }; +export { FluentThemeProvider, buildInfo, testIds }; diff --git a/packages/fluent-theme/tsup.config.ts b/packages/fluent-theme/tsup.config.ts index a9583efcb5..5445931bef 100644 --- a/packages/fluent-theme/tsup.config.ts +++ b/packages/fluent-theme/tsup.config.ts @@ -1,10 +1,9 @@ import { join } from 'path'; import { defineConfig } from 'tsup'; import { fileURLToPath } from 'url'; +import baseConfig from '../../tsup.base.config'; import { injectedStyles as injectedStylesPlaceholder } from './src/styles/injectStyle'; -const target = ['chrome100', 'safari16']; - const umdResolvePlugin = { name: 'umd-resolve', setup(build) { @@ -37,60 +36,51 @@ const injectCSSPlugin = { export default defineConfig([ { - dts: true, - entry: ['./src/index.ts'], + ...baseConfig, + entry: { 'botframework-webchat-fluent-theme': './src/index.ts' }, + env: { ...baseConfig.env, module_format: 'commonjs' }, loader: { + ...baseConfig.loader, '.css': 'local-css' }, - esbuildPlugins: [injectCSSPlugin], - esbuildOptions(options) { - options.define.NPM_PACKAGE_VERSION = JSON.stringify(process.env.npm_package_version); - }, - format: ['cjs', 'esm'], - sourcemap: true, - target + esbuildPlugins: [...(baseConfig.esbuildPlugins || []), injectCSSPlugin], + format: ['cjs'] }, { - entry: { - 'botframework-webchat-fluent-theme.development': './src/bundle.ts' - }, + ...baseConfig, + entry: { 'botframework-webchat-fluent-theme': './src/index.ts' }, loader: { + ...baseConfig.loader, '.css': 'local-css' }, - esbuildOptions(options) { - options.define.NPM_PACKAGE_VERSION = JSON.stringify(process.env.npm_package_version); - options.define['process.env.NODE_ENV'] = '"development"'; + esbuildPlugins: [...(baseConfig.esbuildPlugins || []), injectCSSPlugin], + format: ['esm'] + }, + { + ...baseConfig, + entry: { 'botframework-webchat-fluent-theme.development': './src/bundle.ts' }, + loader: { + ...baseConfig.loader, + '.css': 'local-css' }, - esbuildPlugins: [injectCSSPlugin, umdResolvePlugin], + esbuildPlugins: [...(baseConfig.esbuildPlugins || []), injectCSSPlugin, umdResolvePlugin], format: 'iife', outExtension() { - return { - js: '.js' - }; - }, - sourcemap: true, - target + return { js: '.js' }; + } }, { - entry: { - 'botframework-webchat-fluent-theme.production.min': './src/bundle.ts' - }, + ...baseConfig, + entry: { 'botframework-webchat-fluent-theme.production.min': './src/bundle.ts' }, loader: { + ...baseConfig.loader, '.css': 'local-css' }, - esbuildOptions(options) { - options.define.NPM_PACKAGE_VERSION = JSON.stringify(process.env.npm_package_version); - options.define['process.env.NODE_ENV'] = '"production"'; - }, - esbuildPlugins: [injectCSSPlugin, umdResolvePlugin], + esbuildPlugins: [...(baseConfig.esbuildPlugins || []), injectCSSPlugin, umdResolvePlugin], format: 'iife', minify: true, outExtension() { - return { - js: '.js' - }; - }, - sourcemap: true, - target + return { js: '.js' }; + } } ]); diff --git a/packages/isomorphic-react-dom/package.json b/packages/isomorphic-react-dom/package.json index a098fc34ed..51faf4eb2c 100644 --- a/packages/isomorphic-react-dom/package.json +++ b/packages/isomorphic-react-dom/package.json @@ -2,7 +2,7 @@ "name": "isomorphic-react-dom", "description": "Exports window.ReactDOM if available, otherwise, exports require('react-dom').", "version": "0.0.0-0", - "main": "dist/react.js", + "main": "dist/react-dom.js", "private": true, "scripts": { "auditfix": "npm audit fix --legacy-peer-deps || exit 0", diff --git a/packages/playground/src/createDevModeActivityMiddleware.js b/packages/playground/src/createDevModeActivityMiddleware.js deleted file mode 100644 index e166399b22..0000000000 --- a/packages/playground/src/createDevModeActivityMiddleware.js +++ /dev/null @@ -1,98 +0,0 @@ -import { css } from 'glamor'; -import classNames from 'classnames'; -import React from 'react'; - -import { connectToWebChat } from 'botframework-webchat'; - -const ROOT_CSS = css({ - alignItems: 'flex-start', - display: 'flex', - position: 'relative', - - '& > .content': { - flex: 1, - overflow: 'hidden', - width: '100%' - }, - - '&.from-user > button': { - right: 0 - }, - - '&:not(.from-user) > button': { - left: 0 - }, - - '& > button': { - backgroundColor: 'transparent', - border: 0, - margin: 0, - outline: 0, - padding: 0, - position: 'absolute', - top: 0, - - '&:hover > svg': { - fill: '#767676' - } - } -}); - -class SpeakActivity extends React.Component { - constructor(props) { - super(props); - - this.handleSpeak = this.handleSpeak.bind(this); - } - - handleSpeak() { - this.props.markActivity(this.props.activity, 'speak', true); - } - - render() { - const { - props: { activity, children }, - handleSpeak - } = this; - - return ( -
-
{children}
- -
- ); - } -} - -const ConnectedDevModeDecorator = connectToWebChat(({ markActivity, webSpeechPonyfill }) => ({ - markActivity, - webSpeechPonyfill -}))(({ card, children, markActivity, webSpeechPonyfill }) => - (webSpeechPonyfill || {}).speechSynthesis ? ( - - {children} - - ) : ( - children - ) -); - -export default function () { - return () => next => card => { - return children => { - const renderActivity = next(card); - - return ( - !!renderActivity && ( - {renderActivity(children)} - ) - ); - }; - }; -} diff --git a/packages/playground/src/createDevModeActivityMiddleware.jsx b/packages/playground/src/createDevModeActivityMiddleware.jsx new file mode 100644 index 0000000000..a11796a275 --- /dev/null +++ b/packages/playground/src/createDevModeActivityMiddleware.jsx @@ -0,0 +1,79 @@ +import { hooks } from 'botframework-webchat-component'; +import classNames from 'classnames'; +import { css } from 'glamor'; +import React, { useCallback } from 'react'; + +const { useMarkActivityAsSpoken, useWebSpeechPonyfill } = hooks; + +const ROOT_CSS = css({ + alignItems: 'flex-start', + display: 'flex', + position: 'relative', + + '& > .content': { + flex: 1, + overflow: 'hidden', + width: '100%' + }, + + '&.from-user > button': { + right: 0 + }, + + '&:not(.from-user) > button': { + left: 0 + }, + + '& > button': { + backgroundColor: 'transparent', + border: 0, + margin: 0, + outline: 0, + padding: 0, + position: 'absolute', + top: 0, + + '&:hover > svg': { + fill: '#767676' + } + } +}); + +const SpeakActivity = ({ activity, children }) => { + const markActivityAsSpoken = useMarkActivityAsSpoken(); + + const handleSpeak = useCallback(() => markActivityAsSpoken(activity), [activity, markActivityAsSpoken]); + + return ( +
+
{children}
+ +
+ ); +}; + +const DevModeDecorator = ({ card, children }) => { + const webSpeechPonyfill = useWebSpeechPonyfill(); + + return (webSpeechPonyfill || {}).speechSynthesis ? ( + {children} + ) : ( + children + ); +}; + +export default function () { + return () => next => card => { + return children => { + const renderActivity = next(card); + + return !!renderActivity && {renderActivity(children)}; + }; + }; +} diff --git a/packages/playground/src/createDevModeAttachmentMiddleware.js b/packages/playground/src/createDevModeAttachmentMiddleware.jsx similarity index 100% rename from packages/playground/src/createDevModeAttachmentMiddleware.js rename to packages/playground/src/createDevModeAttachmentMiddleware.jsx diff --git a/packages/test/page-object/package.json b/packages/test/page-object/package.json index 850bd95a54..19a576d2c9 100644 --- a/packages/test/page-object/package.json +++ b/packages/test/page-object/package.json @@ -51,7 +51,11 @@ "needs to bump manually" ] }, + "localPeerDependencies": { + "botframework-webchat": "0.0.0-0" + }, "dependencies": { + "botframework-webchat": "0.0.0-0", "base64-arraybuffer": "1.0.2", "classnames": "2.3.2", "core-js": "3.34.0", diff --git a/tsup.base.config.ts b/tsup.base.config.ts new file mode 100644 index 0000000000..04b003fb6a --- /dev/null +++ b/tsup.base.config.ts @@ -0,0 +1,56 @@ +import { defineConfig, type Options } from 'tsup'; +import { babelPlugin, defaultPredicate, type Predicate } from './esbuildBabelPluginIstanbul'; + +const env = process.env.NODE_ENV || 'development'; +const { npm_package_version } = process.env; +const istanbulPredicate: Predicate = args => defaultPredicate(args) && !/\.worker\.[cm]?[jt]s$/u.test(args.path); + +export default defineConfig({ + dts: true, + env: { + build_tool: 'tsup', + module_format: 'esmodules', + node_env: env, + NODE_ENV: env, + ...(npm_package_version ? { npm_package_version } : {}) + }, + esbuildOptions: options => { + options.legalComments = 'linked'; + }, + esbuildPlugins: + env === 'test' + ? [ + babelPlugin({ + filter: /\.[cm]?js$/u, + loader: 'jsx', + name: 'babel-plugin-istanbul:js', + predicate: istanbulPredicate + }), + babelPlugin({ + filter: /\.jsx$/u, + loader: 'jsx', + name: 'babel-plugin-istanbul:jsx', + predicate: istanbulPredicate + }), + babelPlugin({ + filter: /\.[cm]?ts$/u, + loader: 'ts', + name: 'babel-plugin-istanbul:ts', + predicate: istanbulPredicate + }), + babelPlugin({ + filter: /\.tsx$/u, + loader: 'tsx', + name: 'babel-plugin-istanbul:tsx', + predicate: istanbulPredicate + }) + ] + : [], + format: 'esm', + loader: { '.js': 'jsx' }, + metafile: true, + minify: env === 'production', + platform: 'browser', + sourcemap: true, + target: ['chrome100', 'firefox100', 'safari15'] +}) as Options;