@memori.ai/memori-react 9.0.0-rc.4 → 9.0.0-rc.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.
Files changed (141) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +121 -95
  3. package/dist/components/AudioWave/AudioWave.css +26 -0
  4. package/dist/components/AudioWave/AudioWave.d.ts +6 -0
  5. package/dist/components/AudioWave/AudioWave.js +58 -0
  6. package/dist/components/AudioWave/AudioWave.js.map +1 -0
  7. package/dist/components/Chat/Chat.d.ts +4 -2
  8. package/dist/components/Chat/Chat.js +2 -2
  9. package/dist/components/Chat/Chat.js.map +1 -1
  10. package/dist/components/ChatBubble/ChatBubble.css +33 -6
  11. package/dist/components/ChatBubble/ChatBubble.js +6 -9
  12. package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
  13. package/dist/components/ChatInputs/ChatInputs.css +10 -11
  14. package/dist/components/ChatInputs/ChatInputs.d.ts +4 -2
  15. package/dist/components/ChatInputs/ChatInputs.js +84 -32
  16. package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
  17. package/dist/components/CompletionProviderStatus/CompletionProviderStatus.css +23 -23
  18. package/dist/components/Header/Header.js +29 -16
  19. package/dist/components/Header/Header.js.map +1 -1
  20. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js +3 -1
  21. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js.map +1 -1
  22. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js +4 -2
  23. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js.map +1 -1
  24. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +31 -11
  25. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +3 -1
  26. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
  27. package/dist/components/MemoriArtifactSystem/useArtifactDrawerMenuContainer.d.ts +4 -0
  28. package/dist/components/MemoriArtifactSystem/useArtifactDrawerMenuContainer.js +13 -0
  29. package/dist/components/MemoriArtifactSystem/useArtifactDrawerMenuContainer.js.map +1 -0
  30. package/dist/components/MemoriWidget/MemoriWidget.d.ts +3 -1
  31. package/dist/components/MemoriWidget/MemoriWidget.js +108 -62
  32. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  33. package/dist/components/MicrophoneButton/MicrophoneButton.css +1 -1
  34. package/dist/components/MicrophoneButton/MicrophoneButton.d.ts +1 -1
  35. package/dist/components/MicrophoneButton/MicrophoneButton.js +12 -42
  36. package/dist/components/MicrophoneButton/MicrophoneButton.js.map +1 -1
  37. package/dist/components/MobileSessionPanel/MobileSessionPanel.css +24 -1
  38. package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +2 -0
  39. package/dist/components/MobileSessionPanel/MobileSessionPanel.js +10 -4
  40. package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -1
  41. package/dist/components/StartPanel/StartPanel.css +4 -4
  42. package/dist/components/StartPanel/StartPanel.js +1 -1
  43. package/dist/components/StartPanel/StartPanel.js.map +1 -1
  44. package/dist/components/layouts/Chat.js +1 -1
  45. package/dist/components/layouts/Chat.js.map +1 -1
  46. package/dist/components/layouts/HiddenChat.js +7 -11
  47. package/dist/components/layouts/HiddenChat.js.map +1 -1
  48. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +120 -6
  49. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
  50. package/dist/components/layouts/WebsiteAssistant/website-assistant.css +9 -6
  51. package/dist/components/layouts/flows/FlowWidget.d.ts +52 -0
  52. package/dist/components/layouts/flows/FlowWidget.js +92 -0
  53. package/dist/components/layouts/flows/FlowWidget.js.map +1 -0
  54. package/dist/components/layouts/fullpage.css +2 -2
  55. package/dist/helpers/autoStart.d.ts +1 -0
  56. package/dist/helpers/autoStart.js +7 -0
  57. package/dist/helpers/autoStart.js.map +1 -0
  58. package/dist/helpers/stt/useSTT.d.ts +2 -1
  59. package/dist/helpers/stt/useSTT.js +12 -3
  60. package/dist/helpers/stt/useSTT.js.map +1 -1
  61. package/dist/index.d.ts +1 -0
  62. package/dist/index.js +5 -4
  63. package/dist/index.js.map +1 -1
  64. package/dist/locales/de.json +5 -0
  65. package/dist/locales/en.json +5 -0
  66. package/dist/locales/es.json +5 -0
  67. package/dist/locales/fr.json +5 -0
  68. package/dist/locales/it.json +5 -0
  69. package/dist/styles.css +1 -1
  70. package/dist/version.d.ts +1 -1
  71. package/dist/version.js +1 -1
  72. package/esm/components/AudioWave/AudioWave.css +26 -0
  73. package/esm/components/AudioWave/AudioWave.d.ts +6 -0
  74. package/esm/components/AudioWave/AudioWave.js +56 -0
  75. package/esm/components/AudioWave/AudioWave.js.map +1 -0
  76. package/esm/components/Chat/Chat.d.ts +4 -2
  77. package/esm/components/Chat/Chat.js +2 -2
  78. package/esm/components/Chat/Chat.js.map +1 -1
  79. package/esm/components/ChatBubble/ChatBubble.css +33 -6
  80. package/esm/components/ChatBubble/ChatBubble.js +6 -9
  81. package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
  82. package/esm/components/ChatInputs/ChatInputs.css +10 -11
  83. package/esm/components/ChatInputs/ChatInputs.d.ts +4 -2
  84. package/esm/components/ChatInputs/ChatInputs.js +86 -34
  85. package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
  86. package/esm/components/CompletionProviderStatus/CompletionProviderStatus.css +23 -23
  87. package/esm/components/Header/Header.js +29 -16
  88. package/esm/components/Header/Header.js.map +1 -1
  89. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js +3 -1
  90. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js.map +1 -1
  91. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js +4 -2
  92. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js.map +1 -1
  93. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +31 -11
  94. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +3 -1
  95. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
  96. package/esm/components/MemoriArtifactSystem/useArtifactDrawerMenuContainer.d.ts +4 -0
  97. package/esm/components/MemoriArtifactSystem/useArtifactDrawerMenuContainer.js +10 -0
  98. package/esm/components/MemoriArtifactSystem/useArtifactDrawerMenuContainer.js.map +1 -0
  99. package/esm/components/MemoriWidget/MemoriWidget.d.ts +3 -1
  100. package/esm/components/MemoriWidget/MemoriWidget.js +108 -62
  101. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  102. package/esm/components/MicrophoneButton/MicrophoneButton.css +1 -1
  103. package/esm/components/MicrophoneButton/MicrophoneButton.d.ts +1 -1
  104. package/esm/components/MicrophoneButton/MicrophoneButton.js +13 -43
  105. package/esm/components/MicrophoneButton/MicrophoneButton.js.map +1 -1
  106. package/esm/components/MobileSessionPanel/MobileSessionPanel.css +24 -1
  107. package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +2 -0
  108. package/esm/components/MobileSessionPanel/MobileSessionPanel.js +10 -4
  109. package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -1
  110. package/esm/components/StartPanel/StartPanel.css +4 -4
  111. package/esm/components/StartPanel/StartPanel.js +1 -1
  112. package/esm/components/StartPanel/StartPanel.js.map +1 -1
  113. package/esm/components/layouts/Chat.js +1 -1
  114. package/esm/components/layouts/Chat.js.map +1 -1
  115. package/esm/components/layouts/HiddenChat.js +7 -11
  116. package/esm/components/layouts/HiddenChat.js.map +1 -1
  117. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +122 -8
  118. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
  119. package/esm/components/layouts/WebsiteAssistant/website-assistant.css +9 -6
  120. package/esm/components/layouts/flows/FlowWidget.d.ts +52 -0
  121. package/esm/components/layouts/flows/FlowWidget.js +86 -0
  122. package/esm/components/layouts/flows/FlowWidget.js.map +1 -0
  123. package/esm/components/layouts/fullpage.css +2 -2
  124. package/esm/helpers/autoStart.d.ts +1 -0
  125. package/esm/helpers/autoStart.js +4 -0
  126. package/esm/helpers/autoStart.js.map +1 -0
  127. package/esm/helpers/stt/useSTT.d.ts +2 -1
  128. package/esm/helpers/stt/useSTT.js +12 -3
  129. package/esm/helpers/stt/useSTT.js.map +1 -1
  130. package/esm/index.d.ts +1 -0
  131. package/esm/index.js +5 -4
  132. package/esm/index.js.map +1 -1
  133. package/esm/locales/de.json +5 -0
  134. package/esm/locales/en.json +5 -0
  135. package/esm/locales/es.json +5 -0
  136. package/esm/locales/fr.json +5 -0
  137. package/esm/locales/it.json +5 -0
  138. package/esm/styles.css +1 -1
  139. package/esm/version.d.ts +1 -1
  140. package/esm/version.js +1 -1
  141. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [9.0.0-rc.5](https://github.com/memori-ai/memori-react/compare/v9.0.0-rc.4...v9.0.0-rc.5) (2026-10-01)
4
+
5
+
6
+ ### Features
7
+
8
+ * **artifact:** add useArtifactDrawerMenuContainer hook and integrate with artifact dropdown menu ([5128c77](https://github.com/memori-ai/memori-react/commit/5128c77ea149d07fa22a47afa1cbe7cdf9aac99b))
9
+ * **AudioWave:** add AudioWave component for visualizing microphone input ([4bae8f5](https://github.com/memori-ai/memori-react/commit/4bae8f54fa175a41c2241fb1b54349b973502f79))
10
+ * **ChatInputs:** implement click-to-record functionality and update microphone button behavior ([b23b0d3](https://github.com/memori-ai/memori-react/commit/b23b0d325b1ff99641fd4782311215b6eb08eaa3))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **nats:** avoid re-applying stale dialog state on tab resume ([44cfcc8](https://github.com/memori-ai/memori-react/commit/44cfcc890451f64cc599dbbfd50cd30b9d25a390))
16
+
17
+
18
+ ### Changes
19
+
20
+ * enhance auto-start logic and update props for login handling ([c2cebd9](https://github.com/memori-ai/memori-react/commit/c2cebd9313d95172264313a3d9d6829a75211393))
21
+ * restore wave animation for typing ([fc16b93](https://github.com/memori-ai/memori-react/commit/fc16b93f5ee563b6abc654073174c0eb088556f0))
22
+ * update props handling in Memori and ChatBubble components ([cc14f8b](https://github.com/memori-ai/memori-react/commit/cc14f8bc8ddf0e3ce55a7f6243c17905096c5d2a))
23
+
24
+
25
+ ### Maintenance
26
+
27
+ * remove bun.lock file and update dompurify version in package.json ([4c56dab](https://github.com/memori-ai/memori-react/commit/4c56dab46c1d6355e52b3f2d6184a0f9eb7ee735))
28
+
3
29
  ## [9.0.0-rc.4](https://github.com/memori-ai/memori-react/compare/v9.0.0-rc.3...v9.0.0-rc.4) (2026-09-28)
4
30
 
5
31
 
package/README.md CHANGED
@@ -99,60 +99,60 @@ const App = () => (
99
99
 
100
100
  ### Props
101
101
 
102
- | Prop | Required | Type | Default | Description |
103
- | -------------------------- | -------------- | ------------------------------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
104
- | `memoriName` | \* (see below) | `string` | | Name of the Memori |
105
- | `ownerUserName` | \* (see below) | `string` | | Username of the Memori owner |
106
- | `memoriID` | \* (see below) | `string` | | ID of the Memori (agent) |
107
- | `ownerUserID` | \* (see below) | `string` | | ID of the Memori owner |
108
- | `tenantID` | ✔️ | `string` | | Tenant ID, example: "aisuru.com" or "app.memorytwin.com" |
109
- | `sessionID` | | `string` | | Initial Session ID, UUID which refers to the session to the Memori and identifies a conversation and its permissions (giver, receiver, anonymous). A session would be started autonomously with the params set, but if you have an existing and valid sessionID you can pass it as already opened one. Use this at your risk, as session recovery might break or start session as anon user. In most cases, you shoudn't use this prop. |
110
- | `authToken` | | `string` | | Authentication token from user login, needed for giver sessions to upload assets |
111
- | `integrationID` | | `string` | | Integration ID, UUID which refers to the public page layout |
112
- | `integration` | | `Integration` | | Integration object, see [Integration config](#integration-config) |
113
- | `secretToken` | | `string` | | Secret token, the password of a private or secret Memori |
114
- | `height` | | `string \| number` | "100%" | Height of the Memori. Pass `"100vh"` for a full-page fallback when the host has no definite height. |
115
- | `layout` | | `string` | | Layout of the Memori: `"FULLPAGE"` (default, alias `"DEFAULT"`), `"CHAT"`, `"WEBSITE_ASSISTANT"`, `"TOTEM"`, `"HIDDEN_CHAT"`, or `"ZOOMED_FULL_BODY"`. See [Layouts](#layouts). |
116
- | `customLayout` | | `React.FC<LayoutProps>` | | Custom layout component, see [Custom layout](#custom-layout) |
117
- | `avatar3dHidden` | | `boolean` | `true` for `WEBSITE_ASSISTANT` | Hide the 3D avatar. Defaults to `true` for the `WEBSITE_ASSISTANT` layout (expanded panel); set to `false` to show it there. |
118
- | `showShare` | | `bool` | `true` | Show the share button |
119
- | `showCopyButton` | | `bool` | `true` | Show the copy button on messages |
120
- | `showTranslationOriginal` | | `bool` | `false` | Show button to see original text when translated |
121
- | `showSettings` | | `bool` | `true` | Show the settings panel button |
122
- | `showChatHistory` | | `bool` | `true` | Show the chat history drawer button (past sessions), see [Chat history](#chat-history). Can also be set via integration config. |
123
- | `showTypingText` | | `bool` | `false` | Show default sentences while loading text (see: Typing stories) |
124
- | `showLogin` | | `bool` | `true` | Show the login button |
125
- | `showClear` | | `bool` | `false` | Show clear chat history button |
126
- | `showOnlyLastMessages` | | `bool` | `true` or `false` \* | Show only last 2 messages. (\*) Defaults to `true` for `TOTEM` and `WEBSITE_ASSISTANT` layouts, `false` otherwise |
127
- | `showInputs` | | `bool` | `true` | Show the chat inputs (textarea, send and microphone buttons). Set to `false` for read-only / scripted conversations driven by `typeMessage`. |
128
- | `showDates` | | `bool` | `false` | Show the timestamp on the Agent's messages |
129
- | `showContextPerLine` | | `bool` | `false` | Show the context variables active for each message |
130
- | `showMessageConsumption` | | `bool` | `false` | Show the AI consumption (LLM usage) per message. Can also be set via integration config. |
131
- | `showUpload` | | `bool` | `true` | Show the upload button within the chat |
132
- | `showReasoning` | | `bool` | `false` | Show reasoning output |
133
- | `maxTotalMessagePayload` | | `number` | 300000 | Max **per-document** content length (character count). Kept for backward compatibility: it no longer applies to the sum of all attached documents. |
134
- | `maxTextareaCharacters` | | `number` | | Max characters allowed in the chat textarea. When set, shows a counter (e.g. "0 / 500") above the textarea, enforces the limit, and disables paste-as-attachment by default. |
135
- | `baseURL` | | `string` | | Base URL of the Memori, example: "https://aisuru.com" |
136
- | `apiURL` | | `string` | "https://backend.memori.ai" | URL of the Memori Backend API |
137
- | `engineURL` | | `string` | "https://engine.memori.ai" | URL of the Memori Engine API |
138
- | `tag` | | `string` | | Tag of the person opening the session to the Memori, could be the giver or a receiver |
139
- | `pin` | | `string` | | PIN of the person opening the session to the Memori, could be the giver or a receiver |
140
- | `context` | | `{ [key: string]: string }` | | Initial context of the conversation, object of context variables, example: `{ SOURCE: 'website' }`. If omitted, `contextVars` from the integration config is used. |
141
- | `initialQuestion` | | `string` | | Initial question to ask to the Memori, starts the conversation as this would be sent to the Memori |
142
- | `additionalInfo` | | `{ [key: string]: string }` | | Additional info sent when opening the session (`additionalInfo` of the Engine `openSession` call). A `loginToken` key here takes precedence over `authToken`. |
143
- | `autoStart` | | `boolean` | `false` \*\* | Automatically start the conversation when the component is mounted. (\*\*) Defaults to `true` for `HIDDEN_CHAT`; always `false` for `WEBSITE_ASSISTANT`. |
144
- | `uiLang` | | `'en' \| 'it' \| 'es' \| 'fr' \| 'de'` | browser language | Language of the UI, es: "en" or "it". Uppercase variants (`'IT'`, `'EN'`, ...) are accepted. Falls back to the browser language, then `"en"`. |
145
- | `multilingual` | | `bool` | `false` | Enable multilingual mode, if enabled the user can switch between spoken languages |
146
- | `spokenLang` | | `string` | | Language of the spoken text, as defaults to user selection. Example: "en" or "it" |
147
- | `enableAudio` | | `boolean` | `true` | Enable audio output. Defaults to true if otherwise indicated by props or integration config. |
148
- | `defaultSpeakerActive` | | `boolean` | `true` | Default value for the speaker activation |
149
- | `useMathFormatting` | | `boolean` | `false` | Apply math formatting to the messages, defaults to false if otherwise indicated by props or integration config. |
150
- | `onStateChange` | | `function` | | Callback function called when the state of the Memori changes, see [Conversation state](#conversation-state) |
151
- | `disableTextEnteredEvents` | | `boolean` | `false` | Disable MemoriTextEntered events listeners for `typeMessage` functions, useful to avoid issues with multiple widgets in page. |
152
- | `customMediaRenderer` | | `(mimeType: string) => JSX.Element \| null` | | Custom media renderer, see [Custom media renderer](#custom-media-renderer) |
153
- | `additionalSettings` | | `JSX.Element` | | Custom JSX or component to render within the settings drawer |
154
- | `userAvatar` | | `string \| JSX.Element` | | Custom URL or React element to use as user avatar |
155
- | `applyVarsToRoot` | | `boolean` | `false` | Also apply the integration CSS variables (brand color, etc.) to `:root`, not only to the widget scopes. Useful when rendering Memori UI elements outside the widget container. |
102
+ | Prop | Required | Type | Default | Description |
103
+ | -------------------------- | -------------- | ------------------------------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
104
+ | `memoriName` | \* (see below) | `string` | | Name of the Memori |
105
+ | `ownerUserName` | \* (see below) | `string` | | Username of the Memori owner |
106
+ | `memoriID` | \* (see below) | `string` | | ID of the Memori (agent) |
107
+ | `ownerUserID` | \* (see below) | `string` | | ID of the Memori owner |
108
+ | `tenantID` | ✔️ | `string` | | Tenant ID, example: "aisuru.com" or "app.memorytwin.com" |
109
+ | `sessionID` | | `string` | | Initial Session ID, UUID which refers to the session to the Memori and identifies a conversation and its permissions (giver, receiver, anonymous). A session would be started autonomously with the params set, but if you have an existing and valid sessionID you can pass it as already opened one. Use this at your risk, as session recovery might break or start session as anon user. In most cases, you shoudn't use this prop. |
110
+ | `authToken` | | `string` | | Authentication token from user login, needed for giver sessions to upload assets |
111
+ | `integrationID` | | `string` | | Integration ID, UUID which refers to the public page layout |
112
+ | `integration` | | `Integration` | | Integration object, see [Integration config](#integration-config) |
113
+ | `secretToken` | | `string` | | Secret token, the password of a private or secret Memori |
114
+ | `height` | | `string \| number` | "100%" | Height of the Memori. Pass `"100vh"` for a full-page fallback when the host has no definite height. |
115
+ | `layout` | | `string` | | Layout of the Memori: `"FULLPAGE"` (default, alias `"DEFAULT"`), `"CHAT"`, `"WEBSITE_ASSISTANT"`, `"TOTEM"`, `"HIDDEN_CHAT"`, or `"ZOOMED_FULL_BODY"`. See [Layouts](#layouts). |
116
+ | `customLayout` | | `React.FC<LayoutProps>` | | Custom layout component, see [Custom layout](#custom-layout) |
117
+ | `show3dAvatar` | | `boolean` | `false` | `WEBSITE_ASSISTANT` only: show the 3D avatar in the expanded panel. `avatar3dHidden` is still accepted but deprecated. |
118
+ | `showShare` | | `bool` | `true` | Show the share button (defaults to `false` in the `WEBSITE_ASSISTANT` layout) |
119
+ | `showCopyButton` | | `bool` | `true` | Show the copy button on messages |
120
+ | `showTranslationOriginal` | | `bool` | `false` | Show button to see original text when translated |
121
+ | `showSettings` | | `bool` | `true` | Show the settings panel button |
122
+ | `showChatHistory` | | `bool` | `true` | Show the chat history drawer button (past sessions), see [Chat history](#chat-history). Can also be set via integration config. |
123
+ | `showTypingText` | | `bool` | `false` | Show default sentences while loading text (see: Typing stories) |
124
+ | `showLogin` | | `bool` | `true` | Show the login button |
125
+ | `showClear` | | `bool` | `false` | Show clear chat history button |
126
+ | `showOnlyLastMessages` | | `bool` | `false` \* | Show only last 2 messages. (\*) Defaults to `true` for `WEBSITE_ASSISTANT` when `show3dAvatar` is `true` |
127
+ | `showInputs` | | `bool` | `true` | Show the chat inputs (textarea, send and microphone buttons). Set to `false` for read-only / scripted conversations driven by `typeMessage`. |
128
+ | `showDates` | | `bool` | `false` | Show the timestamp on the Agent's messages |
129
+ | `showContextPerLine` | | `bool` | `false` | Show the context variables active for each message |
130
+ | `showMessageConsumption` | | `bool` | `false` | Show the AI consumption (LLM usage) per message. Can also be set via integration config. |
131
+ | `showUpload` | | `bool` | `true` | Show the upload button within the chat |
132
+ | `showReasoning` | | `bool` | `false` | Show reasoning output |
133
+ | `maxTotalMessagePayload` | | `number` | 300000 | Max **per-document** content length (character count). Kept for backward compatibility: it no longer applies to the sum of all attached documents. |
134
+ | `maxTextareaCharacters` | | `number` | | Max characters allowed in the chat textarea. When set, shows a counter (e.g. "0 / 500") above the textarea, enforces the limit, and disables paste-as-attachment by default. |
135
+ | `baseURL` | | `string` | | Base URL of the Memori, example: "https://aisuru.com" |
136
+ | `apiURL` | | `string` | "https://backend.memori.ai" | URL of the Memori Backend API |
137
+ | `engineURL` | | `string` | "https://engine.memori.ai" | URL of the Memori Engine API |
138
+ | `tag` | | `string` | | Tag of the person opening the session to the Memori, could be the giver or a receiver |
139
+ | `pin` | | `string` | | PIN of the person opening the session to the Memori, could be the giver or a receiver |
140
+ | `context` | | `{ [key: string]: string }` | | Initial context of the conversation, object of context variables, example: `{ SOURCE: 'website' }`. If omitted, `contextVars` from the integration config is used. |
141
+ | `initialQuestion` | | `string` | | Initial question to ask to the Memori, starts the conversation as this would be sent to the Memori |
142
+ | `additionalInfo` | | `{ [key: string]: string }` | | Additional info sent when opening the session (`additionalInfo` of the Engine `openSession` call). A `loginToken` key here takes precedence over `authToken`. |
143
+ | `autoStart` | | `boolean` | `false` \*\* | Automatically start the conversation when the component is mounted. (\*\*) Defaults to `true` for `HIDDEN_CHAT`; always `false` for `WEBSITE_ASSISTANT`. |
144
+ | `uiLang` | | `'en' \| 'it' \| 'es' \| 'fr' \| 'de'` | browser language | Language of the UI, es: "en" or "it". Uppercase variants (`'IT'`, `'EN'`, ...) are accepted. Falls back to the browser language, then `"en"`. |
145
+ | `multilingual` | | `bool` | `false` | Enable multilingual mode, if enabled the user can switch between spoken languages |
146
+ | `spokenLang` | | `string` | | Language of the spoken text, as defaults to user selection. Example: "en" or "it" |
147
+ | `enableAudio` | | `boolean` | `true` | Enable audio output. Defaults to true if otherwise indicated by props or integration config. |
148
+ | `defaultSpeakerActive` | | `boolean` | `true` | Default value for the speaker activation |
149
+ | `useMathFormatting` | | `boolean` | `false` | Apply math formatting to the messages, defaults to false if otherwise indicated by props or integration config. |
150
+ | `onStateChange` | | `function` | | Callback function called when the state of the Memori changes, see [Conversation state](#conversation-state) |
151
+ | `disableTextEnteredEvents` | | `boolean` | `false` | Disable MemoriTextEntered events listeners for `typeMessage` functions, useful to avoid issues with multiple widgets in page. |
152
+ | `customMediaRenderer` | | `(mimeType: string) => JSX.Element \| null` | | Custom media renderer, see [Custom media renderer](#custom-media-renderer) |
153
+ | `additionalSettings` | | `JSX.Element` | | Custom JSX or component to render within the settings drawer |
154
+ | `userAvatar` | | `string \| JSX.Element` | | Custom URL or React element to use as user avatar |
155
+ | `applyVarsToRoot` | | `boolean` | `false` | Also apply the integration CSS variables (brand color, etc.) to `:root`, not only to the widget scopes. Useful when rendering Memori UI elements outside the widget container. |
156
156
 
157
157
  \*: one of these pairs is required: `memoriName` + `ownerUserName`, `memoriID` + `ownerUserID`
158
158
 
@@ -162,26 +162,26 @@ An **integration** is the configuration of a public page / landing experience cr
162
162
 
163
163
  The integration object has a `customData` string containing JSON. The keys read by the widget are:
164
164
 
165
- | Key | Type | Description |
166
- | ------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
167
- | `layout` | `string \| { name, piiDetection? }` | Layout name, or an object with `name` and a [PII detection](#pii-detection) config |
168
- | `theme` | `'light' \| 'dark'` | Widget theme, see [Dark theme](#dark-theme). Default `light` |
169
- | `lang` | `string` | Default conversation language, used when the `spokenLang` prop is not set |
170
- | `uiLang` | `string` | Fallback conversation language, after `lang` |
171
- | `buttonBgColor` | `string` | Brand primary color, injected as `--memori-primary-color`, see [Styling](#styling) |
172
- | `buttonTextColor` | `string` | Text color on primary backgrounds, injected as `--memori-primary-content` |
173
- | `globalBackground` | `string` | URL of a background image for the chat |
174
- | `blurBackground` | `boolean` | Blur the global background behind the chat. Default `true` |
175
- | `contextVars` | `string` | Initial context variables as `"KEY: value, KEY2: value2"`, used when the `context` prop is not set |
176
- | `initialQuestion` | `string` | Initial question, used when the `initialQuestion` prop is not set |
177
- | `showChatHistory` | `boolean` | Same as the prop |
178
- | `showUpload` | `boolean` | Same as the prop |
179
- | `showReasoning` | `boolean` | Same as the prop |
180
- | `showMessageConsumption` | `boolean` | Same as the prop |
181
- | `avatar_3d_hidden` | `boolean` | Same as the `avatar3dHidden` prop |
182
- | `totemContentMaxWidth` | `number \| string` | `TOTEM` only: max-width of the content axis (avatar + panel + status), px or CSS length |
183
- | `whiteListedDomains` | `string[]` | Regex list of hostnames allowed to render the widget (tenant name and aliases are always allowed). The widget renders nothing elsewhere |
184
- | `ignoreClientAttributes` | `boolean` | When `true`, the `show*`, `multilingual`, `enableAudio`, `defaultSpeakerActive`, `useMathFormatting`, `context`, `initialQuestion` and `tag`/`pin` props are ignored in favour of the integration values |
165
+ | Key | Type | Description |
166
+ | ------------------------ | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
167
+ | `layout` | `string \| { name, piiDetection? }` | Layout name, or an object with `name` and a [PII detection](#pii-detection) config |
168
+ | `theme` | `'light' \| 'dark'` | Widget theme, see [Dark theme](#dark-theme). Default `light` |
169
+ | `lang` | `string` | Default conversation language, used when the `spokenLang` prop is not set |
170
+ | `uiLang` | `string` | Fallback conversation language, after `lang` |
171
+ | `buttonBgColor` | `string` | Brand primary color, injected as `--memori-primary-color`, see [Styling](#styling) |
172
+ | `buttonTextColor` | `string` | Text color on primary backgrounds, injected as `--memori-primary-content` |
173
+ | `globalBackground` | `string` | URL of a background image for the chat |
174
+ | `blurBackground` | `boolean` | Blur the global background behind the chat. Default `true` |
175
+ | `contextVars` | `string` | Initial context variables as `"KEY: value, KEY2: value2"`, used when the `context` prop is not set |
176
+ | `initialQuestion` | `string` | Initial question, used when the `initialQuestion` prop is not set |
177
+ | `showChatHistory` | `boolean` | Same as the prop |
178
+ | `showUpload` | `boolean` | Same as the prop |
179
+ | `showReasoning` | `boolean` | Same as the prop |
180
+ | `showMessageConsumption` | `boolean` | Same as the prop |
181
+ | `avatar_3d_hidden` | `boolean` | Inverse of the `show3dAvatar` prop, used when the prop is not set |
182
+ | `totemContentMaxWidth` | `number \| string` | `TOTEM` only: max-width of the content axis (avatar + panel + status), px or CSS length |
183
+ | `whiteListedDomains` | `string[]` | Regex list of hostnames allowed to render the widget (tenant name and aliases are always allowed). The widget renders nothing elsewhere |
184
+ | `ignoreClientAttributes` | `boolean` | When `true`, the `show*`, `multilingual`, `enableAudio`, `defaultSpeakerActive`, `useMathFormatting`, `context`, `initialQuestion` and `tag`/`pin` props are ignored in favour of the integration values |
185
185
 
186
186
  ```tsx
187
187
  const integration = {
@@ -238,7 +238,7 @@ Chat only, no avatar. Header with chat history, fullscreen, audio, location, sha
238
238
 
239
239
  ### WEBSITE_ASSISTANT
240
240
 
241
- Floating launcher on the host page; the widget opens as a side panel with the start panel and the chat. The 3D avatar is hidden by default (`avatar3dHidden`). `autoStart` is always `false` and `showOnlyLastMessages` defaults to `true`.
241
+ Floating launcher on the host page; the widget opens as a side panel with the start panel and the chat. The 3D avatar is hidden unless `show3dAvatar` is `true`; when it is shown, `showOnlyLastMessages` defaults to `true` to leave room for the avatar. `autoStart` is always `false`.
242
242
 
243
243
  <p>
244
244
  <img alt="Website assistant layout, light theme" src="./docs/website-assistant.png" width="49%" />
@@ -256,7 +256,7 @@ Only the launcher is visible; the chat opens on demand as a compact sidebar. `au
256
256
 
257
257
  ### TOTEM
258
258
 
259
- Kiosk layout: full-body avatar with the start panel / chat card overlaid at the bottom and a vertical control bar. `showOnlyLastMessages` defaults to `true`. Use `totemContentMaxWidth` (integration config) to fit vertical screens.
259
+ Kiosk layout: full-body avatar with the start panel / chat card overlaid at the bottom and a vertical control bar. Use `totemContentMaxWidth` (integration config) to fit vertical screens.
260
260
 
261
261
  <p>
262
262
  <img alt="Totem layout, light theme" src="./docs/totem.png" width="58%" />
@@ -310,7 +310,11 @@ The most commonly used tokens you may override:
310
310
  --memori-main-background: oklch(97.1% 0 0deg);
311
311
  --memori-secondary-background: oklch(100% 0 0deg);
312
312
  --memori-text-color: oklch(20% 0.05 240deg);
313
- --memori-border-color: color-mix(in oklch, oklch(45% 0.05 240deg), transparent 84%);
313
+ --memori-border-color: color-mix(
314
+ in oklch,
315
+ oklch(45% 0.05 240deg),
316
+ transparent 84%
317
+ );
314
318
 
315
319
  /* Typography */
316
320
  --memori-font-family: 'Lexend Deca', sans-serif;
@@ -382,7 +386,8 @@ Available `LayoutProps`:
382
386
  | `loading` | `boolean` | Widget is loading (session opening, memori loading) |
383
387
  | `autoStart` | `boolean` | Resolved `autoStart` value |
384
388
  | `onSidebarToggle` | `(isOpen: boolean) => void` | Callback to notify the widget when a sidebar is opened/closed |
385
- | `avatar3dHidden` | `boolean \| string` | Resolved `avatar3dHidden` value |
389
+ | `show3dAvatar` | `boolean` | Resolved `show3dAvatar` value |
390
+ | `avatar3dHidden` | `boolean \| string` | Deprecated, inverse of `show3dAvatar` |
386
391
  | `totemContentMaxWidth` | `number \| string` | `TOTEM` only: max-width of the content axis (avatar + panel + status), px or CSS length |
387
392
 
388
393
  ```tsx
@@ -510,7 +515,7 @@ When `showChatHistory` is enabled (default), a side drawer lists the user's past
510
515
 
511
516
  When the Agent's answer contains an `<output>` element (code, HTML, markdown, JSON, ...), the widget renders it as an **artifact**: a card in the chat that opens in a dedicated drawer with preview, copy and download actions. On desktop the drawer is a resizable side column next to the chat; on mobile it takes the full width. Multiple versions of the same artifact are tracked together.
512
517
 
513
- <img alt="Artifacts list" src="./docs/artifacts.png" width="400" />
518
+ <!-- <img alt="Artifacts list" src="./docs/artifacts.png" width="400" /> -->
514
519
 
515
520
  Artifacts can also be created from the host page, see [Artifact API](#artifact-api).
516
521
 
@@ -522,11 +527,11 @@ When enabled, the widget checks each message (including attached document text)
522
527
 
523
528
  **Config shape** (inside `integration.customData.layout.piiDetection`):
524
529
 
525
- | Field | Type | Description |
526
- | -------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
527
- | `enabled` | `boolean` | When `true`, PII check runs before sending. |
528
- | `rules` | `array` | List of `{ id, label, pattern, message }`. `pattern` is a regex string; `message` is `{ [lang]: string }` (e.g. `{ it: "...", en: "..." }`). Rules with the same `id` are deduplicated in the error text. |
529
- | `errorMessage` | `object` | Main line shown in the bubble: `{ [lang]: string }`. |
530
+ | Field | Type | Description |
531
+ | -------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
532
+ | `enabled` | `boolean` | When `true`, PII check runs before sending. |
533
+ | `rules` | `array` | List of `{ id, label, pattern, message }`. `pattern` is a regex string; `message` is `{ [lang]: string }` (e.g. `{ it: "...", en: "..." }`). Rules with the same `id` are deduplicated in the error text. |
534
+ | `errorMessage` | `object` | Main line shown in the bubble: `{ [lang]: string }`. |
530
535
 
531
536
  **Example**:
532
537
 
@@ -617,17 +622,34 @@ const waitForPrevious = true; // waits for previous message to be read, default:
617
622
  const hidden = true; // message is not visible to the user, only the response is, default: false
618
623
  const typingText = "Asking the unicorns' opinion..."; // text to show in the loader while the Agent is answering, defaults to none
619
624
  const useLoaderTextAsMsg = false; // when true, the Agent's answer is replaced in the chat by typingText (useful for hidden "action" messages), default: false
620
- typeMessage('Hello World!', waitForPrevious, hidden, typingText, useLoaderTextAsMsg);
625
+ typeMessage(
626
+ 'Hello World!',
627
+ waitForPrevious,
628
+ hidden,
629
+ typingText,
630
+ useLoaderTextAsMsg
631
+ );
621
632
  ```
622
633
 
623
634
  There is also an alias function that does not show the message sent to the user, but only the Agent's response:
624
635
 
625
636
  ```js
626
637
  const waitForPrevious = true; // waits for previous message to be read, default: true
627
- typeMessageHidden('Hello World!', waitForPrevious, typingText, useLoaderTextAsMsg);
638
+ typeMessageHidden(
639
+ 'Hello World!',
640
+ waitForPrevious,
641
+ typingText,
642
+ useLoaderTextAsMsg
643
+ );
628
644
 
629
645
  // alias to
630
- typeMessage('Hello World!', waitForPrevious, true, typingText, useLoaderTextAsMsg);
646
+ typeMessage(
647
+ 'Hello World!',
648
+ waitForPrevious,
649
+ true,
650
+ typingText,
651
+ useLoaderTextAsMsg
652
+ );
631
653
  ```
632
654
 
633
655
  `typeBatchMessages` sends a sequence of messages one after the other, waiting for the Agent to finish answering (and speaking) each one before sending the next. Chat inputs are disabled while the batch is running:
@@ -635,7 +657,11 @@ typeMessage('Hello World!', waitForPrevious, true, typingText, useLoaderTextAsMs
635
657
  ```js
636
658
  typeBatchMessages([
637
659
  { message: 'Hello!', waitForPrevious: true },
638
- { message: 'Tell me about yourself', hidden: true, typingText: 'Thinking...' },
660
+ {
661
+ message: 'Tell me about yourself',
662
+ hidden: true,
663
+ typingText: 'Thinking...',
664
+ },
639
665
  { message: 'Thanks', useLoaderTextAsMsg: false },
640
666
  ]);
641
667
  ```
@@ -648,13 +674,13 @@ Set the `disableTextEnteredEvents` prop to `true` on widgets that should ignore
648
674
 
649
675
  The widget dispatches and listens to the following `CustomEvent`s on `document`:
650
676
 
651
- | Event | Direction | `event.detail` | Description |
652
- | ---------------------- | ------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
653
- | `MemoriNewDialogState` | widget → host | `DialogState` | Fired at every state change of the conversation, see [Conversation state](#conversation-state) |
654
- | `MemoriEndSpeak` | widget → host | none | Fired when the Agent has finished answering (and speaking, if audio is enabled) |
655
- | `artifactCreated` | widget → host | `{ artifact: ArtifactData, message: Message }` | Fired when an artifact is generated from an Agent message, see [Artifact API](#artifact-api) |
656
- | `MemoriTextEntered` | host → widget | `{ text, waitForPrevious, hidden, typingText, useLoaderTextAsMsg, hasBatchQueued }` | Sends a message to the Agent. This is what `typeMessage` dispatches under the hood |
657
- | `MemoriResetUIEffects` | host → widget | none | Stops TTS playback and resets pending UI timers |
677
+ | Event | Direction | `event.detail` | Description |
678
+ | ---------------------- | ------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
679
+ | `MemoriNewDialogState` | widget → host | `DialogState` | Fired at every state change of the conversation, see [Conversation state](#conversation-state) |
680
+ | `MemoriEndSpeak` | widget → host | none | Fired when the Agent has finished answering (and speaking, if audio is enabled) |
681
+ | `artifactCreated` | widget → host | `{ artifact: ArtifactData, message: Message }` | Fired when an artifact is generated from an Agent message, see [Artifact API](#artifact-api) |
682
+ | `MemoriTextEntered` | host → widget | `{ text, waitForPrevious, hidden, typingText, useLoaderTextAsMsg, hasBatchQueued }` | Sends a message to the Agent. This is what `typeMessage` dispatches under the hood |
683
+ | `MemoriResetUIEffects` | host → widget | none | Stops TTS playback and resets pending UI timers |
658
684
 
659
685
  ```js
660
686
  document.addEventListener('MemoriEndSpeak', () => {
@@ -0,0 +1,26 @@
1
+ /* Shrinks to the free space; when narrower than the bars, keeps the newest
2
+ (right) bars visible and clips the oldest on the left. */
3
+ .memori-audio-wave {
4
+ display: flex;
5
+ overflow: hidden;
6
+ width: fit-content;
7
+ max-width: calc(100% - 2 * var(--memori-spacing-sm, 8px));
8
+ height: 36px;
9
+ box-sizing: border-box;
10
+ flex-shrink: 1;
11
+ align-items: center;
12
+ justify-content: flex-end;
13
+ margin: 0 auto;
14
+ gap: 3px;
15
+ }
16
+
17
+ .memori-audio-wave--bar {
18
+ width: 3px;
19
+ height: 100%;
20
+ flex-shrink: 0;
21
+ border-radius: 2px;
22
+ background: var(--memori-primary);
23
+ transform: scaleY(0.12);
24
+ transform-origin: center;
25
+ transition: transform 70ms linear;
26
+ }
@@ -0,0 +1,6 @@
1
+ export interface Props {
2
+ stream?: MediaStream | null;
3
+ label?: string;
4
+ }
5
+ declare const AudioWave: ({ stream, label }: Props) => JSX.Element;
6
+ export default AudioWave;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
5
+ const BAR_COUNT = 48;
6
+ const MIN_SCALE = 0.12;
7
+ const FRAME_INTERVAL_MS = 70;
8
+ const AudioWave = ({ stream, label }) => {
9
+ const barsRef = (0, react_1.useRef)([]);
10
+ (0, react_1.useEffect)(() => {
11
+ const AudioContextClass = typeof window !== 'undefined'
12
+ ? window.AudioContext || window.webkitAudioContext
13
+ : undefined;
14
+ if (!stream || !AudioContextClass)
15
+ return;
16
+ const audioContext = new AudioContextClass();
17
+ audioContext.resume().catch(() => { });
18
+ const source = audioContext.createMediaStreamSource(stream);
19
+ const analyser = audioContext.createAnalyser();
20
+ analyser.fftSize = 512;
21
+ source.connect(analyser);
22
+ const samples = new Uint8Array(analyser.fftSize);
23
+ const levels = new Array(BAR_COUNT).fill(0);
24
+ let lastFrame = 0;
25
+ let frame = 0;
26
+ const tick = (time) => {
27
+ frame = requestAnimationFrame(tick);
28
+ if (time - lastFrame < FRAME_INTERVAL_MS)
29
+ return;
30
+ lastFrame = time;
31
+ analyser.getByteTimeDomainData(samples);
32
+ let sum = 0;
33
+ for (let i = 0; i < samples.length; i++) {
34
+ const deviation = (samples[i] - 128) / 128;
35
+ sum += deviation * deviation;
36
+ }
37
+ const level = Math.min(1, Math.sqrt(sum / samples.length) * 5);
38
+ levels.shift();
39
+ levels.push(level);
40
+ barsRef.current.forEach((bar, i) => {
41
+ if (bar) {
42
+ bar.style.transform = `scaleY(${Math.max(MIN_SCALE, levels[i])})`;
43
+ }
44
+ });
45
+ };
46
+ frame = requestAnimationFrame(tick);
47
+ return () => {
48
+ cancelAnimationFrame(frame);
49
+ source.disconnect();
50
+ audioContext.close().catch(() => { });
51
+ };
52
+ }, [stream]);
53
+ return ((0, jsx_runtime_1.jsx)("div", { className: "memori-audio-wave", role: "img", "aria-label": label, children: Array.from({ length: BAR_COUNT }, (_, i) => ((0, jsx_runtime_1.jsx)("span", { ref: el => {
54
+ barsRef.current[i] = el;
55
+ }, className: "memori-audio-wave--bar" }, i))) }));
56
+ };
57
+ exports.default = AudioWave;
58
+ //# sourceMappingURL=AudioWave.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioWave.js","sourceRoot":"","sources":["../../../src/components/AudioWave/AudioWave.tsx"],"names":[],"mappings":"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"}
@@ -47,8 +47,10 @@ export interface Props {
47
47
  setEnableFocusChatInput: (enableFocusChatInput: boolean) => void;
48
48
  isPlayingAudio?: boolean;
49
49
  stopAudio: () => void;
50
- startListening: () => void;
51
- stopListening: () => void;
50
+ startListening: () => void | Promise<boolean>;
51
+ stopListening: (onTranscript?: (text: string) => void) => void;
52
+ audioStream?: MediaStream | null;
53
+ transcribing?: boolean;
52
54
  customMediaRenderer?: MediaWidgetProps['customMediaRenderer'];
53
55
  layout?: MemoriProps['layout'];
54
56
  userAvatar?: MemoriProps['userAvatar'];