@memori.ai/memori-react 8.45.1 → 8.45.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/components/Chat/Chat.js +4 -1
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +4 -1
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +7 -57
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +2 -1
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/PositionPopover/PositionPopover.js +38 -25
- package/dist/components/PositionPopover/PositionPopover.js.map +1 -1
- package/dist/components/UploadButton/UploadButton.js +3 -0
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js +14 -2
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/dist/components/layouts/chat.css +27 -4
- package/dist/context/widgetSurfaceContext.js +2 -2
- package/dist/context/widgetSurfaceContext.js.map +1 -1
- package/dist/helpers/constants.d.ts +3 -2
- package/dist/helpers/constants.js +19 -20
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/positionPopover.d.ts +2 -1
- package/dist/helpers/positionPopover.js +12 -3
- package/dist/helpers/positionPopover.js.map +1 -1
- package/dist/helpers/tts/muteSpeaker.js +4 -3
- package/dist/helpers/tts/muteSpeaker.js.map +1 -1
- package/dist/helpers/usePressTooltip.js +2 -1
- package/dist/helpers/usePressTooltip.js.map +1 -1
- package/dist/helpers/utils.d.ts +2 -1
- package/dist/helpers/utils.js +7 -1
- package/dist/helpers/utils.js.map +1 -1
- package/dist/icons/MemoriIcon.js +1 -1
- package/dist/icons/MemoriIcon.js.map +1 -1
- package/dist/styles.css +1 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/Chat/Chat.js +4 -1
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +2 -1
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/UploadButton/UploadButton.js +4 -1
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js +16 -4
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/esm/components/layouts/chat.css +27 -4
- package/esm/helpers/constants.d.ts +3 -2
- package/esm/helpers/constants.js +18 -19
- package/esm/helpers/constants.js.map +1 -1
- package/esm/helpers/utils.d.ts +2 -1
- package/esm/helpers/utils.js +6 -1
- package/esm/helpers/utils.js.map +1 -1
- package/esm/styles.css +1 -2
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +6 -7
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.d.ts +0 -3
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js +0 -64
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js.map +0 -1
- package/dist/testUtils.d.ts +0 -5
- package/dist/testUtils.js +0 -18
- package/dist/testUtils.js.map +0 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.d.ts +0 -3
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js +0 -62
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js.map +0 -1
- package/src/I18nWrapper.tsx +0 -13
- package/src/__snapshots__/index.test.tsx.snap +0 -96
- package/src/components/AgeVerificationModal/AgeVerificationModal.css +0 -95
- package/src/components/AgeVerificationModal/AgeVerificationModal.stories.tsx +0 -46
- package/src/components/AgeVerificationModal/AgeVerificationModal.test.tsx +0 -33
- package/src/components/AgeVerificationModal/AgeVerificationModal.tsx +0 -99
- package/src/components/AgeVerificationModal/__snapshots__/AgeVerificationModal.test.tsx.snap +0 -19
- package/src/components/Auth/Auth.css +0 -57
- package/src/components/Auth/Auth.stories.tsx +0 -90
- package/src/components/Auth/Auth.test.tsx +0 -63
- package/src/components/Auth/Auth.tsx +0 -201
- package/src/components/Auth/__snapshots__/Auth.test.tsx.snap +0 -143
- package/src/components/Avatar/Avatar.css +0 -151
- package/src/components/Avatar/Avatar.stories.tsx +0 -160
- package/src/components/Avatar/Avatar.test.tsx +0 -158
- package/src/components/Avatar/Avatar.tsx +0 -245
- package/src/components/Avatar/AvatarView/AvatarComponent/Shadow/DynamicShadow.tsx +0 -103
- package/src/components/Avatar/AvatarView/AvatarComponent/avatarComponent.tsx +0 -105
- package/src/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/fullbodyAvatar.tsx +0 -338
- package/src/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/types.ts +0 -44
- package/src/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarAnimator.ts +0 -1091
- package/src/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarPositionController.ts +0 -83
- package/src/components/Avatar/AvatarView/AvatarComponent/components/controllers/MorphTargetController.ts +0 -301
- package/src/components/Avatar/AvatarView/AvatarComponent/components/controls.tsx +0 -100
- package/src/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.tsx +0 -152
- package/src/components/Avatar/AvatarView/AvatarComponent/components/loader.tsx +0 -31
- package/src/components/Avatar/AvatarView/AvatarComponent/constants.ts +0 -141
- package/src/components/Avatar/AvatarView/AvatarComponent/lights/Lights.tsx +0 -145
- package/src/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.css +0 -111
- package/src/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.tsx +0 -201
- package/src/components/Avatar/AvatarView/AvatarView.stories.tsx +0 -254
- package/src/components/Avatar/AvatarView/index.tsx +0 -194
- package/src/components/Avatar/AvatarView/utils/hideHands.ts +0 -11
- package/src/components/Avatar/AvatarView/utils/useEyeBlink.ts +0 -100
- package/src/components/Avatar/AvatarView/utils/useHeadMovement.ts +0 -72
- package/src/components/Avatar/AvatarView/utils/useLoadingMorphAnim.ts +0 -38
- package/src/components/Avatar/AvatarView/utils/useMouthAnimation.ts +0 -93
- package/src/components/Avatar/AvatarView/utils/useSmile.ts +0 -39
- package/src/components/Avatar/AvatarView/utils/utils.ts +0 -55
- package/src/components/Avatar/__snapshots__/Avatar.test.tsx.snap +0 -246
- package/src/components/Blob/Blob.css +0 -286
- package/src/components/Blob/Blob.stories.tsx +0 -53
- package/src/components/Blob/Blob.test.tsx +0 -18
- package/src/components/Blob/Blob.tsx +0 -26
- package/src/components/Blob/__snapshots__/Blob.test.tsx.snap +0 -80
- package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.css +0 -40
- package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.stories.tsx +0 -58
- package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.test.tsx +0 -53
- package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.tsx +0 -74
- package/src/components/BlockedMemoriBadge/__snapshots__/BlockedMemoriBadge.test.tsx.snap +0 -181
- package/src/components/ChangeMode/ChangeMode.css +0 -22
- package/src/components/ChangeMode/ChangeMode.stories.tsx +0 -50
- package/src/components/ChangeMode/ChangeMode.test.tsx +0 -24
- package/src/components/ChangeMode/ChangeMode.tsx +0 -51
- package/src/components/ChangeMode/__snapshots__/ChangeMode.test.tsx.snap +0 -107
- package/src/components/Chat/Chat.css +0 -285
- package/src/components/Chat/Chat.stories.tsx +0 -1684
- package/src/components/Chat/Chat.test.tsx +0 -372
- package/src/components/Chat/Chat.tsx +0 -778
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +0 -6816
- package/src/components/ChatBubble/ChatBubble.css +0 -430
- package/src/components/ChatBubble/ChatBubble.stories.tsx +0 -1192
- package/src/components/ChatBubble/ChatBubble.test.tsx +0 -481
- package/src/components/ChatBubble/ChatBubble.tsx +0 -776
- package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +0 -8734
- package/src/components/ChatHistoryDrawer/ChatHistory.css +0 -587
- package/src/components/ChatHistoryDrawer/ChatHistory.stories.tsx +0 -410
- package/src/components/ChatHistoryDrawer/ChatHistory.test.tsx +0 -107
- package/src/components/ChatHistoryDrawer/ChatHistory.tsx +0 -1298
- package/src/components/ChatHistoryDrawer/__snapshots__/ChatHistory.test.tsx.snap +0 -27
- package/src/components/ChatInputs/ChatInputs.css +0 -340
- package/src/components/ChatInputs/ChatInputs.stories.tsx +0 -251
- package/src/components/ChatInputs/ChatInputs.tsx +0 -487
- package/src/components/ChatTextArea/ChatTextArea.css +0 -185
- package/src/components/ChatTextArea/ChatTextArea.stories.tsx +0 -55
- package/src/components/ChatTextArea/ChatTextArea.test.tsx +0 -28
- package/src/components/ChatTextArea/ChatTextArea.tsx +0 -171
- package/src/components/ChatTextArea/__snapshots__/ChatTextArea.test.tsx.snap +0 -68
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.css +0 -36
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.stories.tsx +0 -296
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.test.tsx +0 -31
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.tsx +0 -232
- package/src/components/CompletionProviderStatus/__snapshots__/CompletionProviderStatus.test.tsx.snap +0 -96
- package/src/components/ContentPreviewModal/ContentPreviewModal.css +0 -128
- package/src/components/ContentPreviewModal/ContentPreviewModal.tsx +0 -67
- package/src/components/ContentPreviewModal/index.ts +0 -2
- package/src/components/CustomGLBModelViewer/ModelViewer.css +0 -11
- package/src/components/CustomGLBModelViewer/ModelViewer.stories.tsx +0 -58
- package/src/components/CustomGLBModelViewer/ModelViewer.test.tsx +0 -13
- package/src/components/CustomGLBModelViewer/ModelViewer.tsx +0 -37
- package/src/components/CustomGLBModelViewer/__snapshots__/ModelViewer.test.tsx.snap +0 -20
- package/src/components/DateSelector/DateSelector.css +0 -158
- package/src/components/DateSelector/DateSelector.stories.tsx +0 -47
- package/src/components/DateSelector/DateSelector.test.tsx +0 -149
- package/src/components/DateSelector/DateSelector.tsx +0 -251
- package/src/components/DateSelector/__snapshots__/DateSelector.test.tsx.snap +0 -1954
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +0 -54
- package/src/components/ExpertsDrawer/ExpertsDrawer.css +0 -67
- package/src/components/ExpertsDrawer/ExpertsDrawer.stories.tsx +0 -54
- package/src/components/ExpertsDrawer/ExpertsDrawer.test.tsx +0 -53
- package/src/components/ExpertsDrawer/ExpertsDrawer.tsx +0 -69
- package/src/components/ExpertsDrawer/__snapshots__/ExpertsDrawer.test.tsx.snap +0 -11
- package/src/components/ExportHistoryButton/ExportHistoryButton.css +0 -22
- package/src/components/FeedbackButtons/FeedbackButtons.css +0 -107
- package/src/components/FeedbackButtons/FeedbackButtons.stories.tsx +0 -52
- package/src/components/FeedbackButtons/FeedbackButtons.test.tsx +0 -11
- package/src/components/FeedbackButtons/FeedbackButtons.tsx +0 -152
- package/src/components/FeedbackButtons/__snapshots__/FeedbackButtons.test.tsx.snap +0 -42
- package/src/components/FilePreview/FilePreview.css +0 -358
- package/src/components/FilePreview/FilePreview.stories.tsx +0 -63
- package/src/components/FilePreview/FilePreview.test.tsx +0 -26
- package/src/components/FilePreview/FilePreview.tsx +0 -277
- package/src/components/FilePreview/__snapshots__/FilePreview.test.tsx.snap +0 -185
- package/src/components/Header/ChatConsumptionDropdown.test.tsx +0 -117
- package/src/components/Header/ChatConsumptionDropdown.tsx +0 -275
- package/src/components/Header/Header.css +0 -282
- package/src/components/Header/Header.stories.tsx +0 -338
- package/src/components/Header/Header.test.tsx +0 -371
- package/src/components/Header/Header.tsx +0 -442
- package/src/components/Header/__snapshots__/Header.test.tsx.snap +0 -964
- package/src/components/KnownFacts/KnownFacts.css +0 -19
- package/src/components/KnownFacts/KnownFacts.stories.tsx +0 -80
- package/src/components/KnownFacts/KnownFacts.test.tsx +0 -57
- package/src/components/KnownFacts/KnownFacts.tsx +0 -376
- package/src/components/KnownFacts/__snapshots__/KnownFacts.test.tsx.snap +0 -19
- package/src/components/LoginDrawer/LoginDrawer.css +0 -1616
- package/src/components/LoginDrawer/LoginDrawer.stories.tsx +0 -102
- package/src/components/LoginDrawer/LoginDrawer.test.tsx +0 -199
- package/src/components/LoginDrawer/LoginDrawer.tsx +0 -600
- package/src/components/LoginDrawer/__snapshots__/LoginDrawer.test.tsx.snap +0 -91
- package/src/components/MediaWidget/DocumentCard.test.tsx +0 -45
- package/src/components/MediaWidget/DocumentCard.tsx +0 -19
- package/src/components/MediaWidget/MediaItemWidget.css +0 -1398
- package/src/components/MediaWidget/MediaItemWidget.stories.tsx +0 -423
- package/src/components/MediaWidget/MediaItemWidget.test.tsx +0 -248
- package/src/components/MediaWidget/MediaItemWidget.tsx +0 -997
- package/src/components/MediaWidget/MediaItemWidget.types.ts +0 -65
- package/src/components/MediaWidget/MediaItemWidget.utils.test.ts +0 -367
- package/src/components/MediaWidget/MediaItemWidget.utils.ts +0 -227
- package/src/components/MediaWidget/MediaPreviewModal.test.tsx +0 -271
- package/src/components/MediaWidget/MediaPreviewModal.tsx +0 -425
- package/src/components/MediaWidget/MediaWidget.css +0 -131
- package/src/components/MediaWidget/MediaWidget.stories.tsx +0 -319
- package/src/components/MediaWidget/MediaWidget.test.tsx +0 -41
- package/src/components/MediaWidget/MediaWidget.tsx +0 -107
- package/src/components/MediaWidget/__snapshots__/DocumentCard.test.tsx.snap +0 -24
- package/src/components/MediaWidget/__snapshots__/MediaItemWidget.test.tsx.snap +0 -791
- package/src/components/MediaWidget/__snapshots__/MediaWidget.test.tsx.snap +0 -154
- package/src/components/MemoriArtifactSystem/ArtifactDrawer.stories.tsx +0 -2299
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.css +0 -163
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.tsx +0 -250
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/CopyButton.stories.tsx +0 -30
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.tsx +0 -467
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.tsx +0 -89
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/hooks/useCopyArtifact.ts +0 -619
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/index.ts +0 -9
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/styles.css +0 -489
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.tsx +0 -90
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/types.ts +0 -73
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/utils/PDFExporter.ts +0 -454
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +0 -1059
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.tsx +0 -431
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/components/TabSwitch.css +0 -150
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/components/TabSwitch.tsx +0 -79
- package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.css +0 -253
- package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.tsx +0 -561
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +0 -355
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +0 -160
- package/src/components/MemoriArtifactSystem/context/ArtifactContext.tsx +0 -167
- package/src/components/MemoriArtifactSystem/types/artifact.types.ts +0 -35
- package/src/components/MemoriArtifactSystem/utils/ArtifactAPI.test.tsx +0 -308
- package/src/components/MemoriArtifactSystem/utils/ArtifactAPI.tsx +0 -379
- package/src/components/MemoriArtifactSystem/utils/applyEdits.test.ts +0 -85
- package/src/components/MemoriArtifactSystem/utils/applyEdits.ts +0 -173
- package/src/components/MemoriWidget/MemoriWidget.css +0 -220
- package/src/components/MemoriWidget/MemoriWidget.stories.tsx +0 -274
- package/src/components/MemoriWidget/MemoriWidget.tsx +0 -3930
- package/src/components/MicrophoneButton/MicrophoneButton.css +0 -142
- package/src/components/MicrophoneButton/MicrophoneButton.stories.tsx +0 -52
- package/src/components/MicrophoneButton/MicrophoneButton.tsx +0 -128
- package/src/components/PositionDrawer/PositionDrawer.stories.tsx +0 -51
- package/src/components/PositionDrawer/PositionDrawer.test.tsx +0 -39
- package/src/components/PositionDrawer/PositionDrawer.tsx +0 -50
- package/src/components/PositionDrawer/__snapshots__/PositionDrawer.test.tsx.snap +0 -17
- package/src/components/PoweredBy/PoweredBy.css +0 -47
- package/src/components/PoweredBy/PoweredBy.stories.tsx +0 -75
- package/src/components/PoweredBy/PoweredBy.test.tsx +0 -15
- package/src/components/PoweredBy/PoweredBy.tsx +0 -44
- package/src/components/PoweredBy/__snapshots__/PoweredBy.test.tsx.snap +0 -55
- package/src/components/SendOnEnterMenu/SendOnEnterMenu.css +0 -47
- package/src/components/SendOnEnterMenu/SendOnEnterMenu.stories.tsx +0 -58
- package/src/components/SendOnEnterMenu/SendOnEnterMenu.test.tsx +0 -17
- package/src/components/SendOnEnterMenu/SendOnEnterMenu.tsx +0 -82
- package/src/components/SendOnEnterMenu/__snapshots__/SendOnEnterMenu.test.tsx.snap +0 -57
- package/src/components/SettingsDrawer/SettingsDrawer.css +0 -24
- package/src/components/SettingsDrawer/SettingsDrawer.stories.tsx +0 -94
- package/src/components/SettingsDrawer/SettingsDrawer.test.tsx +0 -202
- package/src/components/SettingsDrawer/SettingsDrawer.tsx +0 -255
- package/src/components/SettingsDrawer/__snapshots__/SettingsDrawer.test.tsx.snap +0 -59
- package/src/components/ShareButton/ShareButton.css +0 -73
- package/src/components/ShareButton/ShareButton.stories.tsx +0 -98
- package/src/components/ShareButton/ShareButton.test.tsx +0 -53
- package/src/components/ShareButton/ShareButton.tsx +0 -395
- package/src/components/ShareButton/__snapshots__/ShareButton.test.tsx.snap +0 -316
- package/src/components/Snippet/Snippet.css +0 -142
- package/src/components/Snippet/Snippet.stories.tsx +0 -286
- package/src/components/Snippet/Snippet.test.tsx +0 -176
- package/src/components/Snippet/Snippet.tsx +0 -148
- package/src/components/Snippet/__snapshots__/Snippet.test.tsx.snap +0 -603
- package/src/components/StartPanel/StartPanel.css +0 -273
- package/src/components/StartPanel/StartPanel.stories.tsx +0 -404
- package/src/components/StartPanel/StartPanel.test.tsx +0 -360
- package/src/components/StartPanel/StartPanel.tsx +0 -426
- package/src/components/StartPanel/__snapshots__/StartPanel.test.tsx.snap +0 -1986
- package/src/components/Typing/Typing.stories.tsx +0 -130
- package/src/components/Typing/Typing.test.tsx +0 -62
- package/src/components/Typing/Typing.tsx +0 -154
- package/src/components/Typing/__snapshots__/Typing.test.tsx.snap +0 -133
- package/src/components/UploadButton/UploadButton.css +0 -542
- package/src/components/UploadButton/UploadButton.stories.tsx +0 -376
- package/src/components/UploadButton/UploadButton.test.tsx +0 -11
- package/src/components/UploadButton/UploadButton.tsx +0 -684
- package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +0 -405
- package/src/components/UploadButton/UploadImages/UploadImages.tsx +0 -538
- package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +0 -165
- package/src/components/VenueWidget/VenueWidget.css +0 -163
- package/src/components/VenueWidget/VenueWidget.stories.tsx +0 -66
- package/src/components/VenueWidget/VenueWidget.test.tsx +0 -49
- package/src/components/VenueWidget/VenueWidget.tsx +0 -458
- package/src/components/VenueWidget/__snapshots__/VenueWidget.test.tsx.snap +0 -370
- package/src/components/WhyThisAnswer/WhyThisAnswer.css +0 -171
- package/src/components/WhyThisAnswer/WhyThisAnswer.stories.tsx +0 -285
- package/src/components/WhyThisAnswer/WhyThisAnswer.test.tsx +0 -245
- package/src/components/WhyThisAnswer/WhyThisAnswer.tsx +0 -233
- package/src/components/WhyThisAnswer/__snapshots__/WhyThisAnswer.test.tsx.snap +0 -27
- package/src/components/icons/AI.tsx +0 -34
- package/src/components/icons/Alert.tsx +0 -31
- package/src/components/icons/ArrowUp.tsx +0 -28
- package/src/components/icons/Bug.tsx +0 -81
- package/src/components/icons/Chat.tsx +0 -30
- package/src/components/icons/ChevronDown.tsx +0 -26
- package/src/components/icons/ChevronLeft.tsx +0 -28
- package/src/components/icons/ChevronRight.tsx +0 -28
- package/src/components/icons/ChevronUp.tsx +0 -24
- package/src/components/icons/Clear.tsx +0 -23
- package/src/components/icons/Close.tsx +0 -30
- package/src/components/icons/Code.tsx +0 -24
- package/src/components/icons/Copy.tsx +0 -23
- package/src/components/icons/DeepThought.tsx +0 -38
- package/src/components/icons/Delete.tsx +0 -23
- package/src/components/icons/Document.tsx +0 -50
- package/src/components/icons/Download.tsx +0 -23
- package/src/components/icons/Edit.tsx +0 -17
- package/src/components/icons/Expand.tsx +0 -23
- package/src/components/icons/Eye.tsx +0 -17
- package/src/components/icons/EyeInvisible.tsx +0 -24
- package/src/components/icons/Facebook.tsx +0 -23
- package/src/components/icons/Feedback.tsx +0 -24
- package/src/components/icons/File.tsx +0 -17
- package/src/components/icons/FileExcel.tsx +0 -23
- package/src/components/icons/FilePdf.tsx +0 -23
- package/src/components/icons/FileWord.tsx +0 -23
- package/src/components/icons/Fullscreen.tsx +0 -23
- package/src/components/icons/FullscreenExit.tsx +0 -23
- package/src/components/icons/GasStation.tsx +0 -36
- package/src/components/icons/Group.tsx +0 -30
- package/src/components/icons/History.tsx +0 -33
- package/src/components/icons/Image.tsx +0 -37
- package/src/components/icons/Info.tsx +0 -31
- package/src/components/icons/Link.tsx +0 -17
- package/src/components/icons/Linkedin.tsx +0 -23
- package/src/components/icons/Loading.tsx +0 -28
- package/src/components/icons/Logout.tsx +0 -27
- package/src/components/icons/Mail.tsx +0 -17
- package/src/components/icons/MapMarker.tsx +0 -26
- package/src/components/icons/MenuHorizontal.tsx +0 -29
- package/src/components/icons/MenuVertical.tsx +0 -29
- package/src/components/icons/Message.tsx +0 -23
- package/src/components/icons/Microphone.tsx +0 -23
- package/src/components/icons/Minus.tsx +0 -23
- package/src/components/icons/MinusCircle.tsx +0 -24
- package/src/components/icons/PaperClip.tsx +0 -23
- package/src/components/icons/Picture.tsx +0 -23
- package/src/components/icons/Plus.tsx +0 -18
- package/src/components/icons/Preview.tsx +0 -29
- package/src/components/icons/Print.tsx +0 -38
- package/src/components/icons/QuestionHelp.tsx +0 -30
- package/src/components/icons/Refresh.tsx +0 -30
- package/src/components/icons/SelectIcon.tsx +0 -28
- package/src/components/icons/Send.tsx +0 -17
- package/src/components/icons/Setting.tsx +0 -23
- package/src/components/icons/Share.tsx +0 -23
- package/src/components/icons/Sound.tsx +0 -23
- package/src/components/icons/SoundDeactivated.tsx +0 -27
- package/src/components/icons/Telegram.tsx +0 -26
- package/src/components/icons/ThumbDown.tsx +0 -29
- package/src/components/icons/ThumbUp.tsx +0 -29
- package/src/components/icons/Translation.tsx +0 -24
- package/src/components/icons/Twitter.tsx +0 -23
- package/src/components/icons/Upload.tsx +0 -34
- package/src/components/icons/User.tsx +0 -17
- package/src/components/icons/Warning.tsx +0 -24
- package/src/components/icons/WhatsApp.tsx +0 -24
- package/src/components/icons/icons.stories.css +0 -5
- package/src/components/icons/icons.stories.tsx +0 -81
- package/src/components/icons/loading.css +0 -14
- package/src/components/layouts/Chat.test.tsx +0 -40
- package/src/components/layouts/Chat.tsx +0 -69
- package/src/components/layouts/FullBody/FullBody.stories.tsx +0 -110
- package/src/components/layouts/FullPage.test.tsx +0 -65
- package/src/components/layouts/FullPage.tsx +0 -80
- package/src/components/layouts/HiddenChat.test.tsx +0 -40
- package/src/components/layouts/HiddenChat.tsx +0 -233
- package/src/components/layouts/Totem/Totem.stories.tsx +0 -131
- package/src/components/layouts/Totem.test.tsx +0 -40
- package/src/components/layouts/Totem.tsx +0 -49
- package/src/components/layouts/WebsiteAssistant.test.tsx +0 -40
- package/src/components/layouts/WebsiteAssistant.tsx +0 -132
- package/src/components/layouts/ZoomedFullBody/ZoomedFullBody.stories.tsx +0 -131
- package/src/components/layouts/ZoomedFullBody.test.tsx +0 -40
- package/src/components/layouts/ZoomedFullBody.tsx +0 -81
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +0 -457
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +0 -1045
- package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +0 -460
- package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +0 -566
- package/src/components/layouts/__snapshots__/WebsiteAssistant.test.tsx.snap +0 -59
- package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +0 -523
- package/src/components/layouts/chat.css +0 -451
- package/src/components/layouts/hidden-chat.css +0 -276
- package/src/components/layouts/layouts.stories.tsx +0 -231
- package/src/components/layouts/totem.css +0 -221
- package/src/components/layouts/website-assistant.css +0 -677
- package/src/components/layouts/zoomed-full-body.css +0 -18
- package/src/components/ui/Alert.css +0 -93
- package/src/components/ui/Alert.stories.tsx +0 -137
- package/src/components/ui/Alert.test.tsx +0 -129
- package/src/components/ui/Alert.tsx +0 -123
- package/src/components/ui/Button.css +0 -167
- package/src/components/ui/Button.stories.tsx +0 -156
- package/src/components/ui/Button.test.tsx +0 -74
- package/src/components/ui/Button.tsx +0 -107
- package/src/components/ui/Card.css +0 -65
- package/src/components/ui/Card.stories.tsx +0 -95
- package/src/components/ui/Card.test.tsx +0 -47
- package/src/components/ui/Card.tsx +0 -48
- package/src/components/ui/Checkbox.css +0 -116
- package/src/components/ui/Checkbox.stories.tsx +0 -74
- package/src/components/ui/Checkbox.test.tsx +0 -28
- package/src/components/ui/Checkbox.tsx +0 -58
- package/src/components/ui/ConfirmDialog.css +0 -42
- package/src/components/ui/ConfirmDialog.stories.tsx +0 -216
- package/src/components/ui/ConfirmDialog.test.tsx +0 -124
- package/src/components/ui/ConfirmDialog.tsx +0 -58
- package/src/components/ui/Details.css +0 -66
- package/src/components/ui/Drawer.css +0 -270
- package/src/components/ui/Drawer.stories.tsx +0 -267
- package/src/components/ui/Drawer.test.tsx +0 -130
- package/src/components/ui/Drawer.tsx +0 -293
- package/src/components/ui/Dropdown.css +0 -173
- package/src/components/ui/Dropdown.tsx +0 -63
- package/src/components/ui/Expandable.css +0 -15
- package/src/components/ui/Expandable.stories.tsx +0 -180
- package/src/components/ui/Expandable.test.tsx +0 -107
- package/src/components/ui/Expandable.tsx +0 -121
- package/src/components/ui/Modal.css +0 -98
- package/src/components/ui/Modal.stories.tsx +0 -171
- package/src/components/ui/Modal.test.tsx +0 -111
- package/src/components/ui/Modal.tsx +0 -117
- package/src/components/ui/Select.css +0 -138
- package/src/components/ui/Select.stories.tsx +0 -79
- package/src/components/ui/Select.test.tsx +0 -84
- package/src/components/ui/Select.tsx +0 -79
- package/src/components/ui/Slider.css +0 -192
- package/src/components/ui/Slider.stories.tsx +0 -63
- package/src/components/ui/Slider.tsx +0 -142
- package/src/components/ui/Spin.css +0 -31
- package/src/components/ui/Spin.stories.tsx +0 -64
- package/src/components/ui/Spin.test.tsx +0 -41
- package/src/components/ui/Spin.tsx +0 -31
- package/src/components/ui/Table.css +0 -132
- package/src/components/ui/Tooltip.css +0 -171
- package/src/components/ui/Tooltip.stories.tsx +0 -109
- package/src/components/ui/Tooltip.test.tsx +0 -102
- package/src/components/ui/Tooltip.tsx +0 -163
- package/src/components/ui/__snapshots__/Alert.test.tsx.snap +0 -59
- package/src/components/ui/__snapshots__/Button.test.tsx.snap +0 -204
- package/src/components/ui/__snapshots__/Card.test.tsx.snap +0 -321
- package/src/components/ui/__snapshots__/Checkbox.test.tsx.snap +0 -131
- package/src/components/ui/__snapshots__/ConfirmDialog.test.tsx.snap +0 -35
- package/src/components/ui/__snapshots__/Drawer.test.tsx.snap +0 -67
- package/src/components/ui/__snapshots__/Expandable.test.tsx.snap +0 -159
- package/src/components/ui/__snapshots__/Modal.test.tsx.snap +0 -59
- package/src/components/ui/__snapshots__/Select.test.tsx.snap +0 -254
- package/src/components/ui/__snapshots__/Spin.test.tsx.snap +0 -193
- package/src/components/ui/__snapshots__/Tooltip.test.tsx.snap +0 -113
- package/src/components/ui/definitions.stories.tsx +0 -139
- package/src/context/visemeContext.tsx +0 -384
- package/src/helpers/chatPdfExport.ts +0 -544
- package/src/helpers/configuration.ts +0 -42
- package/src/helpers/constants.ts +0 -267
- package/src/helpers/convertDocument.test.ts +0 -67
- package/src/helpers/convertDocument.ts +0 -35
- package/src/helpers/credits.ts +0 -54
- package/src/helpers/error.test.ts +0 -29
- package/src/helpers/error.ts +0 -278
- package/src/helpers/imageCompression.ts +0 -230
- package/src/helpers/llmUsage.ts +0 -328
- package/src/helpers/markedExtendedTables.js +0 -217
- package/src/helpers/media.test.ts +0 -169
- package/src/helpers/media.ts +0 -81
- package/src/helpers/message.test.ts +0 -126
- package/src/helpers/message.ts +0 -219
- package/src/helpers/nats/getNatsConfig.ts +0 -148
- package/src/helpers/nats/isSessionExpiredError.test.ts +0 -38
- package/src/helpers/nats/isSessionExpiredError.ts +0 -51
- package/src/helpers/nats/useNats.test.tsx +0 -81
- package/src/helpers/nats/useNats.ts +0 -204
- package/src/helpers/nats/useNatsSession.test.ts +0 -16
- package/src/helpers/nats/useNatsSession.ts +0 -460
- package/src/helpers/piiDetection.test.ts +0 -186
- package/src/helpers/piiDetection.ts +0 -91
- package/src/helpers/sanitizer.ts +0 -17
- package/src/helpers/statistics.ts +0 -58
- package/src/helpers/stt/useSTT.ts +0 -515
- package/src/helpers/translations.ts +0 -39
- package/src/helpers/tts/ttsVoiceUtility.ts +0 -275
- package/src/helpers/tts/useTTS.ts +0 -621
- package/src/helpers/utils.test.ts +0 -321
- package/src/helpers/utils.ts +0 -586
- package/src/helpers/venue.ts +0 -36
- package/src/i18n.ts +0 -39
- package/src/index.stories.tsx +0 -220
- package/src/index.test.tsx +0 -156
- package/src/index.tsx +0 -592
- package/src/locales/de.json +0 -680
- package/src/locales/en.json +0 -754
- package/src/locales/es.json +0 -682
- package/src/locales/fr.json +0 -682
- package/src/locales/it.json +0 -750
- package/src/mocks/data.ts +0 -790
- package/src/styles.css +0 -126
- package/src/types/integration.test.ts +0 -32
- package/src/types/integration.ts +0 -31
- package/src/types/layout.ts +0 -50
- package/src/version.ts +0 -2
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState, useCallback } from 'react';
|
|
2
|
-
import Tooltip from '../ui/Tooltip';
|
|
3
|
-
import Warning from '../icons/Warning';
|
|
4
|
-
import Alert from '../icons/Alert';
|
|
5
|
-
import Info from '../icons/Info';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import Spin from '../ui/Spin';
|
|
8
|
-
|
|
9
|
-
type Status =
|
|
10
|
-
| 'operational'
|
|
11
|
-
| 'degraded_performance'
|
|
12
|
-
| 'partial_outage'
|
|
13
|
-
| 'major_outage'
|
|
14
|
-
| undefined;
|
|
15
|
-
|
|
16
|
-
export interface Props {
|
|
17
|
-
forceStatus?: Status;
|
|
18
|
-
provider?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface ProviderConfig {
|
|
22
|
-
statusUrl: string;
|
|
23
|
-
statusPage: string;
|
|
24
|
-
apiComponentName?: string | string[]; // Component name(s) to look for
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const PROVIDER_CONFIGS: Record<string, ProviderConfig> = {
|
|
28
|
-
OpenAI: {
|
|
29
|
-
statusUrl: 'https://status.openai.com/api/v2/summary.json',
|
|
30
|
-
statusPage: 'https://status.openai.com/',
|
|
31
|
-
apiComponentName: ['Chat', 'Completions (legacy)'],
|
|
32
|
-
},
|
|
33
|
-
Mistral: {
|
|
34
|
-
statusUrl: 'https://status.mistral-data.com/api/v2/summary.json',
|
|
35
|
-
statusPage: 'https://status.mistral-data.com/',
|
|
36
|
-
apiComponentName: ['Mistral'],
|
|
37
|
-
},
|
|
38
|
-
// Use status.claude.com directly: status.anthropic.com 302-redirects and
|
|
39
|
-
// browsers block the redirected response (missing CORS on the redirect).
|
|
40
|
-
Anthropic: {
|
|
41
|
-
statusUrl: 'https://status.claude.com/api/v2/summary.json',
|
|
42
|
-
statusPage: 'https://status.claude.com/',
|
|
43
|
-
apiComponentName: [
|
|
44
|
-
'Claude API (api.anthropic.com)',
|
|
45
|
-
'api.anthropic.com',
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// Modified to handle fetch errors, different component names, and check incidents
|
|
51
|
-
const fetchProviderStatus = async (config: ProviderConfig): Promise<Status> => {
|
|
52
|
-
try {
|
|
53
|
-
const response = await fetch(config.statusUrl);
|
|
54
|
-
if (!response.ok) {
|
|
55
|
-
console.warn(`Status API returned ${response.status}`);
|
|
56
|
-
return 'operational'; // Fallback to operational on API errors
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const data = await response.json();
|
|
60
|
-
|
|
61
|
-
// Skip incident checking - just rely on component status which is more reliable
|
|
62
|
-
|
|
63
|
-
// If no incidents or they're all resolved, check specific API components
|
|
64
|
-
if (data.components) {
|
|
65
|
-
// First try with primary API component names
|
|
66
|
-
if (config.apiComponentName) {
|
|
67
|
-
const apiComponentNames = Array.isArray(config.apiComponentName)
|
|
68
|
-
? config.apiComponentName
|
|
69
|
-
: [config.apiComponentName];
|
|
70
|
-
|
|
71
|
-
for (const name of apiComponentNames) {
|
|
72
|
-
const apiComponent = data.components.find(
|
|
73
|
-
(component: { name: string }) => component.name === name
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
if (apiComponent && apiComponent.status !== 'operational') {
|
|
77
|
-
return apiComponent.status as Status;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Check if any component is degraded (might indicate API issues)
|
|
83
|
-
const anyDegradedComponent = data.components.some(
|
|
84
|
-
(component: { status: string }) => component.status !== 'operational'
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
if (anyDegradedComponent) {
|
|
88
|
-
return 'degraded_performance';
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// If no specific component issues found, check overall status
|
|
93
|
-
if (data.status && data.status.indicator !== 'none') {
|
|
94
|
-
if (data.status.indicator === 'critical') return 'major_outage';
|
|
95
|
-
if (data.status.indicator === 'major') return 'partial_outage';
|
|
96
|
-
if (data.status.indicator === 'minor') return 'degraded_performance';
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return 'operational'; // Default to operational if no issues detected
|
|
100
|
-
} catch (error) {
|
|
101
|
-
console.error('Error fetching provider status:', error);
|
|
102
|
-
return 'operational'; // Fallback to operational on network errors
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const CompletionProviderStatus = ({
|
|
107
|
-
forceStatus,
|
|
108
|
-
provider = 'Anthropic',
|
|
109
|
-
}: Props) => {
|
|
110
|
-
const { t } = useTranslation();
|
|
111
|
-
const [status, setStatus] = useState<Status>(forceStatus ?? 'operational');
|
|
112
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
113
|
-
const config = PROVIDER_CONFIGS[provider];
|
|
114
|
-
|
|
115
|
-
const getStatus = useCallback(async () => {
|
|
116
|
-
if (!config) return 'operational';
|
|
117
|
-
return fetchProviderStatus(config);
|
|
118
|
-
}, [config]);
|
|
119
|
-
|
|
120
|
-
useEffect(() => {
|
|
121
|
-
let mounted = true;
|
|
122
|
-
const abortController = new AbortController();
|
|
123
|
-
|
|
124
|
-
const checkStatus = async () => {
|
|
125
|
-
if (forceStatus) return;
|
|
126
|
-
setIsLoading(true);
|
|
127
|
-
try {
|
|
128
|
-
const newStatus = await getStatus();
|
|
129
|
-
if (mounted) {
|
|
130
|
-
setStatus(newStatus);
|
|
131
|
-
}
|
|
132
|
-
} catch (error) {
|
|
133
|
-
console.error('Failed to check status:', error);
|
|
134
|
-
if (mounted) {
|
|
135
|
-
setStatus('operational'); // Fallback on error
|
|
136
|
-
}
|
|
137
|
-
} finally {
|
|
138
|
-
if (mounted) {
|
|
139
|
-
setIsLoading(false);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
checkStatus();
|
|
145
|
-
|
|
146
|
-
return () => {
|
|
147
|
-
mounted = false;
|
|
148
|
-
abortController.abort();
|
|
149
|
-
};
|
|
150
|
-
}, [forceStatus, getStatus]);
|
|
151
|
-
|
|
152
|
-
if (isLoading) {
|
|
153
|
-
return (
|
|
154
|
-
<div className="memori--completion-provider-status--loading">
|
|
155
|
-
<Spin spinning={true} />
|
|
156
|
-
</div>
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
if (!status || status === 'operational') {
|
|
161
|
-
return null;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// Get appropriate icon and message based on status severity
|
|
165
|
-
const getStatusDetails = () => {
|
|
166
|
-
switch (status) {
|
|
167
|
-
case 'major_outage':
|
|
168
|
-
return {
|
|
169
|
-
Icon: Alert,
|
|
170
|
-
message: t('completionProviderMajorOutage', {
|
|
171
|
-
provider: provider ?? t('completionProviderFallbackName'),
|
|
172
|
-
fallback: t('completionProviderDown', {
|
|
173
|
-
provider: provider ?? t('completionProviderFallbackName'),
|
|
174
|
-
})
|
|
175
|
-
}),
|
|
176
|
-
className: "memori--completion-provider-status--icon-error"
|
|
177
|
-
};
|
|
178
|
-
case 'partial_outage':
|
|
179
|
-
return {
|
|
180
|
-
Icon: Warning,
|
|
181
|
-
message: t('completionProviderPartialOutage', {
|
|
182
|
-
provider: provider ?? t('completionProviderFallbackName'),
|
|
183
|
-
fallback: t('completionProviderDown', {
|
|
184
|
-
provider: provider ?? t('completionProviderFallbackName'),
|
|
185
|
-
})
|
|
186
|
-
}),
|
|
187
|
-
className: "memori--completion-provider-status--icon-warning"
|
|
188
|
-
};
|
|
189
|
-
case 'degraded_performance':
|
|
190
|
-
default:
|
|
191
|
-
return {
|
|
192
|
-
Icon: Info,
|
|
193
|
-
message: t('completionProviderDegraded', {
|
|
194
|
-
provider: provider ?? t('completionProviderFallbackName'),
|
|
195
|
-
fallback: t('completionProviderDown', {
|
|
196
|
-
provider: provider ?? t('completionProviderFallbackName'),
|
|
197
|
-
})
|
|
198
|
-
}),
|
|
199
|
-
className: "memori--completion-provider-status--icon-info"
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
const { Icon, message, className } = getStatusDetails();
|
|
205
|
-
|
|
206
|
-
return (
|
|
207
|
-
<Tooltip
|
|
208
|
-
className="memori--completion-provider-status--tooltip"
|
|
209
|
-
align="right"
|
|
210
|
-
content={
|
|
211
|
-
<div>
|
|
212
|
-
<p>{message}</p>
|
|
213
|
-
{config?.statusPage && (
|
|
214
|
-
<p>
|
|
215
|
-
<a
|
|
216
|
-
href={config.statusPage}
|
|
217
|
-
rel="noopener noreferrer"
|
|
218
|
-
target="_blank"
|
|
219
|
-
>
|
|
220
|
-
{t('completionProviderCheckStatusPage')}
|
|
221
|
-
</a>
|
|
222
|
-
</p>
|
|
223
|
-
)}
|
|
224
|
-
</div>
|
|
225
|
-
}
|
|
226
|
-
>
|
|
227
|
-
<Icon className={`memori--completion-provider-status--icon ${className}`} />
|
|
228
|
-
</Tooltip>
|
|
229
|
-
);
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
export default CompletionProviderStatus;
|
package/src/components/CompletionProviderStatus/__snapshots__/CompletionProviderStatus.test.tsx.snap
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders CompletionProviderStatus errored unchanged 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="memori-tooltip memori-tooltip--align-right memori--completion-provider-status--tooltip"
|
|
7
|
-
>
|
|
8
|
-
<div
|
|
9
|
-
class="memori-tooltip--trigger"
|
|
10
|
-
>
|
|
11
|
-
<svg
|
|
12
|
-
aria-hidden="true"
|
|
13
|
-
class="memori--completion-provider-status--icon memori--completion-provider-status--icon-error"
|
|
14
|
-
color="currentColor"
|
|
15
|
-
fill="none"
|
|
16
|
-
height="800px"
|
|
17
|
-
viewBox="0 0 24 24"
|
|
18
|
-
width="800px"
|
|
19
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
-
>
|
|
21
|
-
<path
|
|
22
|
-
d="M12 16H12.01M12 8V12M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z"
|
|
23
|
-
stroke="currentColor"
|
|
24
|
-
stroke-linecap="round"
|
|
25
|
-
stroke-linejoin="round"
|
|
26
|
-
stroke-width="2"
|
|
27
|
-
/>
|
|
28
|
-
</svg>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
`;
|
|
33
|
-
|
|
34
|
-
exports[`renders CompletionProviderStatus errored with provider specified unchanged 1`] = `
|
|
35
|
-
<div>
|
|
36
|
-
<div
|
|
37
|
-
class="memori-tooltip memori-tooltip--align-right memori--completion-provider-status--tooltip"
|
|
38
|
-
>
|
|
39
|
-
<div
|
|
40
|
-
class="memori-tooltip--trigger"
|
|
41
|
-
>
|
|
42
|
-
<svg
|
|
43
|
-
aria-hidden="true"
|
|
44
|
-
class="memori--completion-provider-status--icon memori--completion-provider-status--icon-error"
|
|
45
|
-
color="currentColor"
|
|
46
|
-
fill="none"
|
|
47
|
-
height="800px"
|
|
48
|
-
viewBox="0 0 24 24"
|
|
49
|
-
width="800px"
|
|
50
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
51
|
-
>
|
|
52
|
-
<path
|
|
53
|
-
d="M12 16H12.01M12 8V12M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z"
|
|
54
|
-
stroke="currentColor"
|
|
55
|
-
stroke-linecap="round"
|
|
56
|
-
stroke-linejoin="round"
|
|
57
|
-
stroke-width="2"
|
|
58
|
-
/>
|
|
59
|
-
</svg>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
`;
|
|
64
|
-
|
|
65
|
-
exports[`renders CompletionProviderStatus unchanged 1`] = `
|
|
66
|
-
<div>
|
|
67
|
-
<div
|
|
68
|
-
class="memori-tooltip memori-tooltip--align-right memori--completion-provider-status--tooltip"
|
|
69
|
-
>
|
|
70
|
-
<div
|
|
71
|
-
class="memori-tooltip--trigger"
|
|
72
|
-
>
|
|
73
|
-
<svg
|
|
74
|
-
aria-hidden="true"
|
|
75
|
-
class="memori--completion-provider-status--icon memori--completion-provider-status--icon-error"
|
|
76
|
-
color="currentColor"
|
|
77
|
-
fill="none"
|
|
78
|
-
height="800px"
|
|
79
|
-
viewBox="0 0 24 24"
|
|
80
|
-
width="800px"
|
|
81
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
82
|
-
>
|
|
83
|
-
<path
|
|
84
|
-
d="M12 16H12.01M12 8V12M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z"
|
|
85
|
-
stroke="currentColor"
|
|
86
|
-
stroke-linecap="round"
|
|
87
|
-
stroke-linejoin="round"
|
|
88
|
-
stroke-width="2"
|
|
89
|
-
/>
|
|
90
|
-
</svg>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
`;
|
|
95
|
-
|
|
96
|
-
exports[`renders CompletionProviderStatus with provider specified unchanged 1`] = `<div />`;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/* ContentPreviewModal – modern preview modal for files and media */
|
|
2
|
-
|
|
3
|
-
/* Stack above Chat History Drawer (z-index: 10000) and other drawers */
|
|
4
|
-
.memori-content-preview-modal.memori-modal {
|
|
5
|
-
z-index: 10001;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.memori-content-preview-modal.memori-modal .memori-modal--backdrop,
|
|
9
|
-
.memori-content-preview-modal.memori-modal .memori-modal--container {
|
|
10
|
-
z-index: 10001;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.memori-content-preview-modal.memori-modal .memori-modal--panel {
|
|
14
|
-
z-index: 10001;
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
min-width: 500px;
|
|
17
|
-
min-height: 500px;
|
|
18
|
-
border-radius: 16px;
|
|
19
|
-
background: var(--memori-content-preview-bg, #fafafa);
|
|
20
|
-
box-shadow:
|
|
21
|
-
0 25px 50px -12px rgba(0, 0, 0, 0.25),
|
|
22
|
-
0 0 0 1px rgba(0, 0, 0, 0.05);
|
|
23
|
-
overflow-y: auto;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* Image variant: modal at least 600px wide (capped by viewport on small screens) */
|
|
27
|
-
.memori-content-preview-modal--image.memori-modal .memori-modal--panel {
|
|
28
|
-
min-width: min(600px, 100vw);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.memori-content-preview-modal .memori-modal--title {
|
|
32
|
-
padding: 1rem 1.25rem 0.75rem;
|
|
33
|
-
border-bottom: 1px solid var(--memori-content-preview-border, rgba(0, 0, 0, 0.06));
|
|
34
|
-
color: var(--memori-content-preview-title, #1f2937);
|
|
35
|
-
font-size: 1rem;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
letter-spacing: -0.01em;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.memori-content-preview-modal .memori-modal--close {
|
|
41
|
-
top: 0.75rem;
|
|
42
|
-
right: 0.75rem;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.memori-content-preview-modal .memori-modal--close button {
|
|
46
|
-
border-radius: 10px;
|
|
47
|
-
background: var(--memori-content-preview-close-bg, rgba(0, 0, 0, 0.05));
|
|
48
|
-
transition: background 0.2s ease, transform 0.15s ease;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.memori-content-preview-modal .memori-modal--close button:hover {
|
|
52
|
-
background: var(--memori-content-preview-close-hover, rgba(0, 0, 0, 0.1));
|
|
53
|
-
transform: scale(1.05);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* Body area */
|
|
57
|
-
.memori-content-preview-modal--body {
|
|
58
|
-
overflow: auto;
|
|
59
|
-
max-height: 70vh;
|
|
60
|
-
padding: 1.25rem;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.memori-content-preview-modal--body--image {
|
|
64
|
-
display: flex;
|
|
65
|
-
min-height: 400px;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
padding: 1.5rem;
|
|
69
|
-
background: var(--memori-content-preview-image-bg, #f3f4f6);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.memori-content-preview-modal--body--content {
|
|
73
|
-
padding: 1rem 1.25rem;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Image */
|
|
77
|
-
.memori-content-preview-modal--image-wrap {
|
|
78
|
-
display: flex;
|
|
79
|
-
width: 100%;
|
|
80
|
-
min-width: 0;
|
|
81
|
-
align-items: center;
|
|
82
|
-
justify-content: center;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.memori-content-preview-modal--image {
|
|
86
|
-
width: 100%;
|
|
87
|
-
height: 100%;
|
|
88
|
-
max-height: 70vh;
|
|
89
|
-
border-radius: 8px;
|
|
90
|
-
object-fit: contain;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Snippet / text content area */
|
|
94
|
-
.memori-content-preview-modal--snippet-wrap {
|
|
95
|
-
min-height: 120px;
|
|
96
|
-
border: 1px solid var(--memori-content-preview-snippet-border, #e2e8f0);
|
|
97
|
-
border-radius: 12px;
|
|
98
|
-
background: var(--memori-content-preview-snippet-bg, #f8fafc);
|
|
99
|
-
color: var(--memori-content-preview-snippet-text, #334155);
|
|
100
|
-
font-family: 'SF Mono', 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
101
|
-
font-size: 0.875rem;
|
|
102
|
-
line-height: 1.6;
|
|
103
|
-
overflow-x: auto;
|
|
104
|
-
white-space: pre-wrap;
|
|
105
|
-
word-break: break-word;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/* When Snippet component is used inside, give it consistent spacing */
|
|
109
|
-
.memori-content-preview-modal--snippet-wrap .memori-snippet {
|
|
110
|
-
border: none;
|
|
111
|
-
border-radius: 12px;
|
|
112
|
-
background: transparent;
|
|
113
|
-
box-shadow: none;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.memori-content-preview-modal--snippet-wrap .memori-snippet--content pre {
|
|
117
|
-
padding: 1rem 1.25rem;
|
|
118
|
-
overflow-wrap: break-word;
|
|
119
|
-
/* Override Prism theme so PDF/text content wraps instead of one long line */
|
|
120
|
-
white-space: pre-wrap !important;
|
|
121
|
-
word-break: break-word;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.memori-content-preview-modal--snippet-wrap .memori-snippet--content pre code {
|
|
125
|
-
overflow-wrap: break-word;
|
|
126
|
-
white-space: pre-wrap !important;
|
|
127
|
-
word-break: break-word;
|
|
128
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import Modal from '../ui/Modal';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
|
|
5
|
-
export interface ContentPreviewModalProps {
|
|
6
|
-
open: boolean;
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
title?: string;
|
|
9
|
-
/** When true, renders image with min 600px width; otherwise renders children in snippet-style area */
|
|
10
|
-
isImage?: boolean;
|
|
11
|
-
imageSrc?: string;
|
|
12
|
-
imageAlt?: string;
|
|
13
|
-
/** Content for non-image preview (text, Snippet, iframe, etc.) */
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const ContentPreviewModal: FC<ContentPreviewModalProps> = ({
|
|
19
|
-
open,
|
|
20
|
-
onClose,
|
|
21
|
-
title,
|
|
22
|
-
isImage = false,
|
|
23
|
-
imageSrc,
|
|
24
|
-
imageAlt = '',
|
|
25
|
-
children,
|
|
26
|
-
className,
|
|
27
|
-
}) => {
|
|
28
|
-
const width = 'min(90vw, 800px)';
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<Modal
|
|
32
|
-
open={open}
|
|
33
|
-
onClose={() => onClose()}
|
|
34
|
-
width={width}
|
|
35
|
-
widthMd={width}
|
|
36
|
-
className={cx('memori-content-preview-modal', className, {
|
|
37
|
-
'memori-content-preview-modal--image': isImage,
|
|
38
|
-
})}
|
|
39
|
-
closable
|
|
40
|
-
title={title}
|
|
41
|
-
footer={null}
|
|
42
|
-
>
|
|
43
|
-
<div
|
|
44
|
-
className={cx('memori-content-preview-modal--body', {
|
|
45
|
-
'memori-content-preview-modal--body--image': isImage,
|
|
46
|
-
'memori-content-preview-modal--body--content': !isImage,
|
|
47
|
-
})}
|
|
48
|
-
>
|
|
49
|
-
{isImage && imageSrc ? (
|
|
50
|
-
<div className="memori-content-preview-modal--image-wrap">
|
|
51
|
-
<img
|
|
52
|
-
src={imageSrc}
|
|
53
|
-
alt={imageAlt}
|
|
54
|
-
className="memori-content-preview-modal--image"
|
|
55
|
-
/>
|
|
56
|
-
</div>
|
|
57
|
-
) : (
|
|
58
|
-
<div className="memori-content-preview-modal--snippet-wrap">
|
|
59
|
-
{children}
|
|
60
|
-
</div>
|
|
61
|
-
)}
|
|
62
|
-
</div>
|
|
63
|
-
</Modal>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export default ContentPreviewModal;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Meta, Story } from '@storybook/react';
|
|
3
|
-
import ModelViewer, { Props } from './ModelViewer';
|
|
4
|
-
import './ModelViewer.css';
|
|
5
|
-
|
|
6
|
-
const meta: Meta = {
|
|
7
|
-
title: 'Custom GLB Avatar',
|
|
8
|
-
component: ModelViewer,
|
|
9
|
-
argTypes: {
|
|
10
|
-
src: {
|
|
11
|
-
control: {
|
|
12
|
-
type: 'text',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
poster: {
|
|
16
|
-
control: {
|
|
17
|
-
type: 'text',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
alt: {
|
|
21
|
-
control: {
|
|
22
|
-
type: 'text',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
parameters: {
|
|
27
|
-
controls: { expanded: true },
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default meta;
|
|
32
|
-
|
|
33
|
-
const Template: Story<Props> = args => {
|
|
34
|
-
const [hydrated, setHydrated] = React.useState(false);
|
|
35
|
-
React.useEffect(() => {
|
|
36
|
-
setHydrated(true);
|
|
37
|
-
}, []);
|
|
38
|
-
|
|
39
|
-
return hydrated ? (
|
|
40
|
-
<ModelViewer
|
|
41
|
-
{...args}
|
|
42
|
-
src={args.src + `#${new Date(Date.now()).toISOString()}`}
|
|
43
|
-
key={Date.now()}
|
|
44
|
-
/>
|
|
45
|
-
) : (
|
|
46
|
-
<></>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
|
|
51
|
-
// https://storybook.js.org/docs/react/workflows/unit-testing
|
|
52
|
-
export const Default = Template.bind({});
|
|
53
|
-
Default.args = {
|
|
54
|
-
alt: '',
|
|
55
|
-
src: 'https://assets.memori.ai/api/v2/asset/7383f05a-0788-49b0-b9b9-3bfc402c7ddf.glb#1669136149862',
|
|
56
|
-
poster:
|
|
57
|
-
'https://assets.memori.ai/api/v2/asset/596382ce-381a-4a66-9740-c7adc3bfa4a8.png',
|
|
58
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import ModelViewer from './ModelViewer';
|
|
4
|
-
|
|
5
|
-
it('renders ModelViewer unchanged', () => {
|
|
6
|
-
const { container } = render(
|
|
7
|
-
<ModelViewer
|
|
8
|
-
src="https://assets.memori.ai/api/v2/asset/b791f77c-1a94-4272-829e-eca82fcc62b7.glb"
|
|
9
|
-
poster="https://assets.memori.ai/api/v2/asset/d8035229-08cf-42a7-a532-ab051df2603d.png"
|
|
10
|
-
/>
|
|
11
|
-
);
|
|
12
|
-
expect(container).toMatchSnapshot();
|
|
13
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface Props {
|
|
4
|
-
src: string;
|
|
5
|
-
poster: string;
|
|
6
|
-
alt?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const ModelViewer = ({ src, poster, alt = '' }: Props) => {
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const script = document.createElement('script');
|
|
12
|
-
script.src =
|
|
13
|
-
'https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js';
|
|
14
|
-
script.type = 'module';
|
|
15
|
-
document.head.appendChild(script);
|
|
16
|
-
return () => {
|
|
17
|
-
document.head.removeChild(script);
|
|
18
|
-
};
|
|
19
|
-
}, []);
|
|
20
|
-
return (
|
|
21
|
-
<div className="model-viewer">
|
|
22
|
-
{/* @ts-ignore */}
|
|
23
|
-
<model-viewer
|
|
24
|
-
src={src}
|
|
25
|
-
ios-src=""
|
|
26
|
-
poster={poster}
|
|
27
|
-
alt={alt}
|
|
28
|
-
shadow-intensity="1"
|
|
29
|
-
disable-zoom
|
|
30
|
-
camera-controls
|
|
31
|
-
autoplay
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default ModelViewer;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders ModelViewer unchanged 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="model-viewer"
|
|
7
|
-
>
|
|
8
|
-
<model-viewer
|
|
9
|
-
alt=""
|
|
10
|
-
autoplay="true"
|
|
11
|
-
camera-controls="true"
|
|
12
|
-
disable-zoom="true"
|
|
13
|
-
ios-src=""
|
|
14
|
-
poster="https://assets.memori.ai/api/v2/asset/d8035229-08cf-42a7-a532-ab051df2603d.png"
|
|
15
|
-
shadow-intensity="1"
|
|
16
|
-
src="https://assets.memori.ai/api/v2/asset/b791f77c-1a94-4272-829e-eca82fcc62b7.glb"
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
`;
|