@memori.ai/memori-react 9.0.0-alpha.21 → 9.0.0-alpha.23

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 (283) hide show
  1. package/CHANGELOG.md +453 -0
  2. package/dist/components/AgeVerificationModal/AgeVerificationModal.css +1 -7
  3. package/dist/components/AgeVerificationModal/AgeVerificationModal.js +1 -1
  4. package/dist/components/AgeVerificationModal/AgeVerificationModal.js.map +1 -1
  5. package/dist/components/Auth/Auth.css +12 -5
  6. package/dist/components/Auth/Auth.d.ts +1 -1
  7. package/dist/components/Auth/Auth.js +46 -32
  8. package/dist/components/Auth/Auth.js.map +1 -1
  9. package/dist/components/BlockedMemoriBadge/BlockedMemoriBadge.css +7 -6
  10. package/dist/components/Chat/Chat.css +1 -0
  11. package/dist/components/Chat/Chat.js +1 -1
  12. package/dist/components/Chat/Chat.js.map +1 -1
  13. package/dist/components/ChatBubble/ChatBubble.css +32 -5
  14. package/dist/components/ChatBubble/ChatBubble.js +14 -11
  15. package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
  16. package/dist/components/ChatHistoryDrawer/ChatHistory.d.ts +3 -1
  17. package/dist/components/ChatHistoryDrawer/ChatHistory.js +2 -2
  18. package/dist/components/ChatHistoryDrawer/ChatHistory.js.map +1 -1
  19. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.css +1 -1
  20. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +3 -1
  21. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +7 -57
  22. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -1
  23. package/dist/components/ChatInputs/ChatInputs.js +10 -1
  24. package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
  25. package/dist/components/ChatTextArea/ChatTextArea.css +1 -1
  26. package/dist/components/ContentPreviewModal/ContentPreviewModal.css +1 -10
  27. package/dist/components/ContentPreviewModal/ContentPreviewModal.js +1 -1
  28. package/dist/components/ContentPreviewModal/ContentPreviewModal.js.map +1 -1
  29. package/dist/components/ExpertsDrawer/ExpertsDrawer.css +0 -6
  30. package/dist/components/FeedbackButtons/FeedbackButtons.js +2 -2
  31. package/dist/components/FeedbackButtons/FeedbackButtons.js.map +1 -1
  32. package/dist/components/Header/Header.css +8 -3
  33. package/dist/components/Header/Header.js +15 -18
  34. package/dist/components/Header/Header.js.map +1 -1
  35. package/dist/components/IconButton/IconButton.d.ts +1 -1
  36. package/dist/components/KnownFacts/KnownFacts.css +1 -1
  37. package/dist/components/KnownFacts/KnownFacts.js +2 -5
  38. package/dist/components/KnownFacts/KnownFacts.js.map +1 -1
  39. package/dist/components/LoginDrawer/LoginDrawer.css +16 -14
  40. package/dist/components/LoginDrawer/LoginDrawer.js +19 -11
  41. package/dist/components/LoginDrawer/LoginDrawer.js.map +1 -1
  42. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/styles.css +4 -4
  43. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +28 -5
  44. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +2 -2
  45. package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
  46. package/dist/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js +1 -1
  47. package/dist/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js.map +1 -1
  48. package/dist/components/MemoriWidget/MemoriWidget.d.ts +1 -0
  49. package/dist/components/MemoriWidget/MemoriWidget.js +93 -32
  50. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  51. package/dist/components/MobileSessionPanel/MobileSessionPanel.css +2 -2
  52. package/dist/components/PositionPopover/PositionPopover.css +3 -3
  53. package/dist/components/PositionPopover/PositionPopover.js +38 -25
  54. package/dist/components/PositionPopover/PositionPopover.js.map +1 -1
  55. package/dist/components/Snippet/Snippet.css +1 -1
  56. package/dist/components/StartPanel/StartPanel.css +19 -3
  57. package/dist/components/StartPanel/StartPanel.js +12 -18
  58. package/dist/components/StartPanel/StartPanel.js.map +1 -1
  59. package/dist/components/layouts/WebsiteAssistant/website-assistant.css +3 -3
  60. package/dist/components/layouts/chat.css +5 -2
  61. package/dist/components/layouts/totem.css +43 -9
  62. package/dist/helpers/nats/getNatsConfig.js.map +1 -1
  63. package/dist/helpers/nats/useNats.d.ts +2 -1
  64. package/dist/helpers/nats/useNats.js +87 -20
  65. package/dist/helpers/nats/useNats.js.map +1 -1
  66. package/dist/helpers/nats/useNatsSession.d.ts +6 -1
  67. package/dist/helpers/nats/useNatsSession.js +48 -7
  68. package/dist/helpers/nats/useNatsSession.js.map +1 -1
  69. package/dist/helpers/positionPopover.d.ts +2 -1
  70. package/dist/helpers/positionPopover.js +10 -2
  71. package/dist/helpers/positionPopover.js.map +1 -1
  72. package/dist/icons/MemoriIcon.js +1 -1
  73. package/dist/icons/MemoriIcon.js.map +1 -1
  74. package/dist/locales/de.json +4 -1
  75. package/dist/locales/en.json +3 -1
  76. package/dist/locales/es.json +3 -1
  77. package/dist/locales/fr.json +3 -1
  78. package/dist/locales/it.json +3 -1
  79. package/dist/styles.css +1 -1
  80. package/dist/version.d.ts +1 -1
  81. package/dist/version.js +1 -1
  82. package/esm/components/AgeVerificationModal/AgeVerificationModal.css +1 -7
  83. package/esm/components/AgeVerificationModal/AgeVerificationModal.js +1 -1
  84. package/esm/components/AgeVerificationModal/AgeVerificationModal.js.map +1 -1
  85. package/esm/components/Auth/Auth.css +12 -5
  86. package/esm/components/Auth/Auth.d.ts +1 -1
  87. package/esm/components/Auth/Auth.js +47 -33
  88. package/esm/components/Auth/Auth.js.map +1 -1
  89. package/esm/components/BlockedMemoriBadge/BlockedMemoriBadge.css +7 -6
  90. package/esm/components/Chat/Chat.css +1 -0
  91. package/esm/components/Chat/Chat.js +1 -1
  92. package/esm/components/Chat/Chat.js.map +1 -1
  93. package/esm/components/ChatBubble/ChatBubble.css +32 -5
  94. package/esm/components/ChatBubble/ChatBubble.js +14 -11
  95. package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
  96. package/esm/components/ChatHistoryDrawer/ChatHistory.d.ts +3 -1
  97. package/esm/components/ChatHistoryDrawer/ChatHistory.js +2 -2
  98. package/esm/components/ChatHistoryDrawer/ChatHistory.js.map +1 -1
  99. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.css +1 -1
  100. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +3 -1
  101. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js +9 -59
  102. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -1
  103. package/esm/components/ChatInputs/ChatInputs.js +11 -2
  104. package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
  105. package/esm/components/ChatTextArea/ChatTextArea.css +1 -1
  106. package/esm/components/ContentPreviewModal/ContentPreviewModal.css +1 -10
  107. package/esm/components/ContentPreviewModal/ContentPreviewModal.js +1 -1
  108. package/esm/components/ContentPreviewModal/ContentPreviewModal.js.map +1 -1
  109. package/esm/components/ExpertsDrawer/ExpertsDrawer.css +0 -6
  110. package/esm/components/FeedbackButtons/FeedbackButtons.js +2 -2
  111. package/esm/components/FeedbackButtons/FeedbackButtons.js.map +1 -1
  112. package/esm/components/Header/Header.css +8 -3
  113. package/esm/components/Header/Header.js +15 -18
  114. package/esm/components/Header/Header.js.map +1 -1
  115. package/esm/components/IconButton/IconButton.d.ts +1 -1
  116. package/esm/components/KnownFacts/KnownFacts.css +1 -1
  117. package/esm/components/KnownFacts/KnownFacts.js +2 -5
  118. package/esm/components/KnownFacts/KnownFacts.js.map +1 -1
  119. package/esm/components/LoginDrawer/LoginDrawer.css +16 -14
  120. package/esm/components/LoginDrawer/LoginDrawer.js +20 -12
  121. package/esm/components/LoginDrawer/LoginDrawer.js.map +1 -1
  122. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/styles.css +4 -4
  123. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +28 -5
  124. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +2 -2
  125. package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
  126. package/esm/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js +1 -1
  127. package/esm/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js.map +1 -1
  128. package/esm/components/MemoriWidget/MemoriWidget.d.ts +1 -0
  129. package/esm/components/MemoriWidget/MemoriWidget.js +93 -33
  130. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  131. package/esm/components/MobileSessionPanel/MobileSessionPanel.css +2 -2
  132. package/esm/components/PositionPopover/PositionPopover.css +3 -3
  133. package/esm/components/PositionPopover/PositionPopover.js +39 -26
  134. package/esm/components/PositionPopover/PositionPopover.js.map +1 -1
  135. package/esm/components/Snippet/Snippet.css +1 -1
  136. package/esm/components/StartPanel/StartPanel.css +19 -3
  137. package/esm/components/StartPanel/StartPanel.js +12 -18
  138. package/esm/components/StartPanel/StartPanel.js.map +1 -1
  139. package/esm/components/layouts/WebsiteAssistant/website-assistant.css +3 -3
  140. package/esm/components/layouts/chat.css +5 -2
  141. package/esm/components/layouts/totem.css +43 -9
  142. package/esm/helpers/nats/getNatsConfig.js.map +1 -1
  143. package/esm/helpers/nats/useNats.d.ts +2 -1
  144. package/esm/helpers/nats/useNats.js +87 -20
  145. package/esm/helpers/nats/useNats.js.map +1 -1
  146. package/esm/helpers/nats/useNatsSession.d.ts +6 -1
  147. package/esm/helpers/nats/useNatsSession.js +48 -8
  148. package/esm/helpers/nats/useNatsSession.js.map +1 -1
  149. package/esm/helpers/positionPopover.d.ts +2 -1
  150. package/esm/helpers/positionPopover.js +9 -2
  151. package/esm/helpers/positionPopover.js.map +1 -1
  152. package/esm/icons/MemoriIcon.js +1 -1
  153. package/esm/icons/MemoriIcon.js.map +1 -1
  154. package/esm/locales/de.json +4 -1
  155. package/esm/locales/en.json +3 -1
  156. package/esm/locales/es.json +3 -1
  157. package/esm/locales/fr.json +3 -1
  158. package/esm/locales/it.json +3 -1
  159. package/esm/styles.css +1 -1
  160. package/esm/version.d.ts +1 -1
  161. package/esm/version.js +1 -1
  162. package/package.json +8 -5
  163. package/src/Live/Agents.stories.tsx +49 -0
  164. package/src/Live/KnownFacts.stories.tsx +50 -0
  165. package/src/Showcase.stories.tsx +3 -14
  166. package/src/components/AgeVerificationModal/AgeVerificationModal.css +1 -7
  167. package/src/components/AgeVerificationModal/AgeVerificationModal.stories.tsx +1 -1
  168. package/src/components/AgeVerificationModal/AgeVerificationModal.tsx +1 -0
  169. package/src/components/Auth/Auth.css +12 -5
  170. package/src/components/Auth/Auth.stories.tsx +1 -1
  171. package/src/components/Auth/Auth.test.tsx +68 -1
  172. package/src/components/Auth/Auth.tsx +69 -54
  173. package/src/components/Auth/__snapshots__/Auth.test.tsx.snap +5 -6
  174. package/src/components/Avatar/Avatar.stories.tsx +1 -18
  175. package/src/components/Avatar/AvatarView/AvatarView.stories.tsx +1 -103
  176. package/src/components/Blob/Blob.stories.tsx +1 -1
  177. package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.css +7 -6
  178. package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.stories.tsx +1 -1
  179. package/src/components/ChangeMode/ChangeMode.stories.tsx +1 -1
  180. package/src/components/Chat/Chat.css +1 -0
  181. package/src/components/Chat/Chat.stories.tsx +61 -7
  182. package/src/components/Chat/Chat.tsx +1 -0
  183. package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +151 -151
  184. package/src/components/ChatBubble/ChatBubble.css +32 -5
  185. package/src/components/ChatBubble/ChatBubble.stories.tsx +24 -2
  186. package/src/components/ChatBubble/ChatBubble.test.tsx +37 -1
  187. package/src/components/ChatBubble/ChatBubble.tsx +308 -299
  188. package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +384 -264
  189. package/src/components/ChatHistoryDrawer/ChatHistory.stories.tsx +1 -1
  190. package/src/components/ChatHistoryDrawer/ChatHistory.tsx +6 -0
  191. package/src/components/ChatHistoryDrawer/ChatResumeDrawer.css +1 -1
  192. package/src/components/ChatHistoryDrawer/ChatResumeDrawer.tsx +24 -81
  193. package/src/components/ChatInputs/ChatInputs.stories.tsx +1 -39
  194. package/src/components/ChatInputs/ChatInputs.test.tsx +47 -0
  195. package/src/components/ChatInputs/ChatInputs.tsx +12 -2
  196. package/src/components/ChatTextArea/ChatTextArea.css +1 -1
  197. package/src/components/CompletionProviderStatus/CompletionProviderStatus.stories.tsx +1 -1
  198. package/src/components/ContentPreviewModal/ContentPreviewModal.css +1 -10
  199. package/src/components/ContentPreviewModal/ContentPreviewModal.tsx +1 -1
  200. package/src/components/ExpertsDrawer/ExpertsDrawer.css +0 -6
  201. package/src/components/ExpertsDrawer/ExpertsDrawer.stories.tsx +1 -1
  202. package/src/components/FeedbackButtons/FeedbackButtons.stories.tsx +29 -10
  203. package/src/components/FeedbackButtons/FeedbackButtons.tsx +2 -0
  204. package/src/components/FeedbackButtons/__snapshots__/FeedbackButtons.test.tsx.snap +1 -1
  205. package/src/components/Header/Header.css +8 -3
  206. package/src/components/Header/Header.stories.tsx +1 -1
  207. package/src/components/Header/Header.tsx +146 -117
  208. package/src/components/KnownFacts/KnownFacts.css +1 -1
  209. package/src/components/KnownFacts/KnownFacts.stories.tsx +1 -23
  210. package/src/components/KnownFacts/KnownFacts.tsx +4 -9
  211. package/src/components/KnownFacts/__snapshots__/KnownFacts.test.tsx.snap +6 -2
  212. package/src/components/LoginDrawer/LoginDrawer.css +16 -14
  213. package/src/components/LoginDrawer/LoginDrawer.stories.tsx +2 -52
  214. package/src/components/LoginDrawer/LoginDrawer.tsx +51 -39
  215. package/src/components/LoginDrawer/__snapshots__/LoginDrawer.test.tsx.snap +33 -11
  216. package/src/components/MediaWidget/MediaItemWidget.stories.tsx +1 -15
  217. package/src/components/MediaWidget/MediaWidget.stories.tsx +1 -45
  218. package/src/components/MemoriArtifactSystem/components/ArtifactActions/CopyButton.stories.tsx +1 -1
  219. package/src/components/MemoriArtifactSystem/components/ArtifactActions/styles.css +4 -4
  220. package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +28 -5
  221. package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.tsx +4 -6
  222. package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.tsx +1 -1
  223. package/src/components/MemoriArtifactSystem/utils/ArtifactAPI.test.tsx +32 -28
  224. package/src/components/MemoriWidget/MemoriUIProvider.contract.test.tsx +55 -0
  225. package/src/components/MemoriWidget/MemoriWidget.stories.tsx +55 -77
  226. package/src/components/MemoriWidget/MemoriWidget.tsx +114 -45
  227. package/src/components/MemoriWidget/getChatStyles.test.ts +24 -0
  228. package/src/components/MicrophoneButton/MicrophoneButton.stories.tsx +1 -1
  229. package/src/components/MobileSessionPanel/MobileSessionPanel.css +2 -2
  230. package/src/components/PositionPopover/PositionPopover.css +3 -3
  231. package/src/components/PositionPopover/PositionPopover.stories.tsx +1 -1
  232. package/src/components/PositionPopover/PositionPopover.tsx +50 -28
  233. package/src/components/PoweredBy/PoweredBy.stories.tsx +1 -54
  234. package/src/components/PoweredBy/__snapshots__/PoweredBy.test.tsx.snap +2 -2
  235. package/src/components/SendOnEnterMenu/SendOnEnterMenu.stories.tsx +1 -1
  236. package/src/components/SettingsDrawer/SettingsDrawer.stories.tsx +1 -1
  237. package/src/components/ShareButton/ShareButton.stories.tsx +1 -1
  238. package/src/components/Snippet/Snippet.css +1 -1
  239. package/src/components/Snippet/Snippet.stories.tsx +1 -1
  240. package/src/components/StartPanel/StartPanel.css +19 -3
  241. package/src/components/StartPanel/StartPanel.stories.tsx +2 -2
  242. package/src/components/StartPanel/StartPanel.tsx +22 -35
  243. package/src/components/StartPanel/__snapshots__/StartPanel.test.tsx.snap +177 -121
  244. package/src/components/Typing/Typing.stories.tsx +1 -1
  245. package/src/components/WhyThisAnswer/WhyThisAnswer.stories.tsx +22 -44
  246. package/src/components/WhyThisAnswer/__snapshots__/WhyThisAnswer.test.tsx.snap +9 -3
  247. package/src/components/layouts/FullBody/FullBody.stories.tsx +55 -68
  248. package/src/components/layouts/Totem/Totem.stories.tsx +69 -87
  249. package/src/components/layouts/WebsiteAssistant/website-assistant.css +3 -3
  250. package/src/components/layouts/ZoomedFullBody/ZoomedFullBody.stories.tsx +69 -87
  251. package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +19 -41
  252. package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +39 -83
  253. package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +15 -11
  254. package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +116 -42
  255. package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +18 -40
  256. package/src/components/layouts/chat.css +5 -2
  257. package/src/components/layouts/layouts.stories.tsx +96 -179
  258. package/src/components/layouts/totem.css +43 -9
  259. package/src/helpers/nats/getNatsConfig.ts +4 -1
  260. package/src/helpers/nats/useNats.test.tsx +81 -0
  261. package/src/helpers/nats/useNats.ts +109 -29
  262. package/src/helpers/nats/useNatsSession.test.ts +16 -0
  263. package/src/helpers/nats/useNatsSession.ts +79 -13
  264. package/src/helpers/positionPopover.test.ts +36 -1
  265. package/src/helpers/positionPopover.ts +21 -4
  266. package/src/i18n.knownFacts.test.ts +40 -0
  267. package/src/icons/MemoriIcon.tsx +1 -1
  268. package/src/index.stories.tsx +1 -47
  269. package/src/locales/de.json +4 -1
  270. package/src/locales/en.json +3 -1
  271. package/src/locales/es.json +3 -1
  272. package/src/locales/fr.json +3 -1
  273. package/src/locales/it.json +3 -1
  274. package/src/styles.css +13 -27
  275. package/src/version.ts +1 -1
  276. package/src/components/ChatTextArea/ChatTextArea.stories.tsx +0 -55
  277. package/src/components/CustomGLBModelViewer/ModelViewer.stories.tsx +0 -58
  278. package/src/components/DateSelector/DateSelector.stories.tsx +0 -47
  279. package/src/components/FilePreview/FilePreview.stories.tsx +0 -63
  280. package/src/components/MemoriArtifactSystem/ArtifactDrawer.stories.tsx +0 -265
  281. package/src/components/UploadButton/UploadButton.stories.tsx +0 -510
  282. package/src/components/VenueWidget/VenueWidget.stories.tsx +0 -69
  283. package/src/components/layouts/WebsiteAssistant/WebsiteAssistant.stories.tsx +0 -115
