@memori.ai/memori-react 8.41.6 → 8.43.0
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 +30 -0
- package/dist/components/Chat/Chat.js +1 -1
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.css +372 -0
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +36 -0
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +116 -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/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 +144 -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/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
- package/dist/components/MobileSessionPanel/MobileSessionPanel.css +459 -0
- package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +65 -0
- package/dist/components/MobileSessionPanel/MobileSessionPanel.js +294 -0
- package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
- package/dist/components/PositionPopover/PositionPopover.css +219 -0
- package/dist/components/PositionPopover/PositionPopover.d.ts +22 -0
- package/dist/components/PositionPopover/PositionPopover.js +195 -0
- package/dist/components/PositionPopover/PositionPopover.js.map +1 -0
- package/dist/components/UploadButton/UploadButton.d.ts +1 -0
- package/dist/components/UploadButton/UploadButton.js +12 -18
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.d.ts +1 -6
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js +7 -139
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/dist/components/icons/Print.js +1 -1
- package/dist/components/icons/Print.js.map +1 -1
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +4 -0
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +64 -0
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -0
- package/dist/components/layouts/WebsiteAssistant/website-assistant.css +806 -0
- package/dist/components/layouts/fullpage.css +522 -0
- package/dist/context/widgetSurfaceContext.d.ts +3 -0
- package/dist/context/widgetSurfaceContext.js +11 -0
- package/dist/context/widgetSurfaceContext.js.map +1 -0
- package/dist/helpers/constants.d.ts +1 -0
- package/dist/helpers/constants.js +24 -1
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/convertDocument.d.ts +1 -0
- package/dist/helpers/convertDocument.js +24 -0
- package/dist/helpers/convertDocument.js.map +1 -0
- package/dist/helpers/media.js +18 -3
- package/dist/helpers/media.js.map +1 -1
- package/dist/helpers/positionPopover.d.ts +1 -0
- package/dist/helpers/positionPopover.js +7 -0
- package/dist/helpers/positionPopover.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 +13 -0
- package/dist/helpers/usePressTooltip.js +23 -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/testUtils.d.ts +5 -0
- package/dist/testUtils.js +18 -0
- package/dist/testUtils.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/Chat/Chat.js +1 -1
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.css +372 -0
- package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +36 -0
- package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js +113 -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/DrawerFooter/DrawerFooter.css +62 -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.css +144 -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/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +2 -2
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
- package/esm/components/MobileSessionPanel/MobileSessionPanel.css +459 -0
- package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +65 -0
- package/esm/components/MobileSessionPanel/MobileSessionPanel.js +291 -0
- package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
- package/esm/components/PositionPopover/PositionPopover.css +219 -0
- package/esm/components/PositionPopover/PositionPopover.d.ts +22 -0
- package/esm/components/PositionPopover/PositionPopover.js +190 -0
- package/esm/components/PositionPopover/PositionPopover.js.map +1 -0
- package/esm/components/UploadButton/UploadButton.d.ts +1 -0
- package/esm/components/UploadButton/UploadButton.js +13 -19
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.d.ts +1 -6
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js +8 -140
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/esm/components/icons/Print.js +1 -1
- package/esm/components/icons/Print.js.map +1 -1
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +4 -0
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +61 -0
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -0
- package/esm/components/layouts/WebsiteAssistant/website-assistant.css +806 -0
- package/esm/components/layouts/fullpage.css +522 -0
- package/esm/context/widgetSurfaceContext.d.ts +3 -0
- package/esm/context/widgetSurfaceContext.js +7 -0
- package/esm/context/widgetSurfaceContext.js.map +1 -0
- package/esm/helpers/constants.d.ts +1 -0
- package/esm/helpers/constants.js +23 -0
- package/esm/helpers/constants.js.map +1 -1
- package/esm/helpers/convertDocument.d.ts +1 -0
- package/esm/helpers/convertDocument.js +20 -0
- package/esm/helpers/convertDocument.js.map +1 -0
- package/esm/helpers/media.js +18 -3
- package/esm/helpers/media.js.map +1 -1
- package/esm/helpers/positionPopover.d.ts +1 -0
- package/esm/helpers/positionPopover.js +4 -0
- package/esm/helpers/positionPopover.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 +13 -0
- package/esm/helpers/usePressTooltip.js +20 -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/testUtils.d.ts +5 -0
- package/esm/testUtils.js +15 -0
- package/esm/testUtils.js.map +1 -0
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +2 -2
- package/src/components/Chat/Chat.tsx +1 -0
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +10 -10
- package/src/components/ChatInputs/ChatInputs.tsx +3 -0
- package/src/components/FilePreview/FilePreview.stories.tsx +0 -3
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +2 -2
- package/src/components/UploadButton/UploadButton.stories.tsx +2 -2
- package/src/components/UploadButton/UploadButton.tsx +19 -19
- package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +13 -187
- package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +2 -2
- package/src/components/icons/Print.tsx +6 -2
- package/src/helpers/constants.ts +24 -0
- package/src/helpers/convertDocument.test.ts +67 -0
- package/src/helpers/convertDocument.ts +35 -0
- package/src/helpers/media.test.ts +36 -0
- package/src/helpers/media.ts +39 -12
- package/src/version.ts +1 -1
- package/dist/components/MemoriArtifactSystem/utils/applyEdits.d.ts +0 -8
- package/dist/components/MemoriArtifactSystem/utils/applyEdits.js +0 -117
- package/dist/components/MemoriArtifactSystem/utils/applyEdits.js.map +0 -1
- package/dist/helpers/nats/natsBundled.js +0 -13224
- package/esm/components/MemoriArtifactSystem/utils/applyEdits.d.ts +0 -8
- package/esm/components/MemoriArtifactSystem/utils/applyEdits.js +0 -112
- package/esm/components/MemoriArtifactSystem/utils/applyEdits.js.map +0 -1
- package/esm/helpers/nats/natsBundled.js +0 -13225
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
/* FullPage layout – spacing, typography and structure using global design tokens */
|
|
2
|
+
|
|
3
|
+
.memori-widget.memori-layout-fullpage {
|
|
4
|
+
/* max-width: var(--memori-layout-max-width); */
|
|
5
|
+
/* min-height: 100vh;
|
|
6
|
+
min-height: 100dvh; */
|
|
7
|
+
padding: var(--memori-spacing-md);
|
|
8
|
+
margin-right: auto;
|
|
9
|
+
margin-left: auto;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.memori-widget.memori-layout-fullpage > .memori-spin,
|
|
13
|
+
.memori-widget.memori-layout-fullpage > .memori-widget__surface > .memori-spin {
|
|
14
|
+
display: flex;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
height: 100%;
|
|
17
|
+
min-height: 0;
|
|
18
|
+
flex: 1 1 auto;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: 0;
|
|
21
|
+
}
|
|
22
|
+
/* "Powered by" lives in the conversation footer under the chat input. */
|
|
23
|
+
|
|
24
|
+
/* Header spacing + fullpage chrome (brand + actions bar) */
|
|
25
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-top-header {
|
|
26
|
+
position: relative;
|
|
27
|
+
z-index: 6;
|
|
28
|
+
width: 100%;
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
padding: 0;
|
|
31
|
+
padding-bottom: 0;
|
|
32
|
+
margin-bottom: var(--memori-spacing-sm);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-row,
|
|
36
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-row {
|
|
37
|
+
position: sticky;
|
|
38
|
+
z-index: 6;
|
|
39
|
+
top: 0;
|
|
40
|
+
display: flex;
|
|
41
|
+
width: 100%;
|
|
42
|
+
min-height: 48px;
|
|
43
|
+
flex-wrap: nowrap;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: flex-end;
|
|
46
|
+
padding: var(--memori-spacing-md);
|
|
47
|
+
border-bottom: 1px solid var(--memori-border-color);
|
|
48
|
+
background: transparent;
|
|
49
|
+
gap: var(--memori-spacing-md);
|
|
50
|
+
transition: background-color var(--memori-motion-duration-fast, 0.15s) var(--memori-motion-ease, ease);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* FULLPAGE header shares the same content axis as .memori--grid, so brand,
|
|
54
|
+
actions and the divider stay aligned with the card edges at any width. */
|
|
55
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-row {
|
|
56
|
+
max-width: var(--memori-layout-max-width);
|
|
57
|
+
padding-right: var(--memori-spacing-md);
|
|
58
|
+
padding-left: var(--memori-spacing-md);
|
|
59
|
+
margin-right: auto;
|
|
60
|
+
margin-left: auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-row.memori-header--scrolled,
|
|
64
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-row.memori-header--scrolled,
|
|
65
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--header.memori-header--scrolled,
|
|
66
|
+
.memori-widget.memori-layout-chat .memori-chat-layout--header.memori-header--scrolled,
|
|
67
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-top-header.memori-header--scrolled {
|
|
68
|
+
background: var(--memori-secondary-background);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--header {
|
|
72
|
+
min-width: 100%;
|
|
73
|
+
flex-shrink: 0;
|
|
74
|
+
-webkit-backdrop-filter: none;
|
|
75
|
+
backdrop-filter: none;
|
|
76
|
+
background: transparent;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat--history {
|
|
80
|
+
min-height: 0;
|
|
81
|
+
flex: 1 1 auto;
|
|
82
|
+
border: none;
|
|
83
|
+
border-radius: var(--memori-radius-box);
|
|
84
|
+
margin-bottom: 0;
|
|
85
|
+
background-color: var(--memori-secondary-background);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-brand,
|
|
89
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-brand {
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
min-width: 0;
|
|
93
|
+
flex: 1 1 auto;
|
|
94
|
+
flex-wrap: nowrap;
|
|
95
|
+
align-items: center;
|
|
96
|
+
margin-right: auto;
|
|
97
|
+
gap: 0.625rem;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-text,
|
|
102
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-brand-text {
|
|
103
|
+
display: flex;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
min-width: 0;
|
|
106
|
+
flex: 1 1 auto;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
gap: 0.125rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-icon,
|
|
112
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-brand-icon {
|
|
113
|
+
display: block;
|
|
114
|
+
width: 30px;
|
|
115
|
+
height: 30px;
|
|
116
|
+
flex-shrink: 0;
|
|
117
|
+
border-radius: 50%;
|
|
118
|
+
background: var(--memori-primary);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-icon--avatar,
|
|
122
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-brand-icon--avatar {
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
border: 0;
|
|
125
|
+
background: none;
|
|
126
|
+
box-shadow: none;
|
|
127
|
+
object-fit: cover;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-name,
|
|
131
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-brand-name {
|
|
132
|
+
display: block;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
min-width: 0;
|
|
135
|
+
max-width: 100%;
|
|
136
|
+
color: var(--memori-text-color, #1f2937);
|
|
137
|
+
font-size: 1.05rem;
|
|
138
|
+
font-weight: 700;
|
|
139
|
+
letter-spacing: -0.02em;
|
|
140
|
+
line-height: 1.2;
|
|
141
|
+
text-overflow: ellipsis;
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-role,
|
|
146
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-brand-role {
|
|
147
|
+
display: block;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
min-width: 0;
|
|
150
|
+
max-width: 100%;
|
|
151
|
+
color: color-mix(in srgb, var(--memori-text-color) 72%, transparent);
|
|
152
|
+
font-size: var(--memori-text-size-sm, 0.8125rem);
|
|
153
|
+
font-weight: var(--memori-text-weight-normal, 400);
|
|
154
|
+
line-height: 1.3;
|
|
155
|
+
text-overflow: ellipsis;
|
|
156
|
+
white-space: nowrap;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-actions,
|
|
160
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-actions {
|
|
161
|
+
display: flex;
|
|
162
|
+
min-width: 0;
|
|
163
|
+
flex: 0 0 auto;
|
|
164
|
+
align-items: center;
|
|
165
|
+
justify-content: flex-end;
|
|
166
|
+
margin-left: auto;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* FullPage / Chat / Zoomed header controls: compact square actions + rounded login CTA */
|
|
170
|
+
.memori-widget.memori-layout-fullpage .memori-header.memori-header--fullpage,
|
|
171
|
+
.memori-widget.memori-layout-chat .memori-header.memori-header--fullpage {
|
|
172
|
+
width: auto;
|
|
173
|
+
min-width: 0;
|
|
174
|
+
flex-wrap: nowrap;
|
|
175
|
+
justify-content: flex-end;
|
|
176
|
+
margin-left: auto;
|
|
177
|
+
gap: 0.5rem;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.memori-widget.memori-layout-fullpage .memori-header--fullpage-primary,
|
|
181
|
+
.memori-widget.memori-layout-fullpage .memori-header--fullpage-secondary,
|
|
182
|
+
.memori-widget.memori-layout-chat .memori-header--fullpage-primary,
|
|
183
|
+
.memori-widget.memori-layout-chat .memori-header--fullpage-secondary {
|
|
184
|
+
flex-wrap: nowrap;
|
|
185
|
+
gap: 0.5rem;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.memori-widget.memori-layout-fullpage .memori-header--fullpage-divider,
|
|
189
|
+
.memori-widget.memori-layout-chat .memori-header--fullpage-divider {
|
|
190
|
+
min-height: 26px;
|
|
191
|
+
margin: 0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* CHAT: title block a sinistra, controlli allineati a destra. */
|
|
195
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-row {
|
|
196
|
+
justify-content: flex-end;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-brand {
|
|
200
|
+
margin-right: auto;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-actions {
|
|
204
|
+
flex: 0 0 auto;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Full-height flex row: [grid] [artifact column] — outside the grid so artifact
|
|
208
|
+
spans the entire content height without inheriting grid padding/max-width */
|
|
209
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-content-row {
|
|
210
|
+
display: flex;
|
|
211
|
+
overflow: hidden;
|
|
212
|
+
min-height: 0;
|
|
213
|
+
flex: 1 1 0%;
|
|
214
|
+
flex-direction: row;
|
|
215
|
+
align-items: stretch;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* Grid holds avatar + chat as two separate panels: no outer frame, vertical breathing room. */
|
|
219
|
+
.memori-widget.memori-layout-fullpage .memori--grid {
|
|
220
|
+
display: flex;
|
|
221
|
+
overflow: hidden;
|
|
222
|
+
width: 100%;
|
|
223
|
+
max-width: var(--memori-layout-max-width);
|
|
224
|
+
height: 100%;
|
|
225
|
+
min-height: 0;
|
|
226
|
+
flex: 1 1 0%;
|
|
227
|
+
align-items: stretch;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
padding: var(--memori-spacing-md);
|
|
230
|
+
border: none;
|
|
231
|
+
margin: 0 auto;
|
|
232
|
+
background: var(--memori-secondary-background);
|
|
233
|
+
gap: var(--memori-spacing-md);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Avatar column: its own rounded panel, wider than the chat sidebar it replaced. */
|
|
237
|
+
.memori-widget.memori-layout-fullpage .memori--grid-column-left {
|
|
238
|
+
position: relative;
|
|
239
|
+
display: flex;
|
|
240
|
+
overflow: hidden;
|
|
241
|
+
width: clamp(240px, 34%, 420px);
|
|
242
|
+
height: 100%;
|
|
243
|
+
min-height: 0;
|
|
244
|
+
flex-direction: column;
|
|
245
|
+
flex-shrink: 0;
|
|
246
|
+
align-items: stretch;
|
|
247
|
+
align-self: stretch;
|
|
248
|
+
border: none;
|
|
249
|
+
border-radius: 12px;
|
|
250
|
+
margin-right: 0;
|
|
251
|
+
background: color-mix(in srgb, var(--memori-text-color) 4%, var(--memori-secondary-background));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* Agent status indicator above the avatar. */
|
|
255
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-agent-status {
|
|
256
|
+
display: flex;
|
|
257
|
+
flex-shrink: 0;
|
|
258
|
+
align-items: center;
|
|
259
|
+
justify-content: center;
|
|
260
|
+
padding: var(--memori-spacing-sm) var(--memori-spacing-md);
|
|
261
|
+
color: color-mix(in srgb, var(--memori-text-color) 72%, transparent);
|
|
262
|
+
font-size: var(--memori-text-size-sm, 0.8125rem);
|
|
263
|
+
gap: var(--memori-spacing-xs);
|
|
264
|
+
line-height: 1.2;
|
|
265
|
+
text-align: center;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot {
|
|
269
|
+
display: inline-block;
|
|
270
|
+
width: 8px;
|
|
271
|
+
height: 8px;
|
|
272
|
+
flex-shrink: 0;
|
|
273
|
+
border-radius: 50%;
|
|
274
|
+
background: currentColor;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot-speaking {
|
|
278
|
+
background: var(--memori-primary);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot-processing {
|
|
282
|
+
background: color-mix(in srgb, var(--memori-text-color) 55%, transparent);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot-listening {
|
|
286
|
+
background: var(--memori-primary);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* Cover banner is removed in FULLPAGE — it wastes the most valuable space. */
|
|
290
|
+
.memori-widget.memori-layout-fullpage .memori-chat--cover {
|
|
291
|
+
display: none;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.memori-widget.memori-layout-fullpage .memori--grid-column-left .memori--avatar-wrapper {
|
|
295
|
+
position: relative;
|
|
296
|
+
display: flex;
|
|
297
|
+
width: 100%;
|
|
298
|
+
height: 100%;
|
|
299
|
+
min-height: 0;
|
|
300
|
+
flex: 1 1 0%;
|
|
301
|
+
align-items: stretch;
|
|
302
|
+
justify-content: center;
|
|
303
|
+
padding-top: 0;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.memori-widget.memori-layout-fullpage .memori--grid-column-left .memori--avatar-wrapper model-viewer,
|
|
307
|
+
.memori-widget.memori-layout-fullpage .memori--grid-column-left .memori--avatar-wrapper canvas,
|
|
308
|
+
.memori-widget.memori-layout-fullpage .memori--grid-column-left .memori--avatar-wrapper > div {
|
|
309
|
+
width: 100% !important;
|
|
310
|
+
max-width: 100%;
|
|
311
|
+
height: 100% !important;
|
|
312
|
+
max-height: 100%;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--main {
|
|
316
|
+
display: flex;
|
|
317
|
+
min-width: 0;
|
|
318
|
+
height: 100%;
|
|
319
|
+
min-height: 0;
|
|
320
|
+
flex: 1;
|
|
321
|
+
flex-direction: column;
|
|
322
|
+
align-items: stretch;
|
|
323
|
+
align-self: stretch;
|
|
324
|
+
justify-content: stretch;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/* Artifact column — flex sibling of .memori--grid inside .memori-fullpage-content-row.
|
|
328
|
+
Sits outside the padded grid so it spans the full content height with no padding gaps. */
|
|
329
|
+
.memori-widget.memori-layout-fullpage .memori--grid-column-artifact {
|
|
330
|
+
overflow: hidden;
|
|
331
|
+
width: 0;
|
|
332
|
+
min-width: 0;
|
|
333
|
+
flex-shrink: 0;
|
|
334
|
+
transition: width 0.25s ease;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.memori-widget.memori-layout-fullpage .memori--grid-column-artifact--open {
|
|
338
|
+
width: 700px;
|
|
339
|
+
border-left: 1px solid color-mix(in srgb, var(--memori-text-color, #111827) 10%, transparent);
|
|
340
|
+
background: var(--memori-secondary-background);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* Hide avatar column when artifact drawer is open.
|
|
344
|
+
Selector updated: artifact is now a sibling of .memori--grid, not inside it. */
|
|
345
|
+
.memori-widget.memori-layout-fullpage
|
|
346
|
+
.memori-fullpage-content-row:has(.memori--grid-column-artifact--open)
|
|
347
|
+
.memori--grid-column-left {
|
|
348
|
+
display: none;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
@media (max-width: 1260px) {
|
|
352
|
+
.memori-widget.memori-layout-fullpage .memori--grid-column-artifact {
|
|
353
|
+
display: none;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--controls {
|
|
358
|
+
display: flex;
|
|
359
|
+
width: 100%;
|
|
360
|
+
height: 100%;
|
|
361
|
+
min-height: 0;
|
|
362
|
+
max-height: 100%;
|
|
363
|
+
flex: 1 1 0%;
|
|
364
|
+
flex-direction: column;
|
|
365
|
+
align-items: stretch;
|
|
366
|
+
padding: 0;
|
|
367
|
+
background: var(--memori-secondary-background);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.memori-widget.memori-layout-fullpage .memori-conversation-column {
|
|
371
|
+
display: flex;
|
|
372
|
+
width: 100%;
|
|
373
|
+
max-width: none;
|
|
374
|
+
min-height: 0;
|
|
375
|
+
flex: 1 1 0%;
|
|
376
|
+
flex-direction: column;
|
|
377
|
+
padding-inline: 0;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori--start-panel,
|
|
381
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat--wrapper {
|
|
382
|
+
display: flex;
|
|
383
|
+
width: 100%;
|
|
384
|
+
max-width: 100%;
|
|
385
|
+
height: 100%;
|
|
386
|
+
min-height: 0;
|
|
387
|
+
flex: 1 1 0%;
|
|
388
|
+
flex-direction: column;
|
|
389
|
+
padding: 0 !important;
|
|
390
|
+
margin-right: 0;
|
|
391
|
+
margin-left: 0;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/* Typography: title and description in fullpage left column */
|
|
395
|
+
.memori-widget.memori-layout-fullpage .memori--title {
|
|
396
|
+
margin-bottom: var(--memori-spacing-xs);
|
|
397
|
+
color: var(--memori-text-color);
|
|
398
|
+
font-size: var(--memori-text-size-heading-large);
|
|
399
|
+
font-weight: var(--memori-text-weight-semibold);
|
|
400
|
+
line-height: var(--memori-text-line-tight);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.memori-widget.memori-layout-fullpage .memori--description,
|
|
404
|
+
.memori-widget.memori-layout-fullpage .memori--needsPosition {
|
|
405
|
+
padding: var(--memori-spacing-lg);
|
|
406
|
+
padding-top: var(--memori-spacing-xs);
|
|
407
|
+
color: var(--memori-text-color);
|
|
408
|
+
font-size: var(--memori-text-size-base);
|
|
409
|
+
line-height: var(--memori-text-line-relaxed);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/* Fullpage: Memori brand lives in the header; no footer watermark.
|
|
413
|
+
Input bar styles live in ChatInputs.css (layout-scoped dark pill). */
|
|
414
|
+
|
|
415
|
+
/* Keep the input bar inside the chat panel, pinned to the bottom of the column */
|
|
416
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat--wrapper {
|
|
417
|
+
display: flex;
|
|
418
|
+
min-height: 0;
|
|
419
|
+
flex: 1 1 0%;
|
|
420
|
+
flex-direction: column;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat-inputs-wrapper {
|
|
424
|
+
width: 100%;
|
|
425
|
+
flex-shrink: 0;
|
|
426
|
+
border: none;
|
|
427
|
+
border-radius: 0;
|
|
428
|
+
background: var(--memori-secondary-background);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
@media (max-width: 870px) {
|
|
432
|
+
.memori-widget.memori-layout-fullpage {
|
|
433
|
+
padding: var(--memori-spacing-sm);
|
|
434
|
+
}
|
|
435
|
+
/*
|
|
436
|
+
.memori-widget.memori-layout-fullpage > .memori-spin {
|
|
437
|
+
height: calc(100vh - 100px);
|
|
438
|
+
height: calc(100dvh - 100px);
|
|
439
|
+
gap: var(--memori-spacing-md);
|
|
440
|
+
} */
|
|
441
|
+
|
|
442
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-top-header {
|
|
443
|
+
padding: 0;
|
|
444
|
+
margin-bottom: var(--memori-spacing-md);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.memori-widget.memori-layout-fullpage .memori--grid-column-left {
|
|
448
|
+
display: none;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.memori-widget.memori-layout-fullpage .memori--grid {
|
|
452
|
+
padding: var(--memori-spacing-sm);
|
|
453
|
+
gap: var(--memori-spacing-sm);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--controls {
|
|
457
|
+
padding: 0;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
@media (max-width: 480px) {
|
|
462
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-top-header {
|
|
463
|
+
padding: 0;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-name {
|
|
467
|
+
font-size: 1.1rem;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.memori-widget.memori-layout-fullpage .memori-chat-layout--controls {
|
|
471
|
+
padding: 0;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.memori-widget.memori-layout-fullpage .memori--grid {
|
|
475
|
+
padding: var(--memori-spacing-xs) var(--memori-spacing-sm);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-row,
|
|
479
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-row {
|
|
480
|
+
/* flex-wrap: wrap; */
|
|
481
|
+
align-items: flex-start;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-brand,
|
|
485
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-brand {
|
|
486
|
+
min-width: 0;
|
|
487
|
+
max-width: calc(100% - 6.5rem);
|
|
488
|
+
flex: 1 1 auto;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.memori-widget.memori-layout-fullpage .memori-fullpage-header-actions {
|
|
492
|
+
flex: 0 0 auto;
|
|
493
|
+
justify-content: flex-end;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/* CHAT: keep agent title + toolbar on one row on small phones */
|
|
497
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-row {
|
|
498
|
+
flex-wrap: nowrap;
|
|
499
|
+
align-items: center;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-actions {
|
|
503
|
+
min-width: 0;
|
|
504
|
+
flex: 1 1 auto;
|
|
505
|
+
flex-wrap: nowrap;
|
|
506
|
+
justify-content: flex-end;
|
|
507
|
+
-webkit-overflow-scrolling: touch;
|
|
508
|
+
overflow-x: auto;
|
|
509
|
+
overflow-y: hidden;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-actions .memori-header.memori-header--fullpage {
|
|
513
|
+
min-width: max-content;
|
|
514
|
+
flex-shrink: 0;
|
|
515
|
+
flex-wrap: nowrap;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-actions .memori-icon-button,
|
|
519
|
+
.memori-widget.memori-layout-chat .memori-fullpage-header-actions .memori-button {
|
|
520
|
+
flex-shrink: 0;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
const WidgetSurfaceContext = createContext(null);
|
|
3
|
+
export const WidgetSurfaceProvider = WidgetSurfaceContext.Provider;
|
|
4
|
+
export function useWidgetSurfaceEl() {
|
|
5
|
+
return useContext(WidgetSurfaceContext);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=widgetSurfaceContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetSurfaceContext.js","sourceRoot":"","sources":["../../src/context/widgetSurfaceContext.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAOzD,MAAM,oBAAoB,GAAG,aAAa,CAAqB,IAAI,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,QAAQ,CAAC;AAEnE,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -15,6 +15,7 @@ export declare const getGroupedChatLanguages: () => {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const uiLanguages: string[];
|
|
17
17
|
export declare const officeNativeExtensions: readonly [".doc", ".docx", ".dotx", ".xltx", ".potx"];
|
|
18
|
+
export declare const documentConversionExtensions: readonly [".pdf", ".docm", ".xlsx", ".xlsm", ".xls", ".ods", ".pptx", ".pptm", ".html", ".htm", ".xhtml", ".csv", ".tsv", ".txt", ".md", ".markdown", ".json", ".xml", ".log", ".yml", ".yaml"];
|
|
18
19
|
export declare const allowedMediaTypes: string[];
|
|
19
20
|
export declare const officeMimeShortLabels: Record<string, string>;
|
|
20
21
|
export declare const officeExtensionShortLabels: Record<string, string>;
|
package/esm/helpers/constants.js
CHANGED
|
@@ -44,6 +44,29 @@ export const officeNativeExtensions = [
|
|
|
44
44
|
'.xltx',
|
|
45
45
|
'.potx',
|
|
46
46
|
];
|
|
47
|
+
export const documentConversionExtensions = [
|
|
48
|
+
'.pdf',
|
|
49
|
+
'.docm',
|
|
50
|
+
'.xlsx',
|
|
51
|
+
'.xlsm',
|
|
52
|
+
'.xls',
|
|
53
|
+
'.ods',
|
|
54
|
+
'.pptx',
|
|
55
|
+
'.pptm',
|
|
56
|
+
'.html',
|
|
57
|
+
'.htm',
|
|
58
|
+
'.xhtml',
|
|
59
|
+
'.csv',
|
|
60
|
+
'.tsv',
|
|
61
|
+
'.txt',
|
|
62
|
+
'.md',
|
|
63
|
+
'.markdown',
|
|
64
|
+
'.json',
|
|
65
|
+
'.xml',
|
|
66
|
+
'.log',
|
|
67
|
+
'.yml',
|
|
68
|
+
'.yaml',
|
|
69
|
+
];
|
|
47
70
|
export const allowedMediaTypes = [
|
|
48
71
|
'image/jpeg',
|
|
49
72
|
'image/png',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/helpers/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;IACnC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,uBAAuB,EAAE;IAC/C,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE;IAC/B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;IAClC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE;IACpC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE;IAC/B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;IAClC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;IAClC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;IAChC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;IAClC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;IAC7B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACxC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACj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AAC;SACd;QACD;YACE,IAAI,EAAE,uCAAuC;YAC7C,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,4BAA4B;YAClC,UAAU,EAAE,CAAC;SACd;KACF;IACD,EAAE,EAAE;QACF;YACE,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,EAAE;SACf;QACD;YACE,IAAI,EAAE,0CAA0C;YAChD,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,2BAA2B;YACjC,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,2CAA2C;YACjD,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,mCAAmC;YACzC,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,mCAAmC;YACzC,UAAU,EAAE,CAAC;SACd;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC/C,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/helpers/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;IACnC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,uBAAuB,EAAE;IAC/C,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE;IAC/B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAA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ACE,IAAI,EAAE,0CAA0C;YAChD,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,2BAA2B;YACjC,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,2CAA2C;YACjD,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,mCAAmC;YACzC,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,mCAAmC;YACzC,UAAU,EAAE,CAAC;SACd;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC/C,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const convertDocument: (file: File, sessionID: string, baseUrl?: string) => Promise<string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const convertDocument = async (file, sessionID, baseUrl = '') => {
|
|
2
|
+
if (!sessionID) {
|
|
3
|
+
throw new Error('Session ID is required to convert documents');
|
|
4
|
+
}
|
|
5
|
+
const body = new FormData();
|
|
6
|
+
body.append('file', file);
|
|
7
|
+
const origin = baseUrl.replace(/\/+$/, '');
|
|
8
|
+
const response = await fetch(`${origin}/api/convert/${encodeURIComponent(sessionID)}`, {
|
|
9
|
+
method: 'POST',
|
|
10
|
+
body,
|
|
11
|
+
});
|
|
12
|
+
const payload = (await response
|
|
13
|
+
.json()
|
|
14
|
+
.catch(() => null));
|
|
15
|
+
if (!response.ok || !(payload === null || payload === void 0 ? void 0 : payload.text)) {
|
|
16
|
+
throw new Error((payload === null || payload === void 0 ? void 0 : payload.error) || 'Document conversion failed');
|
|
17
|
+
}
|
|
18
|
+
return payload.text;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=convertDocument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertDocument.js","sourceRoot":"","sources":["../../src/helpers/convertDocument.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAClC,IAAU,EACV,SAAiB,EACjB,OAAO,GAAG,EAAE,EACK,EAAE;IACnB,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAChE;IAED,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;IAC5B,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAE1B,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,GAAG,MAAM,gBAAgB,kBAAkB,CAAC,SAAS,CAAC,EAAE,EACxD;QACE,MAAM,EAAE,MAAM;QACd,IAAI;KACL,CACF,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,MAAM,QAAQ;SAC5B,IAAI,EAAE;SACN,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAmC,CAAC;IAExD,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAA,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,KAAI,4BAA4B,CAAC,CAAC;KACjE;IAED,OAAO,OAAO,CAAC,IAAI,CAAC;AACtB,CAAC,CAAC"}
|
package/esm/helpers/media.js
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
const shouldAppendSessionId = (resourceURI, apiURL) => {
|
|
2
|
+
const url = new URL(resourceURI);
|
|
3
|
+
const { hostname, pathname } = url;
|
|
4
|
+
if (/\/api\/v\d+\/asset\//i.test(pathname)) {
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
if (apiURL) {
|
|
8
|
+
try {
|
|
9
|
+
if (new URL(apiURL).hostname === hostname) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
catch (_a) {
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
};
|
|
1
18
|
export const getResourceUrl = ({ type, resourceURI, sessionID, baseURL = '', apiURL = '', }) => {
|
|
2
19
|
let defaultUri = type === 'cover'
|
|
3
20
|
? `${baseURL}/images/memoriCover.png`
|
|
@@ -13,9 +30,7 @@ export const getResourceUrl = ({ type, resourceURI, sessionID, baseURL = '', api
|
|
|
13
30
|
}
|
|
14
31
|
else if ((resourceURI.startsWith('https://') ||
|
|
15
32
|
resourceURI.startsWith('http://')) &&
|
|
16
|
-
(
|
|
17
|
-
new URL(resourceURI).hostname.includes('aclambda.online') ||
|
|
18
|
-
new URL(resourceURI).hostname.includes('localhost'))) {
|
|
33
|
+
shouldAppendSessionId(resourceURI, apiURL)) {
|
|
19
34
|
return `${resourceURI}${resourceURI.endsWith('/') || !sessionID ? '' : '/'}${sessionID || ''}`;
|
|
20
35
|
}
|
|
21
36
|
else if (resourceURI.startsWith('cloud://')) {
|
package/esm/helpers/media.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/helpers/media.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/helpers/media.ts"],"names":[],"mappings":"AAcA,MAAM,qBAAqB,GAAG,CAC5B,WAAmB,EACnB,MAAe,EACN,EAAE;IACX,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;IACjC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG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C,EAAE;YAC7C,OAAO,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,KAAI,EACvC,eAAe,WAAW,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC;SACxD;aAAM,IAAI,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC5C,OAAO,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,KAAI,EACvC,cAAc,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC;SACtD;aAAM;YACL,OAAO,WAAW,IAAI,UAAU,CAAC;SAClC;KACF;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,WAAW,IAAI,UAAU,CAAC;KAClC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shouldRestartSessionOnPositionPopoverClose(wasOpen: boolean, nextOpen: boolean, autoStart: boolean, sessionAlreadyStarted?: boolean): boolean;
|