@memori.ai/memori-react 8.45.2 → 8.45.5
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.d.ts +1 -0
- package/dist/components/Chat/Chat.js +6 -3
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.css +78 -0
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +39 -0
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +43 -0
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -0
- package/dist/components/ChatInputs/ChatInputs.d.ts +1 -0
- package/dist/components/ChatInputs/ChatInputs.js +2 -2
- package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
- package/dist/components/ContentPreviewModal/DocumentMarkdown.d.ts +7 -0
- package/dist/components/ContentPreviewModal/DocumentMarkdown.js +31 -0
- package/dist/components/ContentPreviewModal/DocumentMarkdown.js.map +1 -0
- package/dist/components/DrawerFooter/DrawerFooter.css +62 -0
- package/dist/components/DrawerFooter/DrawerFooter.d.ts +12 -0
- package/dist/components/DrawerFooter/DrawerFooter.js +10 -0
- package/dist/components/DrawerFooter/DrawerFooter.js.map +1 -0
- package/dist/components/IconButton/IconButton.css +135 -0
- package/dist/components/IconButton/IconButton.d.ts +9 -0
- package/dist/components/IconButton/IconButton.js +36 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/LoginModal/LoginModal.css +270 -0
- package/dist/components/LoginModal/LoginModal.d.ts +19 -0
- package/dist/components/LoginModal/LoginModal.js +355 -0
- package/dist/components/LoginModal/LoginModal.js.map +1 -0
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +2 -2
- package/dist/components/MemoriWidget/MemoriWidget.js +13 -21
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/MobileSessionPanel/MobileSessionPanel.css +540 -0
- package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +65 -0
- package/dist/components/MobileSessionPanel/MobileSessionPanel.js +254 -0
- package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
- package/dist/components/PositionPopover/PositionPopover.css +218 -0
- package/dist/components/PositionPopover/PositionPopover.d.ts +22 -0
- package/dist/components/PositionPopover/PositionPopover.js +208 -0
- package/dist/components/PositionPopover/PositionPopover.js.map +1 -0
- package/dist/components/ReasoningBlock/ReasoningBlock.css +156 -0
- package/dist/components/ReasoningBlock/ReasoningBlock.d.ts +7 -0
- package/dist/components/ReasoningBlock/ReasoningBlock.js +61 -0
- package/dist/components/ReasoningBlock/ReasoningBlock.js.map +1 -0
- package/dist/components/SideDrawer/SideDrawer.css +112 -0
- package/dist/components/SideDrawer/SideDrawer.d.ts +22 -0
- package/dist/components/SideDrawer/SideDrawer.js +17 -0
- package/dist/components/SideDrawer/SideDrawer.js.map +1 -0
- package/dist/components/UploadButton/UploadButton.d.ts +2 -0
- package/dist/components/UploadButton/UploadButton.js +2 -2
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/UploadButton/UploadImages/UploadImages.d.ts +2 -0
- package/dist/components/UploadButton/UploadImages/UploadImages.js +7 -1
- package/dist/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +4 -0
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +144 -0
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -0
- package/{src/components/layouts → dist/components/layouts/WebsiteAssistant}/website-assistant.css +298 -86
- package/dist/components/layouts/chat.css +27 -4
- package/dist/components/layouts/fullpage.css +628 -0
- package/dist/helpers/artifactPanel.d.ts +6 -0
- package/dist/helpers/artifactPanel.js +42 -0
- package/dist/helpers/artifactPanel.js.map +1 -0
- package/dist/helpers/chatScroll.d.ts +12 -0
- package/dist/helpers/chatScroll.js +14 -0
- package/dist/helpers/chatScroll.js.map +1 -0
- package/dist/helpers/conversationHistory.d.ts +16 -0
- package/dist/helpers/conversationHistory.js +89 -0
- package/dist/helpers/conversationHistory.js.map +1 -0
- package/dist/helpers/conversationTitle.d.ts +8 -0
- package/dist/helpers/conversationTitle.js +27 -0
- package/dist/helpers/conversationTitle.js.map +1 -0
- package/dist/helpers/enhanceBubbleCodeBlocks.d.ts +5 -0
- package/dist/helpers/enhanceBubbleCodeBlocks.js +97 -0
- package/dist/helpers/enhanceBubbleCodeBlocks.js.map +1 -0
- package/dist/helpers/highlightMatches.d.ts +2 -0
- package/dist/helpers/highlightMatches.js +54 -0
- package/dist/helpers/highlightMatches.js.map +1 -0
- package/dist/helpers/nats/dialogStateCatchUp.d.ts +3 -0
- package/dist/helpers/nats/dialogStateCatchUp.js +40 -0
- package/dist/helpers/nats/dialogStateCatchUp.js.map +1 -0
- package/dist/helpers/positionPopover.d.ts +3 -0
- package/dist/helpers/positionPopover.js +22 -0
- package/dist/helpers/positionPopover.js.map +1 -0
- package/dist/helpers/prism.d.ts +16 -0
- package/dist/helpers/prism.js +78 -0
- package/dist/helpers/prism.js.map +1 -0
- package/dist/helpers/reasoning.d.ts +7 -0
- package/dist/helpers/reasoning.js +43 -0
- package/dist/helpers/reasoning.js.map +1 -0
- package/dist/helpers/relativeTime.d.ts +3 -0
- package/dist/helpers/relativeTime.js +56 -0
- package/dist/helpers/relativeTime.js.map +1 -0
- package/dist/helpers/sourcesCount.d.ts +2 -0
- package/dist/helpers/sourcesCount.js +22 -0
- package/dist/helpers/sourcesCount.js.map +1 -0
- package/dist/helpers/tts/muteSpeaker.d.ts +13 -0
- package/dist/helpers/tts/muteSpeaker.js +26 -0
- package/dist/helpers/tts/muteSpeaker.js.map +1 -0
- package/dist/helpers/usePressTooltip.d.ts +18 -0
- package/dist/helpers/usePressTooltip.js +38 -0
- package/dist/helpers/usePressTooltip.js.map +1 -0
- package/dist/icons/FacebookIcon.d.ts +3 -0
- package/dist/icons/FacebookIcon.js +6 -0
- package/dist/icons/FacebookIcon.js.map +1 -0
- package/dist/icons/LinkedinIcon.d.ts +3 -0
- package/dist/icons/LinkedinIcon.js +6 -0
- package/dist/icons/LinkedinIcon.js.map +1 -0
- package/dist/icons/MemoriIcon.d.ts +3 -0
- package/dist/icons/MemoriIcon.js +8 -0
- package/dist/icons/MemoriIcon.js.map +1 -0
- package/dist/icons/TelegramIcon.d.ts +3 -0
- package/dist/icons/TelegramIcon.js +6 -0
- package/dist/icons/TelegramIcon.js.map +1 -0
- package/dist/icons/TwitterIcon.d.ts +3 -0
- package/dist/icons/TwitterIcon.js +6 -0
- package/dist/icons/TwitterIcon.js.map +1 -0
- package/dist/icons/WhatsappIcon.d.ts +3 -0
- package/dist/icons/WhatsappIcon.js +6 -0
- package/dist/icons/WhatsappIcon.js.map +1 -0
- package/dist/icons/artifacts/DocumentIcon.d.ts +3 -0
- package/dist/icons/artifacts/DocumentIcon.js +6 -0
- package/dist/icons/artifacts/DocumentIcon.js.map +1 -0
- package/dist/icons/artifacts/HtmlIcon.d.ts +3 -0
- package/dist/icons/artifacts/HtmlIcon.js +6 -0
- package/dist/icons/artifacts/HtmlIcon.js.map +1 -0
- package/dist/icons/artifacts/JavascriptIcon.d.ts +3 -0
- package/dist/icons/artifacts/JavascriptIcon.js +6 -0
- package/dist/icons/artifacts/JavascriptIcon.js.map +1 -0
- package/dist/icons/artifacts/MarkdownIcon.d.ts +3 -0
- package/dist/icons/artifacts/MarkdownIcon.js +6 -0
- package/dist/icons/artifacts/MarkdownIcon.js.map +1 -0
- package/dist/icons/artifacts/PythonIcon.d.ts +3 -0
- package/dist/icons/artifacts/PythonIcon.js +6 -0
- package/dist/icons/artifacts/PythonIcon.js.map +1 -0
- package/dist/icons/artifacts/SvgIcon.d.ts +3 -0
- package/dist/icons/artifacts/SvgIcon.js +6 -0
- package/dist/icons/artifacts/SvgIcon.js.map +1 -0
- package/dist/icons/artifacts/XmlIcon.d.ts +3 -0
- package/dist/icons/artifacts/XmlIcon.js +6 -0
- package/dist/icons/artifacts/XmlIcon.js.map +1 -0
- package/dist/icons/artifacts/cssIcon.d.ts +3 -0
- package/dist/icons/artifacts/cssIcon.js +6 -0
- package/dist/icons/artifacts/cssIcon.js.map +1 -0
- package/dist/styles/motion.css +25 -0
- package/dist/styles.css +1 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/Chat/Chat.d.ts +1 -0
- package/esm/components/Chat/Chat.js +6 -3
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +39 -0
- package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js +40 -0
- package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -0
- package/esm/components/ChatInputs/ChatInputs.d.ts +1 -0
- package/esm/components/ChatInputs/ChatInputs.js +2 -2
- package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
- package/esm/components/ContentPreviewModal/DocumentMarkdown.d.ts +7 -0
- package/esm/components/ContentPreviewModal/DocumentMarkdown.js +28 -0
- package/esm/components/ContentPreviewModal/DocumentMarkdown.js.map +1 -0
- package/esm/components/DrawerFooter/DrawerFooter.d.ts +12 -0
- package/esm/components/DrawerFooter/DrawerFooter.js +8 -0
- package/esm/components/DrawerFooter/DrawerFooter.js.map +1 -0
- package/esm/components/IconButton/IconButton.d.ts +9 -0
- package/esm/components/IconButton/IconButton.js +33 -0
- package/esm/components/IconButton/IconButton.js.map +1 -0
- package/esm/components/LoginModal/LoginModal.d.ts +19 -0
- package/esm/components/LoginModal/LoginModal.js +352 -0
- package/esm/components/LoginModal/LoginModal.js.map +1 -0
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +2 -2
- package/esm/components/MemoriWidget/MemoriWidget.js +8 -17
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +65 -0
- package/esm/components/MobileSessionPanel/MobileSessionPanel.js +251 -0
- package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
- package/esm/components/PositionPopover/PositionPopover.d.ts +22 -0
- package/esm/components/PositionPopover/PositionPopover.js +203 -0
- package/esm/components/PositionPopover/PositionPopover.js.map +1 -0
- package/esm/components/ReasoningBlock/ReasoningBlock.d.ts +7 -0
- package/esm/components/ReasoningBlock/ReasoningBlock.js +58 -0
- package/esm/components/ReasoningBlock/ReasoningBlock.js.map +1 -0
- package/esm/components/SideDrawer/SideDrawer.d.ts +22 -0
- package/esm/components/SideDrawer/SideDrawer.js +12 -0
- package/esm/components/SideDrawer/SideDrawer.js.map +1 -0
- package/esm/components/UploadButton/UploadButton.d.ts +2 -0
- package/esm/components/UploadButton/UploadButton.js +2 -2
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/UploadButton/UploadImages/UploadImages.d.ts +2 -0
- package/esm/components/UploadButton/UploadImages/UploadImages.js +7 -1
- package/esm/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +4 -0
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +141 -0
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -0
- package/esm/components/layouts/chat.css +27 -4
- package/esm/helpers/artifactPanel.d.ts +6 -0
- package/esm/helpers/artifactPanel.js +37 -0
- package/esm/helpers/artifactPanel.js.map +1 -0
- package/esm/helpers/chatScroll.d.ts +12 -0
- package/esm/helpers/chatScroll.js +9 -0
- package/esm/helpers/chatScroll.js.map +1 -0
- package/esm/helpers/conversationHistory.d.ts +16 -0
- package/esm/helpers/conversationHistory.js +82 -0
- package/esm/helpers/conversationHistory.js.map +1 -0
- package/esm/helpers/conversationTitle.d.ts +8 -0
- package/esm/helpers/conversationTitle.js +23 -0
- package/esm/helpers/conversationTitle.js.map +1 -0
- package/esm/helpers/enhanceBubbleCodeBlocks.d.ts +5 -0
- package/esm/helpers/enhanceBubbleCodeBlocks.js +94 -0
- package/esm/helpers/enhanceBubbleCodeBlocks.js.map +1 -0
- package/esm/helpers/highlightMatches.d.ts +2 -0
- package/esm/helpers/highlightMatches.js +49 -0
- package/esm/helpers/highlightMatches.js.map +1 -0
- package/esm/helpers/nats/dialogStateCatchUp.d.ts +3 -0
- package/esm/helpers/nats/dialogStateCatchUp.js +35 -0
- package/esm/helpers/nats/dialogStateCatchUp.js.map +1 -0
- package/esm/helpers/positionPopover.d.ts +3 -0
- package/esm/helpers/positionPopover.js +17 -0
- package/esm/helpers/positionPopover.js.map +1 -0
- package/esm/helpers/prism.d.ts +16 -0
- package/esm/helpers/prism.js +74 -0
- package/esm/helpers/prism.js.map +1 -0
- package/esm/helpers/reasoning.d.ts +7 -0
- package/esm/helpers/reasoning.js +39 -0
- package/esm/helpers/reasoning.js.map +1 -0
- package/esm/helpers/relativeTime.d.ts +3 -0
- package/esm/helpers/relativeTime.js +50 -0
- package/esm/helpers/relativeTime.js.map +1 -0
- package/esm/helpers/sourcesCount.d.ts +2 -0
- package/esm/helpers/sourcesCount.js +18 -0
- package/esm/helpers/sourcesCount.js.map +1 -0
- package/esm/helpers/tts/muteSpeaker.d.ts +13 -0
- package/esm/helpers/tts/muteSpeaker.js +21 -0
- package/esm/helpers/tts/muteSpeaker.js.map +1 -0
- package/esm/helpers/usePressTooltip.d.ts +18 -0
- package/esm/helpers/usePressTooltip.js +35 -0
- package/esm/helpers/usePressTooltip.js.map +1 -0
- package/esm/icons/FacebookIcon.d.ts +3 -0
- package/esm/icons/FacebookIcon.js +4 -0
- package/esm/icons/FacebookIcon.js.map +1 -0
- package/esm/icons/LinkedinIcon.d.ts +3 -0
- package/esm/icons/LinkedinIcon.js +4 -0
- package/esm/icons/LinkedinIcon.js.map +1 -0
- package/esm/icons/MemoriIcon.d.ts +3 -0
- package/esm/icons/MemoriIcon.js +6 -0
- package/esm/icons/MemoriIcon.js.map +1 -0
- package/esm/icons/TelegramIcon.d.ts +3 -0
- package/esm/icons/TelegramIcon.js +4 -0
- package/esm/icons/TelegramIcon.js.map +1 -0
- package/esm/icons/TwitterIcon.d.ts +3 -0
- package/esm/icons/TwitterIcon.js +4 -0
- package/esm/icons/TwitterIcon.js.map +1 -0
- package/esm/icons/WhatsappIcon.d.ts +3 -0
- package/esm/icons/WhatsappIcon.js +4 -0
- package/esm/icons/WhatsappIcon.js.map +1 -0
- package/esm/icons/artifacts/DocumentIcon.d.ts +3 -0
- package/esm/icons/artifacts/DocumentIcon.js +4 -0
- package/esm/icons/artifacts/DocumentIcon.js.map +1 -0
- package/esm/icons/artifacts/HtmlIcon.d.ts +3 -0
- package/esm/icons/artifacts/HtmlIcon.js +4 -0
- package/esm/icons/artifacts/HtmlIcon.js.map +1 -0
- package/esm/icons/artifacts/JavascriptIcon.d.ts +3 -0
- package/esm/icons/artifacts/JavascriptIcon.js +4 -0
- package/esm/icons/artifacts/JavascriptIcon.js.map +1 -0
- package/esm/icons/artifacts/MarkdownIcon.d.ts +3 -0
- package/esm/icons/artifacts/MarkdownIcon.js +4 -0
- package/esm/icons/artifacts/MarkdownIcon.js.map +1 -0
- package/esm/icons/artifacts/PythonIcon.d.ts +3 -0
- package/esm/icons/artifacts/PythonIcon.js +4 -0
- package/esm/icons/artifacts/PythonIcon.js.map +1 -0
- package/esm/icons/artifacts/SvgIcon.d.ts +3 -0
- package/esm/icons/artifacts/SvgIcon.js +4 -0
- package/esm/icons/artifacts/SvgIcon.js.map +1 -0
- package/esm/icons/artifacts/XmlIcon.d.ts +3 -0
- package/esm/icons/artifacts/XmlIcon.js +4 -0
- package/esm/icons/artifacts/XmlIcon.js.map +1 -0
- package/esm/icons/artifacts/cssIcon.d.ts +3 -0
- package/esm/icons/artifacts/cssIcon.js +4 -0
- package/esm/icons/artifacts/cssIcon.js.map +1 -0
- package/esm/styles.css +1 -2
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +7 -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/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 -688
- package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +0 -421
- 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/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 -268
- 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 -331
- package/src/helpers/utils.ts +0 -591
- 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
package/src/helpers/utils.ts
DELETED
|
@@ -1,591 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useRef, useMemo } from 'react';
|
|
2
|
-
import { Material, MeshStandardMaterial, SkinnedMesh } from 'three';
|
|
3
|
-
import * as THREE from 'three';
|
|
4
|
-
import { localTextExtensions, officeNativeExtensions } from './constants';
|
|
5
|
-
|
|
6
|
-
export const hasTouchscreen = (): boolean => {
|
|
7
|
-
let hasTouchScreen = false;
|
|
8
|
-
|
|
9
|
-
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
|
|
10
|
-
return hasTouchScreen;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if ('maxTouchPoints' in navigator) {
|
|
14
|
-
hasTouchScreen = navigator.maxTouchPoints > 0;
|
|
15
|
-
} else if ('msMaxTouchPoints' in navigator) {
|
|
16
|
-
hasTouchScreen = (navigator as any).msMaxTouchPoints > 0;
|
|
17
|
-
} else {
|
|
18
|
-
const mQ =
|
|
19
|
-
window && 'matchMedia' in window && matchMedia('(pointer:coarse)');
|
|
20
|
-
if (mQ && mQ.media === '(pointer:coarse)') {
|
|
21
|
-
hasTouchScreen = !!mQ.matches;
|
|
22
|
-
} else if ('orientation' in window) {
|
|
23
|
-
hasTouchScreen = true; // deprecated, but good fallback
|
|
24
|
-
} else {
|
|
25
|
-
// Only as a last resort, fall back to user agent sniffing
|
|
26
|
-
var UA = (navigator as any)?.userAgent;
|
|
27
|
-
hasTouchScreen =
|
|
28
|
-
/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) ||
|
|
29
|
-
/\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
//console.log('Has touch screen: ' + hasTouchScreen);
|
|
34
|
-
return hasTouchScreen;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/** Breakpoint below which we consider the device a mobile/tablet for input behavior (px). */
|
|
38
|
-
const MOBILE_TABLET_VIEWPORT_MAX = 1024;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* True when the device should use mobile/tablet input behavior (e.g. Enter = new line).
|
|
42
|
-
* Returns false for touch-capable desktops/laptops (e.g. Microsoft Surface) so they
|
|
43
|
-
* keep desktop behavior (Enter = send, Alt+Enter / Shift+Enter = new line).
|
|
44
|
-
*/
|
|
45
|
-
export const isMobileOrTablet = (): boolean => {
|
|
46
|
-
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
if (!hasTouchscreen()) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
// Known mobile/tablet user agents → always treat as mobile/tablet
|
|
53
|
-
const ua = (navigator as any)?.userAgent || '';
|
|
54
|
-
if (
|
|
55
|
-
/\b(Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini)\b/i.test(
|
|
56
|
-
ua
|
|
57
|
-
)
|
|
58
|
-
) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
// Touch device with desktop UA (e.g. Surface): only treat as mobile/tablet when viewport is small
|
|
62
|
-
return window.innerWidth <= MOBILE_TABLET_VIEWPORT_MAX;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const isiOS = (): boolean => {
|
|
66
|
-
let platform =
|
|
67
|
-
(navigator as any)?.userAgentData?.platform ||
|
|
68
|
-
navigator?.platform ||
|
|
69
|
-
'unknown';
|
|
70
|
-
let userAgent = (navigator as any)?.userAgent || 'unknown';
|
|
71
|
-
|
|
72
|
-
let isIOS =
|
|
73
|
-
[
|
|
74
|
-
'iPad Simulator',
|
|
75
|
-
'iPhone Simulator',
|
|
76
|
-
'iPod Simulator',
|
|
77
|
-
'iPad',
|
|
78
|
-
'iPhone',
|
|
79
|
-
'iPod',
|
|
80
|
-
].includes(platform) ||
|
|
81
|
-
// iPad on iOS 13 detection
|
|
82
|
-
(userAgent.includes('Mac') && 'ontouchend' in document);
|
|
83
|
-
|
|
84
|
-
return isIOS;
|
|
85
|
-
};
|
|
86
|
-
export const isAndroid = (): boolean => {
|
|
87
|
-
let platform =
|
|
88
|
-
(navigator as any)?.userAgentData?.platform ||
|
|
89
|
-
navigator?.platform ||
|
|
90
|
-
'unknown';
|
|
91
|
-
|
|
92
|
-
let isAndroid =
|
|
93
|
-
platform.toLowerCase() === 'android' ||
|
|
94
|
-
navigator.userAgent.includes('Android');
|
|
95
|
-
|
|
96
|
-
//console.log('Is Android: ' + isAndroid);
|
|
97
|
-
return isAndroid;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export const isSafari = (): boolean => {
|
|
101
|
-
if (typeof navigator === 'undefined') return false;
|
|
102
|
-
|
|
103
|
-
const userAgent = navigator.userAgent;
|
|
104
|
-
const isSafariUA = userAgent.includes('Safari') && !userAgent.includes('Chrome');
|
|
105
|
-
const isWebKit = 'WebKit' in window && !('Chrome' in window);
|
|
106
|
-
|
|
107
|
-
return isSafariUA || isWebKit;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export const isSafariIOS = (): boolean => {
|
|
111
|
-
if (typeof navigator === 'undefined') return false;
|
|
112
|
-
|
|
113
|
-
const userAgent = navigator.userAgent;
|
|
114
|
-
return (
|
|
115
|
-
userAgent.includes('Safari') &&
|
|
116
|
-
!userAgent.includes('Chrome') &&
|
|
117
|
-
/iPad|iPhone|iPod/.test(userAgent)
|
|
118
|
-
);
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const pwdRegEx =
|
|
122
|
-
// eslint-disable-next-line no-useless-escape
|
|
123
|
-
/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$_:;|,~+=\{\}\[\]%^&*-]).{8,}$/;
|
|
124
|
-
export const mailRegEx = /^\w+([.-]?[+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,})+$/;
|
|
125
|
-
export const usernameRegEx = /^(?!.*\.\.)(?!.*\.$)[^\W][\w.+-]{2,32}$/;
|
|
126
|
-
export const validURLRegEx = /^(ftp|http|https):\/\/[^ "]+$/;
|
|
127
|
-
|
|
128
|
-
export const isValidUrl = (url: string) => {
|
|
129
|
-
try {
|
|
130
|
-
return Boolean(new URL(url));
|
|
131
|
-
} catch (e) {
|
|
132
|
-
return false;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export function useDebounce<T>(value: T, delay: number): T {
|
|
137
|
-
const [debouncedValue, setDebouncedValue] = useState<T>(value);
|
|
138
|
-
|
|
139
|
-
useEffect(() => {
|
|
140
|
-
const handler = setTimeout(() => {
|
|
141
|
-
setDebouncedValue(value);
|
|
142
|
-
}, delay);
|
|
143
|
-
|
|
144
|
-
return () => {
|
|
145
|
-
clearTimeout(handler);
|
|
146
|
-
};
|
|
147
|
-
}, [value, delay]);
|
|
148
|
-
|
|
149
|
-
return debouncedValue;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export function useDebounceFn<T extends (...args: any) => any>(
|
|
153
|
-
fn: T,
|
|
154
|
-
delay: number
|
|
155
|
-
): T {
|
|
156
|
-
const timeoutId = useRef<number | undefined>();
|
|
157
|
-
const originalFn = useRef<T | null>(null);
|
|
158
|
-
|
|
159
|
-
useEffect(() => {
|
|
160
|
-
originalFn.current = fn;
|
|
161
|
-
return () => {
|
|
162
|
-
originalFn.current = null;
|
|
163
|
-
};
|
|
164
|
-
}, [fn]);
|
|
165
|
-
|
|
166
|
-
useEffect(() => {
|
|
167
|
-
return () => {
|
|
168
|
-
clearTimeout(timeoutId.current);
|
|
169
|
-
};
|
|
170
|
-
}, []);
|
|
171
|
-
|
|
172
|
-
return useMemo<T>(
|
|
173
|
-
() =>
|
|
174
|
-
((...args: unknown[]) => {
|
|
175
|
-
clearTimeout(timeoutId.current);
|
|
176
|
-
|
|
177
|
-
timeoutId.current = window.setTimeout(() => {
|
|
178
|
-
if (originalFn.current) {
|
|
179
|
-
originalFn.current(...args);
|
|
180
|
-
}
|
|
181
|
-
}, delay);
|
|
182
|
-
}) as unknown as T,
|
|
183
|
-
[delay]
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export const stripDuplicates = (text: string) => {
|
|
188
|
-
if (
|
|
189
|
-
text
|
|
190
|
-
.slice(0, text.length / 2)
|
|
191
|
-
.trim()
|
|
192
|
-
.toLowerCase() ===
|
|
193
|
-
text
|
|
194
|
-
.slice(text.length / 2 + 1)
|
|
195
|
-
.trim()
|
|
196
|
-
.toLowerCase()
|
|
197
|
-
)
|
|
198
|
-
return text.slice(0, text.length / 2);
|
|
199
|
-
return text;
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
export const stripEmojis = (text: string) => {
|
|
203
|
-
return text.replaceAll(/[^\p{L}\p{N}\p{P}\p{Z}^$\n]/gu, '').trim();
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
export const stripMarkdown = (text: string) => {
|
|
207
|
-
// Remove code blocks
|
|
208
|
-
text = text.replaceAll(/```*?```/g, '');
|
|
209
|
-
text = text.replaceAll(/```[\s\S]*?```/g, '');
|
|
210
|
-
// Remove inline code
|
|
211
|
-
text = text.replaceAll(/`[^`]*`/g, '');
|
|
212
|
-
// Remove images
|
|
213
|
-
text = text.replaceAll(/!\[[^\]]*\]\([^)]*\)/g, '');
|
|
214
|
-
// Remove links but keep the text
|
|
215
|
-
text = text.replaceAll(/\[([^\]]*)\]\([^)]*\)/g, '$1');
|
|
216
|
-
// Remove blockquotes but keep the text
|
|
217
|
-
text = text.replaceAll(/^> /gm, '');
|
|
218
|
-
// Remove headings but keep the text
|
|
219
|
-
text = text.replaceAll(/^#+ /gm, '');
|
|
220
|
-
// Remove bold and italic symbols and keep the text
|
|
221
|
-
text = text.replaceAll(/[*_]/g, '');
|
|
222
|
-
// Remove horizontal rules
|
|
223
|
-
text = text.replaceAll(/---/g, '');
|
|
224
|
-
// Remove strikethrough and keep the text
|
|
225
|
-
text = text.replaceAll(/~~/g, '');
|
|
226
|
-
// Remove lists
|
|
227
|
-
text = text.replaceAll(/^\s*[-*+] /gm, '');
|
|
228
|
-
text = text.replaceAll(/^\s*\d+\.\s+/gm, '');
|
|
229
|
-
// Remove tables
|
|
230
|
-
text = text.replaceAll(/^\|.*\|$/gm, '');
|
|
231
|
-
// Remove MathJax
|
|
232
|
-
text = text.replaceAll(/\$\$[\s\S]*?\$\$/g, '');
|
|
233
|
-
text = text.replaceAll(/\$[\s\S]*?\$/g, '');
|
|
234
|
-
text = text.replaceAll(/\\\([\s\S]*?\\\)/g, '');
|
|
235
|
-
text = text.replaceAll(/\\\[[\s\S]*?\\\]/g, '');
|
|
236
|
-
// Remove extra spaces and newlines
|
|
237
|
-
text = text.replaceAll(/\s+/g, ' ').trim();
|
|
238
|
-
return text;
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
export const OFFICE_NATIVE_EXTENSIONS = officeNativeExtensions;
|
|
242
|
-
|
|
243
|
-
export const isOfficeNativeFilename = (filename: string): boolean => {
|
|
244
|
-
const ext = `.${filename.split('.').pop()?.toLowerCase() || ''}`;
|
|
245
|
-
return (officeNativeExtensions as readonly string[]).includes(ext);
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
export const isLocalTextFilename = (filename: string): boolean => {
|
|
249
|
-
const ext = `.${filename.split('.').pop()?.toLowerCase() || ''}`;
|
|
250
|
-
return (localTextExtensions as readonly string[]).includes(ext);
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
export type ParsedDocumentAttachment = {
|
|
254
|
-
filename: string;
|
|
255
|
-
type: string;
|
|
256
|
-
content: string;
|
|
257
|
-
url: string;
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
const DOCUMENT_ATTACHMENT_REGEX =
|
|
261
|
-
/<document_attachment filename="([^"]+)" type="([^"]+)">([\s\S]*?)<\/document_attachment>/g;
|
|
262
|
-
|
|
263
|
-
const ATTACHMENT_LINK_AFTER_REGEX =
|
|
264
|
-
/<attachment_link>\s*([\s\S]*?)\s*<\/attachment_link>/;
|
|
265
|
-
|
|
266
|
-
export const parseDocumentAttachmentsFromMessage = (
|
|
267
|
-
text: string
|
|
268
|
-
): ParsedDocumentAttachment[] => {
|
|
269
|
-
if (!text) return [];
|
|
270
|
-
|
|
271
|
-
const attachments: ParsedDocumentAttachment[] = [];
|
|
272
|
-
const regex = new RegExp(DOCUMENT_ATTACHMENT_REGEX.source, 'g');
|
|
273
|
-
let match;
|
|
274
|
-
|
|
275
|
-
while ((match = regex.exec(text)) !== null) {
|
|
276
|
-
const [, filename, type, content] = match;
|
|
277
|
-
const afterTag = text.slice(match.index + match[0].length);
|
|
278
|
-
const linkMatch = afterTag.match(ATTACHMENT_LINK_AFTER_REGEX);
|
|
279
|
-
const rawUrl = linkMatch?.[1]?.trim() || '';
|
|
280
|
-
const url = /^https?:\/\//.test(rawUrl) ? rawUrl : '';
|
|
281
|
-
|
|
282
|
-
attachments.push({
|
|
283
|
-
filename,
|
|
284
|
-
type,
|
|
285
|
-
content: content.trim(),
|
|
286
|
-
url,
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
return attachments;
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
export const extractAttachmentLinks = (content: string): string[] => {
|
|
294
|
-
return parseDocumentAttachmentsFromMessage(content).map(
|
|
295
|
-
attachment => attachment.url
|
|
296
|
-
);
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
export const extractAttachmentLink = (content: string): string | null => {
|
|
300
|
-
const match = content?.match(
|
|
301
|
-
/<attachment_link>\s*([\s\S]*?)\s*<\/attachment_link>/
|
|
302
|
-
);
|
|
303
|
-
const rawUrl = match?.[1]?.trim() || '';
|
|
304
|
-
return /^https?:\/\//.test(rawUrl) ? rawUrl : null;
|
|
305
|
-
};
|
|
306
|
-
|
|
307
|
-
export const stripDocumentAttachmentTags = (text: string): string => {
|
|
308
|
-
const documentAttachmentTagRegex = /<document_attachment filename="([^"]+)" type="([^"]+)">([\s\S]*?)<\/document_attachment>/g;
|
|
309
|
-
return text
|
|
310
|
-
.replace(documentAttachmentTagRegex, '$3')
|
|
311
|
-
.replace(/<attachment_source>\s*[\s\S]*?\s*<\/attachment_source>/g, '')
|
|
312
|
-
.replace(/<attachment_link>\s*[\s\S]*?\s*<\/attachment_link>/g, '');
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
export const getDocumentAttachmentAssetUrl = (attachment: {
|
|
316
|
-
content?: string | null;
|
|
317
|
-
url?: string | null;
|
|
318
|
-
}): string =>
|
|
319
|
-
attachment.url?.trim() ||
|
|
320
|
-
extractAttachmentLink(attachment.content || '') ||
|
|
321
|
-
'';
|
|
322
|
-
|
|
323
|
-
export const isAssetOnlyDocumentAttachment = (attachment: {
|
|
324
|
-
title?: string;
|
|
325
|
-
name?: string;
|
|
326
|
-
content?: string | null;
|
|
327
|
-
url?: string | null;
|
|
328
|
-
}): boolean => {
|
|
329
|
-
const filename = attachment.title || attachment.name || '';
|
|
330
|
-
const assetUrl = getDocumentAttachmentAssetUrl(attachment);
|
|
331
|
-
|
|
332
|
-
if (!assetUrl) return false;
|
|
333
|
-
|
|
334
|
-
if (isOfficeNativeFilename(filename)) {
|
|
335
|
-
return true;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
const strippedContent = attachment.content
|
|
339
|
-
? stripDocumentAttachmentTags(attachment.content).trim()
|
|
340
|
-
: '';
|
|
341
|
-
|
|
342
|
-
return !strippedContent;
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
export const stripOutputTags = (text: string): string => {
|
|
346
|
-
const outputTagRegex = /<output.*?<\/output>/gs;
|
|
347
|
-
|
|
348
|
-
if (!outputTagRegex.test(text)) {
|
|
349
|
-
return text;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
const strippedText = text.replace(outputTagRegex, '');
|
|
353
|
-
|
|
354
|
-
// Recursively strip nested output tags
|
|
355
|
-
return stripOutputTags(strippedText);
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
export const stripReasoningTags = (text: string) => {
|
|
359
|
-
const reasoningTagRegex = /<think.*?<\/think>/gs;
|
|
360
|
-
|
|
361
|
-
if (!reasoningTagRegex.test(text)) {
|
|
362
|
-
return text;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
const strippedText = text.replace(reasoningTagRegex, '');
|
|
366
|
-
|
|
367
|
-
// Recursively strip nested reasoning tags
|
|
368
|
-
return strippedText;
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Strip HTML tags / decode entities without executing scripts or event handlers.
|
|
373
|
-
* Uses an inert DOMParser document (no resource loads / onerror), unlike live innerHTML.
|
|
374
|
-
*/
|
|
375
|
-
export const stripHTML = (text: string) => {
|
|
376
|
-
if (typeof DOMParser !== 'undefined') {
|
|
377
|
-
try {
|
|
378
|
-
return (
|
|
379
|
-
new DOMParser().parseFromString(text, 'text/html').body.textContent ||
|
|
380
|
-
''
|
|
381
|
-
);
|
|
382
|
-
} catch {
|
|
383
|
-
// fall through
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
// Non-DOM / parse failure: strip tags only (does not decode entities)
|
|
387
|
-
return text.replace(/<[^>]*>/g, '');
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
/** Ensures all <a> tags in HTML open in a new tab (target="_blank" rel="noopener noreferrer"). */
|
|
391
|
-
export const withLinksOpenInNewTab = (html: string): string =>
|
|
392
|
-
html.replace(/<a\s+/gi, '<a target="_blank" rel="noopener noreferrer" ');
|
|
393
|
-
|
|
394
|
-
export const escapeHTML = (text: string) => {
|
|
395
|
-
const el = document.createElement('textarea');
|
|
396
|
-
el.textContent = text;
|
|
397
|
-
return el.innerHTML;
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
export const getFieldFromCustomData = (
|
|
401
|
-
fieldName: string,
|
|
402
|
-
data: string | undefined
|
|
403
|
-
) => {
|
|
404
|
-
try {
|
|
405
|
-
if (data) {
|
|
406
|
-
const jsonData = JSON.parse(data);
|
|
407
|
-
return jsonData[fieldName];
|
|
408
|
-
}
|
|
409
|
-
return '';
|
|
410
|
-
} catch (error) {
|
|
411
|
-
return '';
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
const MAX_MSG_CHARS = 4000;
|
|
416
|
-
|
|
417
|
-
const MAX_MSG_WORDS = 300;
|
|
418
|
-
|
|
419
|
-
export const truncateMessage = (message: string) => {
|
|
420
|
-
|
|
421
|
-
let truncatedMessage = message;
|
|
422
|
-
|
|
423
|
-
if (message.length > MAX_MSG_CHARS) {
|
|
424
|
-
truncatedMessage = `${message.slice(0, MAX_MSG_CHARS)}\n<br />...`;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
if (truncatedMessage.split(' ').length > MAX_MSG_WORDS) {
|
|
428
|
-
truncatedMessage = truncatedMessage
|
|
429
|
-
.split(' ')
|
|
430
|
-
.slice(0, MAX_MSG_WORDS)
|
|
431
|
-
.join(' ')
|
|
432
|
-
.concat('\n<br/>...');
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
return truncatedMessage;
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
export const stripObjNulls = (obj: { [key: string]: any }) => {
|
|
439
|
-
const newObj = { ...obj };
|
|
440
|
-
Object.keys(newObj).forEach(key => {
|
|
441
|
-
if (newObj[key] === null) {
|
|
442
|
-
delete newObj[key];
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
return newObj;
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Find difference between two objects
|
|
450
|
-
* @param {object} origObj - Source object to compare newObj against
|
|
451
|
-
* @param {object} newObj - New object with potential changes
|
|
452
|
-
* @return {object} differences
|
|
453
|
-
*/
|
|
454
|
-
export const difference = (
|
|
455
|
-
origObj: { [key: string]: any },
|
|
456
|
-
newObj: { [key: string]: any }
|
|
457
|
-
): { [key: string]: any } =>
|
|
458
|
-
Object.keys(newObj).reduce((diffs, key) => {
|
|
459
|
-
let diff: { [key: string]: any } = { ...diffs };
|
|
460
|
-
|
|
461
|
-
if (origObj[key] !== newObj[key]) {
|
|
462
|
-
diff[key] = newObj[key];
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
return diff;
|
|
466
|
-
}, {});
|
|
467
|
-
|
|
468
|
-
export function cleanUrl(href: string) {
|
|
469
|
-
try {
|
|
470
|
-
href = encodeURI(href).replace(/%25/g, '%');
|
|
471
|
-
} catch (e) {
|
|
472
|
-
return null;
|
|
473
|
-
}
|
|
474
|
-
return href;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
export const mathJaxConfig = {
|
|
478
|
-
startup: {
|
|
479
|
-
elements: ['.memori-chat--bubble-content'],
|
|
480
|
-
},
|
|
481
|
-
options: {
|
|
482
|
-
processHtmlClass: 'memori-chat--bubble-content',
|
|
483
|
-
},
|
|
484
|
-
tex: {
|
|
485
|
-
inlineMath: [
|
|
486
|
-
['$', '$'],
|
|
487
|
-
['\\$', '\\$'],
|
|
488
|
-
],
|
|
489
|
-
displayMath: [['$$', '$$']],
|
|
490
|
-
processEscapes: true,
|
|
491
|
-
},
|
|
492
|
-
asciimath: {
|
|
493
|
-
fixphi: true,
|
|
494
|
-
displaystyle: true,
|
|
495
|
-
decimalsign: '.',
|
|
496
|
-
},
|
|
497
|
-
skipStartupTypeset: true,
|
|
498
|
-
chtml: {
|
|
499
|
-
displayAlign: 'left',
|
|
500
|
-
},
|
|
501
|
-
svg: {
|
|
502
|
-
fontCache: 'global',
|
|
503
|
-
},
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
export const installMathJaxScript = () => {
|
|
507
|
-
const script = document.createElement('script');
|
|
508
|
-
script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
|
|
509
|
-
script.async = true;
|
|
510
|
-
script.id = 'mathjax-script';
|
|
511
|
-
document.head.appendChild(script);
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
export const installMathJax = () => {
|
|
515
|
-
// @ts-ignore
|
|
516
|
-
window.MathJax = mathJaxConfig;
|
|
517
|
-
|
|
518
|
-
installMathJaxScript();
|
|
519
|
-
};
|
|
520
|
-
/**
|
|
521
|
-
* Corrects materials by setting some specific properties.
|
|
522
|
-
* This is often necessary when working with imported 3D models.
|
|
523
|
-
*
|
|
524
|
-
* @param materials - An object containing materials to be corrected.
|
|
525
|
-
*/
|
|
526
|
-
export function correctMaterials(materials: { [key: string]: Material }) {
|
|
527
|
-
Object.values(materials).forEach(material => {
|
|
528
|
-
if (material instanceof MeshStandardMaterial) {
|
|
529
|
-
// Improve the material's appearance
|
|
530
|
-
material.roughness = 0.8;
|
|
531
|
-
material.metalness = 0.1;
|
|
532
|
-
|
|
533
|
-
// Enable shadow casting and receiving
|
|
534
|
-
material.shadowSide = 2; // FrontSide and BackSide
|
|
535
|
-
|
|
536
|
-
// Improve texture rendering if the material uses textures
|
|
537
|
-
if (material.map) {
|
|
538
|
-
material.map.anisotropy = 16;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* Type guard to check if an object is a SkinnedMesh.
|
|
546
|
-
* This is useful when working with 3D models that may contain different types of meshes.
|
|
547
|
-
*
|
|
548
|
-
* @param object - The object to check.
|
|
549
|
-
* @returns True if the object is a SkinnedMesh, false otherwise.
|
|
550
|
-
*/
|
|
551
|
-
export function isSkinnedMesh(object: any): object is SkinnedMesh {
|
|
552
|
-
return object.isSkinnedMesh === true;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* Disposes of a Three.js object and its children recursively.
|
|
557
|
-
* This is important for memory management, especially when removing objects from the scene.
|
|
558
|
-
*
|
|
559
|
-
* @param object - The Three.js object to dispose.
|
|
560
|
-
*/
|
|
561
|
-
export function disposeObject(object: any) {
|
|
562
|
-
if ('geometry' in object && object.geometry instanceof THREE.BufferGeometry) {
|
|
563
|
-
object.geometry.dispose();
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
if ('material' in object) {
|
|
567
|
-
if (Array.isArray(object.material)) {
|
|
568
|
-
if (Array.isArray(object.material)) {
|
|
569
|
-
object.material.forEach((material: any) => {
|
|
570
|
-
if (material instanceof THREE.Material) {
|
|
571
|
-
material.dispose();
|
|
572
|
-
}
|
|
573
|
-
});
|
|
574
|
-
} else if (object && object.material instanceof THREE.Material) {
|
|
575
|
-
object.material.dispose();
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
if (object.children) {
|
|
581
|
-
object.children.forEach(disposeObject);
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
export const safeParseJSON = (jsonString: string, fallbackString = false) => {
|
|
586
|
-
try {
|
|
587
|
-
return JSON.parse(jsonString);
|
|
588
|
-
} catch (error) {
|
|
589
|
-
return fallbackString ? jsonString : null;
|
|
590
|
-
}
|
|
591
|
-
};
|
package/src/helpers/venue.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export const EARTH_RADIUS_AT_45_DEGRESS = (6357.0 + 6378.0) / 2.0;
|
|
2
|
-
export const DEGREES_TO_RADIANS = Math.PI / 180;
|
|
3
|
-
|
|
4
|
-
export const getUncertaintyByViewport = (
|
|
5
|
-
bouningBox:
|
|
6
|
-
| [number, number, number, number]
|
|
7
|
-
| [string, string, string, string]
|
|
8
|
-
) => {
|
|
9
|
-
// https://nominatim.org/release-docs/develop/api/Output/#boundingbox
|
|
10
|
-
const [minLat, maxLat, minLng, maxLng] =
|
|
11
|
-
typeof bouningBox[0] === 'string'
|
|
12
|
-
? (bouningBox as string[]).map(parseFloat)
|
|
13
|
-
: (bouningBox as number[]);
|
|
14
|
-
|
|
15
|
-
// Convert latitude and longitude to radians
|
|
16
|
-
const phi1 = minLat * DEGREES_TO_RADIANS;
|
|
17
|
-
const lambda1 = minLng * DEGREES_TO_RADIANS;
|
|
18
|
-
|
|
19
|
-
const phi2 = maxLat * DEGREES_TO_RADIANS;
|
|
20
|
-
const lambda2 = maxLng * DEGREES_TO_RADIANS;
|
|
21
|
-
|
|
22
|
-
// Compute distance using the haversine formula
|
|
23
|
-
// https://en.wikipedia.org/wiki/Haversine_formula
|
|
24
|
-
const angle =
|
|
25
|
-
2.0 *
|
|
26
|
-
Math.asin(
|
|
27
|
-
Math.sqrt(
|
|
28
|
-
Math.sin((phi2 - phi1) / 2.0) * Math.sin((phi2 - phi1) / 2.0) +
|
|
29
|
-
Math.cos(phi1) *
|
|
30
|
-
Math.cos(phi2) *
|
|
31
|
-
Math.sin((lambda2 - lambda1) / 2.0) *
|
|
32
|
-
Math.sin((lambda2 - lambda1) / 2.0)
|
|
33
|
-
)
|
|
34
|
-
);
|
|
35
|
-
return EARTH_RADIUS_AT_45_DEGRESS * angle;
|
|
36
|
-
};
|
package/src/i18n.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { createInstance } from 'i18next';
|
|
2
|
-
import it from './locales/it.json';
|
|
3
|
-
import en from './locales/en.json';
|
|
4
|
-
import fr from './locales/fr.json';
|
|
5
|
-
import de from './locales/de.json';
|
|
6
|
-
import es from './locales/es.json';
|
|
7
|
-
|
|
8
|
-
const resources = {
|
|
9
|
-
en: {
|
|
10
|
-
translation: en,
|
|
11
|
-
},
|
|
12
|
-
it: {
|
|
13
|
-
translation: it,
|
|
14
|
-
},
|
|
15
|
-
es: {
|
|
16
|
-
translation: es,
|
|
17
|
-
},
|
|
18
|
-
fr: {
|
|
19
|
-
translation: fr,
|
|
20
|
-
},
|
|
21
|
-
de: {
|
|
22
|
-
translation: de,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const i18n = createInstance({
|
|
27
|
-
resources,
|
|
28
|
-
lng: 'en',
|
|
29
|
-
fallbackLng: 'it',
|
|
30
|
-
supportedLngs: ['en', 'it', 'fr', 'es', 'de'],
|
|
31
|
-
nonExplicitSupportedLngs: true,
|
|
32
|
-
interpolation: {
|
|
33
|
-
escapeValue: false,
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
i18n.init();
|
|
38
|
-
|
|
39
|
-
export default i18n;
|