@@ -1,48 +1,38 @@
1
- import React from 'react';
2
- import { Meta, Story } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react';
3
2
  import { tenant } from '../../../mocks/data';
4
- import { Props } from '../../MemoriWidget/MemoriWidget';
5
- import Memori from '../../../index';
6
- import I18nWrapper from '../../../I18nWrapper';
7
- import { VisemeProvider } from '../../../context/visemeContext';
8
- import { ArtifactProvider } from '../../MemoriArtifactSystem/context/ArtifactContext';
3
+ import Memori, { Props } from '../../../index';
4
+ import { withWidgetProviders } from '../../../../.storybook/decorators';
9
5
 
10
- const meta: Meta = {
11
- title: 'General/Layouts/FullBody',
12
- component: (args: Props) => <Memori {...args} />,
13
- argTypes: {},
6
+ /**
7
+ * FULLPAGE layout with Ready Player Me avatar configurations.
8
+ * (Folder name "FullBody" is historical — layout prop is always FULLPAGE.)
9
+ */
10
+ const meta = {
11
+ title: 'Layouts/FullPage',
12
+ component: Memori,
13
+ decorators: [withWidgetProviders],
14
14
  parameters: {
15
15
  controls: { expanded: true },
16
16
  layout: 'fullscreen',
17
17
  },
18
- };
18
+ } satisfies Meta<typeof Memori>;
19
19
 
20
20
  export default meta;
21
+ type Story = StoryObj<typeof meta>;
21
22
 
22
-
23
- const Template: Story<Props> = args => (
24
- <I18nWrapper>
25
- <ArtifactProvider>
26
- <VisemeProvider>
27
- <Memori {...args} />
28
- </VisemeProvider>
29
- </ArtifactProvider>
30
- </I18nWrapper>
31
- );
32
-
33
- const DefaultLayout = Template.bind({});
34
- DefaultLayout.args = {
35
- emoriName: 'Layout Storybook',
23
+ const stagingBase: Partial<Props> = {
24
+ memoriName: 'Layout Storybook',
36
25
  ownerUserName: 'andrea.patini',
37
26
  memoriID: 'ae20fc5a-cc15-4db9-b7dd-2cd4a621b85e',
38
27
  ownerUserID: '91dbc9ba-b684-4fbe-9828-b5980af6cda9',
39
28
  tenantID: 'aisuru-staging.aclambda.online',
40
29
  engineURL: 'https://engine-staging.memori.ai/memori/v2',
41
30
  apiURL: 'https://backend-staging.memori.ai/api/v2',
42
- layout: 'FULL_CHAT',
31
+ layout: 'FULLPAGE',
43
32
  uiLang: 'IT',
44
33
  spokenLang: 'IT',
45
34
  integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
35
+ tenant,
46
36
  };
47
37
 
48
38
  const baseIntegration = {
@@ -58,53 +48,50 @@ const baseIntegration = {
58
48
  lastChangeTimestamp: '2022-06-13T14:44:52.833573Z',
59
49
  };
60
50
 
61
- export const FullBodyWithFullBodyAvatar = Template.bind({});
62
- FullBodyWithFullBodyAvatar.args = {
63
- ...DefaultLayout.args,
51
+ export const WithFullBodyAvatar: Story = {
52
+ args: {
53
+ ...stagingBase,
64
54
  avatar3DURL:
65
55
  'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
66
- integration: {
67
- ...baseIntegration,
68
- customData: JSON.stringify({
69
- textColor: '#000000',
70
- buttonBgColor: '#007eb6',
71
- buttonTextColor: '#ffffff',
72
- blurBackground: true,
73
- innerBgColor: 'light',
74
- multilanguage: true,
75
- avatar: 'readyplayerme-full',
76
- avatarURL:
77
- 'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
78
- name: 'Layout Storybook',
79
- showShare: true,
80
- }),
56
+ integration: {
57
+ ...baseIntegration,
58
+ customData: JSON.stringify({
59
+ textColor: '#000000',
60
+ buttonBgColor: '#007eb6',
61
+ buttonTextColor: '#ffffff',
62
+ blurBackground: true,
63
+ innerBgColor: 'light',
64
+ multilanguage: true,
65
+ avatar: 'readyplayerme-full',
66
+ avatarURL:
67
+ 'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
68
+ name: 'Layout Storybook',
69
+ showShare: true,
70
+ }),
71
+ },
81
72
  },
82
- tenant,
83
- layout: 'FULLPAGE',
84
73
  };
85
74
 
86
- export const FullBodyWithHalfBodyAvatar = Template.bind({});
87
- FullBodyWithHalfBodyAvatar.args = {
88
- ...DefaultLayout.args,
75
+ export const WithHalfBodyAvatar: Story = {
76
+ args: {
77
+ ...stagingBase,
89
78
  avatar3DURL:
90
79
  'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
91
- integration: {
92
- ...baseIntegration,
93
- customData: JSON.stringify({
94
- textColor: '#000000',
95
- buttonBgColor: '#007eb6',
96
- buttonTextColor: '#ffffff',
97
- blurBackground: true,
98
- innerBgColor: 'light',
99
- multilanguage: true,
100
- avatar: 'readyplayerme',
101
- avatarURL:
102
- 'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
103
- name: 'Layout Storybook',
104
- showShare: true,
105
- }),
80
+ integration: {
81
+ ...baseIntegration,
82
+ customData: JSON.stringify({
83
+ textColor: '#000000',
84
+ buttonBgColor: '#007eb6',
85
+ buttonTextColor: '#ffffff',
86
+ blurBackground: true,
87
+ innerBgColor: 'light',
88
+ multilanguage: true,
89
+ avatar: 'readyplayerme',
90
+ avatarURL:
91
+ 'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
92
+ name: 'Layout Storybook',
93
+ showShare: true,
94
+ }),
95
+ },
106
96
  },
107
- tenant,
108
- layout: 'FULLPAGE',
109
97
  };
110
-
@@ -1,48 +1,34 @@
1
- import React from 'react';
2
- import { Meta, Story } from '@storybook/react';
3
- import { memori, tenant } from '../../../mocks/data';
4
- import { Props } from '../../MemoriWidget/MemoriWidget';
5
- import Memori from '../../../index';
6
- import I18nWrapper from '../../../I18nWrapper';
7
- import { VisemeProvider } from '../../../context/visemeContext';
8
- import { ArtifactProvider } from '../../MemoriArtifactSystem/context/ArtifactContext';
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { tenant } from '../../../mocks/data';
3
+ import Memori, { Props } from '../../../index';
4
+ import { withWidgetProviders } from '../../../../.storybook/decorators';
9
5
 
10
- const meta: Meta = {
11
- title: 'General/Layouts/Totem',
12
- component: (args: Props) => <Memori {...args} engineURL="https://engine.memori.ai" apiURL="https://backend.memori.ai" baseURL="https://www.aisuru.com" />,
13
- argTypes: {},
6
+ const meta = {
7
+ title: 'Layouts/Totem',
8
+ component: Memori,
9
+ decorators: [withWidgetProviders],
14
10
  parameters: {
15
11
  controls: { expanded: true },
16
12
  layout: 'fullscreen',
17
13
  },
18
- };
14
+ } satisfies Meta<typeof Memori>;
19
15
 
20
16
  export default meta;
17
+ type Story = StoryObj<typeof meta>;
21
18
 
22
-
23
- const Template: Story<Props> = args => (
24
- <I18nWrapper>
25
- <ArtifactProvider>
26
- <VisemeProvider>
27
- <Memori {...args} />
28
- </VisemeProvider>
29
- </ArtifactProvider>
30
- </I18nWrapper>
31
- );
32
-
33
- const DefaultLayout = Template.bind({});
34
- DefaultLayout.args = {
35
- emoriName: 'Layout Storybook',
19
+ const stagingBase: Partial<Props> = {
20
+ memoriName: 'Layout Storybook',
36
21
  ownerUserName: 'andrea.patini',
37
22
  memoriID: 'ae20fc5a-cc15-4db9-b7dd-2cd4a621b85e',
38
23
  ownerUserID: '91dbc9ba-b684-4fbe-9828-b5980af6cda9',
39
24
  tenantID: 'aisuru-staging.aclambda.online',
40
25
  engineURL: 'https://engine-staging.memori.ai/memori/v2',
41
26
  apiURL: 'https://backend-staging.memori.ai/api/v2',
42
- layout: 'FULL_CHAT',
27
+ layout: 'TOTEM',
43
28
  uiLang: 'IT',
44
29
  spokenLang: 'IT',
45
30
  integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
31
+ tenant,
46
32
  };
47
33
 
48
34
  const baseIntegration = {
@@ -58,74 +44,70 @@ const baseIntegration = {
58
44
  lastChangeTimestamp: '2022-06-13T14:44:52.833573Z',
59
45
  };
60
46
 
61
- export const TotemWithFullBodyAvatar = Template.bind({});
62
- TotemWithFullBodyAvatar.args = {
63
- ...DefaultLayout.args,
47
+ export const WithFullBodyAvatar: Story = {
48
+ args: {
49
+ ...stagingBase,
64
50
  avatar3DURL:
65
51
  'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
66
- integration: {
67
- ...baseIntegration,
68
- customData: JSON.stringify({
69
- textColor: '#000000',
70
- buttonBgColor: '#007eb6',
71
- buttonTextColor: '#ffffff',
72
- blurBackground: true,
73
- innerBgColor: 'light',
74
- multilanguage: true,
75
- avatar: 'readyplayerme-full',
76
- avatarURL:
77
- 'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
78
- name: 'Layout Storybook',
79
- showShare: true,
80
- }),
52
+ integration: {
53
+ ...baseIntegration,
54
+ customData: JSON.stringify({
55
+ textColor: '#000000',
56
+ buttonBgColor: '#007eb6',
57
+ buttonTextColor: '#ffffff',
58
+ blurBackground: true,
59
+ innerBgColor: 'light',
60
+ multilanguage: true,
61
+ avatar: 'readyplayerme-full',
62
+ avatarURL:
63
+ 'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
64
+ name: 'Layout Storybook',
65
+ showShare: true,
66
+ }),
67
+ },
81
68
  },
82
- tenant,
83
- layout: 'TOTEM',
84
69
  };
85
70
 
86
- export const TotemWithHalfBodyAvatar = Template.bind({});
87
- TotemWithHalfBodyAvatar.args = {
88
- ...DefaultLayout.args,
71
+ export const WithHalfBodyAvatar: Story = {
72
+ args: {
73
+ ...stagingBase,
89
74
  avatar3DURL:
90
75
  'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
91
- integration: {
92
- ...baseIntegration,
93
- customData: JSON.stringify({
94
- textColor: '#000000',
95
- buttonBgColor: '#007eb6',
96
- buttonTextColor: '#ffffff',
97
- blurBackground: true,
98
- innerBgColor: 'light',
99
- multilanguage: true,
100
- avatar: 'readyplayerme',
101
- avatarURL:
102
- 'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
103
- name: 'Layout Storybook',
104
- showShare: true,
105
- }),
76
+ integration: {
77
+ ...baseIntegration,
78
+ customData: JSON.stringify({
79
+ textColor: '#000000',
80
+ buttonBgColor: '#007eb6',
81
+ buttonTextColor: '#ffffff',
82
+ blurBackground: true,
83
+ innerBgColor: 'light',
84
+ multilanguage: true,
85
+ avatar: 'readyplayerme',
86
+ avatarURL:
87
+ 'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
88
+ name: 'Layout Storybook',
89
+ showShare: true,
90
+ }),
91
+ },
106
92
  },
107
- tenant,
108
- layout: 'TOTEM',
109
93
  };
110
94
 
111
- export const TotemWithDefaultTotem = Template.bind({});
112
- TotemWithDefaultTotem.args = {
113
- ...DefaultLayout.args,
114
- integration: {
115
- ...baseIntegration,
116
- customData: JSON.stringify({
117
- textColor: '#000000',
118
- buttonBgColor: '#007eb6',
119
- buttonTextColor: '#ffffff',
120
- blurBackground: true,
121
- innerBgColor: 'light',
122
- multilanguage: true,
123
- avatar: 'default_totem',
124
- name: 'Layout Storybook',
125
- showShare: true,
126
- }),
95
+ export const WithDefaultTotem: Story = {
96
+ args: {
97
+ ...stagingBase,
98
+ integration: {
99
+ ...baseIntegration,
100
+ customData: JSON.stringify({
101
+ textColor: '#000000',
102
+ buttonBgColor: '#007eb6',
103
+ buttonTextColor: '#ffffff',
104
+ blurBackground: true,
105
+ innerBgColor: 'light',
106
+ multilanguage: true,
107
+ avatar: 'default_totem',
108
+ name: 'Layout Storybook',
109
+ showShare: true,
110
+ }),
111
+ },
127
112
  },
128
- tenant,
129
- layout: 'TOTEM',
130
113
  };
131
-
@@ -152,13 +152,13 @@
152
152
  }
153
153
 
154
154
  /*
155
- * Login and Position drawers are portaled to body by Headless UI.
156
- * When layout is WEBSITE_ASSISTANT we pass drawerClassName so they sit above the fixed panel.
155
+ * Drawers portal into the widget surface (containment). Host-page float for the
156
+ * trigger stays high; do not inflate Drawer z-index here.
157
157
  */
158
158
  .memori-drawer.memori-drawer--above-website-assistant,
159
159
  .memori-drawer.memori-drawer--above-website-assistant .memori-drawer--backdrop,
160
160
  .memori-drawer.memori-drawer--above-website-assistant .memori-drawer--container {
161
- z-index: 2147483000;
161
+ z-index: 1400;
162
162
  }
163
163
 
164
164
  .memori-widget.memori-layout-website_assistant .memori-website_assistant--collapsed,
@@ -1,48 +1,34 @@
1
- import React from 'react';
2
- import { Meta, Story } from '@storybook/react';
3
- import { memori, tenant } from '../../../mocks/data';
4
- import { Props } from '../../MemoriWidget/MemoriWidget';
5
- import Memori from '../../../index';
6
- import I18nWrapper from '../../../I18nWrapper';
7
- import { VisemeProvider } from '../../../context/visemeContext';
8
- import { ArtifactProvider } from '../../MemoriArtifactSystem/context/ArtifactContext';
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { tenant } from '../../../mocks/data';
3
+ import Memori, { Props } from '../../../index';
4
+ import { withWidgetProviders } from '../../../../.storybook/decorators';
9
5
 
10
- const meta: Meta = {
11
- title: 'General/Layouts/ZoomedFullBody',
12
- component: (args: Props) => <Memori {...args} engineURL="https://engine.memori.ai" apiURL="https://backend.memori.ai" baseURL="https://www.aisuru.com" />,
13
- argTypes: {},
6
+ const meta = {
7
+ title: 'Layouts/ZoomedFullBody',
8
+ component: Memori,
9
+ decorators: [withWidgetProviders],
14
10
  parameters: {
15
11
  controls: { expanded: true },
16
12
  layout: 'fullscreen',
17
13
  },
18
- };
14
+ } satisfies Meta<typeof Memori>;
19
15
 
20
16
  export default meta;
17
+ type Story = StoryObj<typeof meta>;
21
18
 
22
-
23
- const Template: Story<Props> = args => (
24
- <I18nWrapper>
25
- <ArtifactProvider>
26
- <VisemeProvider>
27
- <Memori {...args} />
28
- </VisemeProvider>
29
- </ArtifactProvider>
30
- </I18nWrapper>
31
- );
32
-
33
- const DefaultLayout = Template.bind({});
34
- DefaultLayout.args = {
35
- emoriName: 'Layout Storybook',
19
+ const stagingBase: Partial<Props> = {
20
+ memoriName: 'Layout Storybook',
36
21
  ownerUserName: 'andrea.patini',
37
22
  memoriID: 'ae20fc5a-cc15-4db9-b7dd-2cd4a621b85e',
38
23
  ownerUserID: '91dbc9ba-b684-4fbe-9828-b5980af6cda9',
39
24
  tenantID: 'aisuru-staging.aclambda.online',
40
25
  engineURL: 'https://engine-staging.memori.ai/memori/v2',
41
26
  apiURL: 'https://backend-staging.memori.ai/api/v2',
42
- layout: 'FULL_CHAT',
27
+ layout: 'ZOOMED_FULL_BODY',
43
28
  uiLang: 'IT',
44
29
  spokenLang: 'IT',
45
30
  integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
31
+ tenant,
46
32
  };
47
33
 
48
34
  const baseIntegration = {
@@ -58,74 +44,70 @@ const baseIntegration = {
58
44
  lastChangeTimestamp: '2022-06-13T14:44:52.833573Z',
59
45
  };
60
46
 
61
- export const ZoomedFullBodyWithFullBodyAvatar = Template.bind({});
62
- ZoomedFullBodyWithFullBodyAvatar.args = {
63
- ...DefaultLayout.args,
47
+ export const WithFullBodyAvatar: Story = {
48
+ args: {
49
+ ...stagingBase,
64
50
  avatar3DURL:
65
51
  'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
66
- integration: {
67
- ...baseIntegration,
68
- customData: JSON.stringify({
69
- textColor: '#000000',
70
- buttonBgColor: '#007eb6',
71
- buttonTextColor: '#ffffff',
72
- blurBackground: true,
73
- innerBgColor: 'light',
74
- multilanguage: true,
75
- avatar: 'readyplayerme-full',
76
- avatarURL:
77
- 'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
78
- name: 'Layout Storybook',
79
- showShare: true,
80
- }),
52
+ integration: {
53
+ ...baseIntegration,
54
+ customData: JSON.stringify({
55
+ textColor: '#000000',
56
+ buttonBgColor: '#007eb6',
57
+ buttonTextColor: '#ffffff',
58
+ blurBackground: true,
59
+ innerBgColor: 'light',
60
+ multilanguage: true,
61
+ avatar: 'readyplayerme-full',
62
+ avatarURL:
63
+ 'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
64
+ name: 'Layout Storybook',
65
+ showShare: true,
66
+ }),
67
+ },
81
68
  },
82
- tenant,
83
- layout: 'ZOOMED_FULL_BODY',
84
69
  };
85
70
 
86
- export const ZoomedFullBodyWithHalfBodyAvatar = Template.bind({});
87
- ZoomedFullBodyWithHalfBodyAvatar.args = {
88
- ...DefaultLayout.args,
71
+ export const WithHalfBodyAvatar: Story = {
72
+ args: {
73
+ ...stagingBase,
89
74
  avatar3DURL:
90
75
  'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
91
- integration: {
92
- ...baseIntegration,
93
- customData: JSON.stringify({
94
- textColor: '#000000',
95
- buttonBgColor: '#007eb6',
96
- buttonTextColor: '#ffffff',
97
- blurBackground: true,
98
- innerBgColor: 'light',
99
- multilanguage: true,
100
- avatar: 'readyplayerme',
101
- avatarURL:
102
- 'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
103
- name: 'Layout Storybook',
104
- showShare: true,
105
- }),
76
+ integration: {
77
+ ...baseIntegration,
78
+ customData: JSON.stringify({
79
+ textColor: '#000000',
80
+ buttonBgColor: '#007eb6',
81
+ buttonTextColor: '#ffffff',
82
+ blurBackground: true,
83
+ innerBgColor: 'light',
84
+ multilanguage: true,
85
+ avatar: 'readyplayerme',
86
+ avatarURL:
87
+ 'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
88
+ name: 'Layout Storybook',
89
+ showShare: true,
90
+ }),
91
+ },
106
92
  },
107
- tenant,
108
- layout: 'ZOOMED_FULL_BODY',
109
93
  };
110
94
 
111
- export const ZoomedFullBodyWithDefaultTotem = Template.bind({});
112
- ZoomedFullBodyWithDefaultTotem.args = {
113
- ...DefaultLayout.args,
114
- integration: {
115
- ...baseIntegration,
116
- customData: JSON.stringify({
117
- textColor: '#000000',
118
- buttonBgColor: '#007eb6',
119
- buttonTextColor: '#ffffff',
120
- blurBackground: true,
121
- innerBgColor: 'light',
122
- multilanguage: true,
123
- avatar: 'default_totem',
124
- name: 'Layout Storybook',
125
- showShare: true,
126
- }),
95
+ export const WithDefaultTotem: Story = {
96
+ args: {
97
+ ...stagingBase,
98
+ integration: {
99
+ ...baseIntegration,
100
+ customData: JSON.stringify({
101
+ textColor: '#000000',
102
+ buttonBgColor: '#007eb6',
103
+ buttonTextColor: '#ffffff',
104
+ blurBackground: true,
105
+ innerBgColor: 'light',
106
+ multilanguage: true,
107
+ avatar: 'default_totem',
108
+ name: 'Layout Storybook',
109
+ showShare: true,
110
+ }),
111
+ },
127
112
  },
128
- tenant,
129
- layout: 'ZOOMED_FULL_BODY',
130
113
  };
131
-