@memori.ai/memori-react 8.2.0 → 8.4.0-rc.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 +27 -0
- package/dist/components/Chat/Chat.js +8 -1
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.css +160 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.d.ts +4 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js +166 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js.map +1 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +877 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.d.ts +3 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +115 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.css +238 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.d.ts +4 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js +104 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js.map +1 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.css +319 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.d.ts +4 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.js +50 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.js.map +1 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +343 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.d.ts +4 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +78 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -0
- package/dist/components/MemoriArtifactSystem/context/ArtifactSystemContext.d.ts +12 -0
- package/dist/components/MemoriArtifactSystem/context/ArtifactSystemContext.js +22 -0
- package/dist/components/MemoriArtifactSystem/context/ArtifactSystemContext.js.map +1 -0
- package/dist/components/MemoriArtifactSystem/hooks/useArtifactSystem.d.ts +12 -0
- package/dist/components/MemoriArtifactSystem/hooks/useArtifactSystem.js +288 -0
- package/dist/components/MemoriArtifactSystem/hooks/useArtifactSystem.js.map +1 -0
- package/dist/components/MemoriArtifactSystem/index.d.ts +9 -0
- package/dist/components/MemoriArtifactSystem/index.js +28 -0
- package/dist/components/MemoriArtifactSystem/index.js.map +1 -0
- package/dist/components/MemoriArtifactSystem/types/artifact.types.d.ts +108 -0
- package/dist/components/MemoriArtifactSystem/types/artifact.types.js +31 -0
- package/dist/components/MemoriArtifactSystem/types/artifact.types.js.map +1 -0
- package/dist/components/icons/Print.d.ts +6 -0
- package/dist/components/icons/Print.js +6 -0
- package/dist/components/icons/Print.js.map +1 -0
- package/dist/components/layouts/Chat.js +29 -1
- package/dist/components/layouts/Chat.js.map +1 -1
- package/dist/components/layouts/FullPage.js +33 -1
- package/dist/components/layouts/FullPage.js.map +1 -1
- package/dist/components/layouts/ZoomedFullBody.js +29 -2
- package/dist/components/layouts/ZoomedFullBody.js.map +1 -1
- package/dist/components/layouts/chat.css +335 -13
- package/dist/components/layouts/zoomed-full-body.css +1 -3
- package/dist/helpers/message.js +1 -0
- package/dist/helpers/message.js.map +1 -1
- package/dist/helpers/stt/useSTT.js +76 -9
- package/dist/helpers/stt/useSTT.js.map +1 -1
- package/dist/index.js +58 -15
- package/dist/index.js.map +1 -1
- package/dist/styles.css +5 -0
- package/esm/components/Chat/Chat.js +8 -1
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.css +160 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.d.ts +4 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js +163 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js.map +1 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +877 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.d.ts +3 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +112 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.css +238 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.d.ts +4 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js +101 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js.map +1 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.css +319 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.d.ts +4 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.js +47 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.js.map +1 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +343 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.d.ts +4 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +75 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -0
- package/esm/components/MemoriArtifactSystem/context/ArtifactSystemContext.d.ts +12 -0
- package/esm/components/MemoriArtifactSystem/context/ArtifactSystemContext.js +17 -0
- package/esm/components/MemoriArtifactSystem/context/ArtifactSystemContext.js.map +1 -0
- package/esm/components/MemoriArtifactSystem/hooks/useArtifactSystem.d.ts +12 -0
- package/esm/components/MemoriArtifactSystem/hooks/useArtifactSystem.js +281 -0
- package/esm/components/MemoriArtifactSystem/hooks/useArtifactSystem.js.map +1 -0
- package/esm/components/MemoriArtifactSystem/index.d.ts +9 -0
- package/esm/components/MemoriArtifactSystem/index.js +9 -0
- package/esm/components/MemoriArtifactSystem/index.js.map +1 -0
- package/esm/components/MemoriArtifactSystem/types/artifact.types.d.ts +108 -0
- package/esm/components/MemoriArtifactSystem/types/artifact.types.js +28 -0
- package/esm/components/MemoriArtifactSystem/types/artifact.types.js.map +1 -0
- package/esm/components/icons/Print.d.ts +6 -0
- package/esm/components/icons/Print.js +4 -0
- package/esm/components/icons/Print.js.map +1 -0
- package/esm/components/layouts/Chat.js +29 -1
- package/esm/components/layouts/Chat.js.map +1 -1
- package/esm/components/layouts/FullPage.js +33 -1
- package/esm/components/layouts/FullPage.js.map +1 -1
- package/esm/components/layouts/ZoomedFullBody.js +30 -3
- package/esm/components/layouts/ZoomedFullBody.js.map +1 -1
- package/esm/components/layouts/chat.css +335 -13
- package/esm/components/layouts/zoomed-full-body.css +1 -3
- package/esm/helpers/message.js +1 -0
- package/esm/helpers/message.js.map +1 -1
- package/esm/helpers/stt/useSTT.js +76 -9
- package/esm/helpers/stt/useSTT.js.map +1 -1
- package/esm/index.js +58 -15
- package/esm/index.js.map +1 -1
- package/esm/styles.css +5 -0
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.test.tsx +13 -0
- package/src/components/Chat/Chat.stories.tsx +33 -2
- package/src/components/Chat/Chat.test.tsx +340 -213
- package/src/components/Chat/Chat.tsx +27 -4
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.css +160 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.tsx +278 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +877 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.tsx +308 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.css +238 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.tsx +282 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.css +319 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactHistory/ArtifactHistory.tsx +178 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +343 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +190 -0
- package/src/components/MemoriArtifactSystem/context/ArtifactSystemContext.tsx +57 -0
- package/src/components/MemoriArtifactSystem/hooks/useArtifactSystem.ts +419 -0
- package/src/components/MemoriArtifactSystem/index.ts +45 -0
- package/src/components/MemoriArtifactSystem/types/artifact.types.ts +180 -0
- package/src/components/icons/Print.tsx +34 -0
- package/src/components/layouts/Chat.test.tsx +13 -0
- package/src/components/layouts/Chat.tsx +80 -25
- package/src/components/layouts/FullPage.test.tsx +40 -11
- package/src/components/layouts/FullPage.tsx +92 -24
- package/src/components/layouts/HiddenChat.test.tsx +13 -0
- package/src/components/layouts/Totem.test.tsx +13 -0
- package/src/components/layouts/WebsiteAssistant.test.tsx +13 -0
- package/src/components/layouts/ZoomedFullBody.test.tsx +13 -0
- package/src/components/layouts/ZoomedFullBody.tsx +78 -14
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +252 -248
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +504 -496
- package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +252 -248
- package/src/components/layouts/chat.css +335 -13
- package/src/components/layouts/layouts.stories.tsx +13 -2
- package/src/components/layouts/zoomed-full-body.css +1 -3
- package/src/helpers/message.ts +1 -0
- package/src/helpers/stt/useSTT.ts +101 -16
- package/src/index.stories.tsx +26 -22
- package/src/index.tsx +46 -0
- package/src/mocks/data.ts +258 -0
- package/src/styles.css +5 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useArtifactDetector = exports.useArtifactProcessor = exports.useArtifactCreator = exports.useArtifactSystem = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const artifact_types_1 = require("../types/artifact.types");
|
|
6
|
+
const useArtifactSystem = (config = {}) => {
|
|
7
|
+
console.log('Initializing artifact system with config:', config);
|
|
8
|
+
const mergedConfig = { ...artifact_types_1.DEFAULT_ARTIFACT_CONFIG, ...config };
|
|
9
|
+
const [state, setState] = (0, react_1.useState)({
|
|
10
|
+
history: [],
|
|
11
|
+
currentArtifact: null,
|
|
12
|
+
isDrawerOpen: false,
|
|
13
|
+
isFullscreen: false,
|
|
14
|
+
processedArtifacts: new Set(['artifact-1', 'artifact-2']),
|
|
15
|
+
artifactCounter: 2,
|
|
16
|
+
});
|
|
17
|
+
const processedArtifactsRef = (0, react_1.useRef)(new Set());
|
|
18
|
+
(0, react_1.useEffect)(() => {
|
|
19
|
+
console.log('Updating processed artifacts ref:', state.processedArtifacts);
|
|
20
|
+
processedArtifactsRef.current = state.processedArtifacts;
|
|
21
|
+
}, [state.processedArtifacts]);
|
|
22
|
+
const addArtifact = (0, react_1.useCallback)((artifact) => {
|
|
23
|
+
console.log('Adding artifact:', artifact);
|
|
24
|
+
setState(prevState => {
|
|
25
|
+
const existingIndex = prevState.history.findIndex(item => item.id === artifact.id);
|
|
26
|
+
let newHistory;
|
|
27
|
+
if (existingIndex >= 0) {
|
|
28
|
+
console.log('Updating existing artifact at index:', existingIndex);
|
|
29
|
+
newHistory = [...prevState.history];
|
|
30
|
+
newHistory[existingIndex] = { ...artifact, isActive: false };
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
console.log('Adding new artifact to history');
|
|
34
|
+
newHistory = [
|
|
35
|
+
{ ...artifact, isActive: false },
|
|
36
|
+
...prevState.history.slice(0, (mergedConfig.maxHistoryItems || 50) - 1)
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
...prevState,
|
|
41
|
+
history: newHistory,
|
|
42
|
+
artifactCounter: prevState.artifactCounter + 1,
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}, [mergedConfig.maxHistoryItems]);
|
|
46
|
+
const selectArtifact = (0, react_1.useCallback)((artifact) => {
|
|
47
|
+
console.log('Selecting artifact:', artifact);
|
|
48
|
+
setState(prevState => {
|
|
49
|
+
const newHistory = prevState.history.map(item => ({
|
|
50
|
+
...item,
|
|
51
|
+
isActive: item.id === artifact.id,
|
|
52
|
+
}));
|
|
53
|
+
return {
|
|
54
|
+
...prevState,
|
|
55
|
+
currentArtifact: artifact,
|
|
56
|
+
isDrawerOpen: true,
|
|
57
|
+
history: newHistory,
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
}, []);
|
|
61
|
+
const closeDrawer = (0, react_1.useCallback)(() => {
|
|
62
|
+
console.log('Closing artifact drawer');
|
|
63
|
+
setState(prevState => ({
|
|
64
|
+
...prevState,
|
|
65
|
+
isDrawerOpen: false,
|
|
66
|
+
isFullscreen: false,
|
|
67
|
+
currentArtifact: null,
|
|
68
|
+
history: prevState.history.map(item => ({ ...item, isActive: false })),
|
|
69
|
+
}));
|
|
70
|
+
}, []);
|
|
71
|
+
const toggleFullscreen = (0, react_1.useCallback)(() => {
|
|
72
|
+
console.log('Toggling fullscreen mode');
|
|
73
|
+
setState(prevState => ({
|
|
74
|
+
...prevState,
|
|
75
|
+
isFullscreen: !prevState.isFullscreen,
|
|
76
|
+
}));
|
|
77
|
+
}, []);
|
|
78
|
+
const clearHistory = (0, react_1.useCallback)(() => {
|
|
79
|
+
console.log('Clearing artifact history');
|
|
80
|
+
setState(prevState => ({
|
|
81
|
+
...prevState,
|
|
82
|
+
history: [],
|
|
83
|
+
currentArtifact: null,
|
|
84
|
+
isDrawerOpen: false,
|
|
85
|
+
isFullscreen: false,
|
|
86
|
+
processedArtifacts: new Set(),
|
|
87
|
+
artifactCounter: 0,
|
|
88
|
+
}));
|
|
89
|
+
processedArtifactsRef.current.clear();
|
|
90
|
+
}, []);
|
|
91
|
+
const removeArtifact = (0, react_1.useCallback)((id) => {
|
|
92
|
+
console.log('Removing artifact:', id);
|
|
93
|
+
setState(prevState => {
|
|
94
|
+
var _a;
|
|
95
|
+
const newHistory = prevState.history.filter(item => item.id !== id);
|
|
96
|
+
const isRemovingCurrent = ((_a = prevState.currentArtifact) === null || _a === void 0 ? void 0 : _a.id) === id;
|
|
97
|
+
return {
|
|
98
|
+
...prevState,
|
|
99
|
+
history: newHistory,
|
|
100
|
+
currentArtifact: isRemovingCurrent ? null : prevState.currentArtifact,
|
|
101
|
+
isDrawerOpen: isRemovingCurrent ? false : prevState.isDrawerOpen,
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
}, []);
|
|
105
|
+
const actions = {
|
|
106
|
+
addArtifact,
|
|
107
|
+
selectArtifact,
|
|
108
|
+
closeDrawer,
|
|
109
|
+
toggleFullscreen,
|
|
110
|
+
clearHistory,
|
|
111
|
+
removeArtifact,
|
|
112
|
+
};
|
|
113
|
+
return {
|
|
114
|
+
state,
|
|
115
|
+
actions,
|
|
116
|
+
config: mergedConfig,
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
exports.useArtifactSystem = useArtifactSystem;
|
|
120
|
+
const useArtifactCreator = () => {
|
|
121
|
+
const generateId = (0, react_1.useCallback)((content, mimeType) => {
|
|
122
|
+
console.log('Generating ID for content type:', mimeType);
|
|
123
|
+
const timestamp = Date.now();
|
|
124
|
+
const hash = content.substring(0, 100).split('').reduce((a, b) => {
|
|
125
|
+
a = ((a << 5) - a) + b.charCodeAt(0);
|
|
126
|
+
return a & a;
|
|
127
|
+
}, 0);
|
|
128
|
+
return `artifact-${mimeType}-${Math.abs(hash)}-${timestamp}`;
|
|
129
|
+
}, []);
|
|
130
|
+
const createArtifact = (0, react_1.useCallback)((content, mimeType, customTitle, messageID) => {
|
|
131
|
+
console.log('Creating artifact:', { mimeType, customTitle, messageID });
|
|
132
|
+
const typeInfo = artifact_types_1.SUPPORTED_MIME_TYPES[mimeType] || {
|
|
133
|
+
name: mimeType.toUpperCase(),
|
|
134
|
+
icon: '📄',
|
|
135
|
+
hasPreview: false,
|
|
136
|
+
language: 'text',
|
|
137
|
+
mimeType: 'text/plain',
|
|
138
|
+
};
|
|
139
|
+
const title = customTitle || `${typeInfo.icon} ${typeInfo.name} Artifact`;
|
|
140
|
+
const id = generateId(content, mimeType);
|
|
141
|
+
return {
|
|
142
|
+
id,
|
|
143
|
+
content,
|
|
144
|
+
mimeType: mimeType,
|
|
145
|
+
typeInfo,
|
|
146
|
+
title,
|
|
147
|
+
customTitle,
|
|
148
|
+
messageID: messageID || '',
|
|
149
|
+
timestamp: new Date(),
|
|
150
|
+
size: content.length,
|
|
151
|
+
};
|
|
152
|
+
}, [generateId]);
|
|
153
|
+
return { createArtifact };
|
|
154
|
+
};
|
|
155
|
+
exports.useArtifactCreator = useArtifactCreator;
|
|
156
|
+
const useArtifactProcessor = () => {
|
|
157
|
+
const processedArtifacts = (0, react_1.useRef)(new Set());
|
|
158
|
+
const generateContentHash = (0, react_1.useCallback)((content) => {
|
|
159
|
+
console.log('Generating content hash');
|
|
160
|
+
let hash = 0;
|
|
161
|
+
const str = content.substring(0, 500);
|
|
162
|
+
for (let i = 0; i < str.length; i++) {
|
|
163
|
+
const char = str.charCodeAt(i);
|
|
164
|
+
hash = ((hash << 5) - hash) + char;
|
|
165
|
+
hash = hash & hash;
|
|
166
|
+
}
|
|
167
|
+
return hash.toString();
|
|
168
|
+
}, []);
|
|
169
|
+
const removeThinkTags = (0, react_1.useCallback)((text) => {
|
|
170
|
+
console.log('Removing think tags from text');
|
|
171
|
+
return text.replace(/<think>[\s\S]*?<\/think>/gi, '');
|
|
172
|
+
}, []);
|
|
173
|
+
const isValidArtifact = (0, react_1.useCallback)((content, mimeType) => {
|
|
174
|
+
console.log('Validating artifact:', { mimeType, contentLength: content.length });
|
|
175
|
+
if (content.length < 50) {
|
|
176
|
+
console.log('Artifact too small');
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
if (mimeType === 'html') {
|
|
180
|
+
if (!content.includes('<!DOCTYPE') && !content.includes('<html')) {
|
|
181
|
+
console.log('Invalid HTML: missing DOCTYPE or html tag');
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
if (content.includes('<!DOCTYPE') && !content.includes('</html>')) {
|
|
185
|
+
console.log('Invalid HTML: unclosed html tag');
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (mimeType === 'json') {
|
|
190
|
+
try {
|
|
191
|
+
JSON.parse(content);
|
|
192
|
+
}
|
|
193
|
+
catch (e) {
|
|
194
|
+
console.log('Invalid JSON:', e);
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return true;
|
|
199
|
+
}, []);
|
|
200
|
+
const cleanArtifactContent = (0, react_1.useCallback)((content, mimeType) => {
|
|
201
|
+
console.log('Cleaning artifact content:', { mimeType });
|
|
202
|
+
if (!content)
|
|
203
|
+
return '';
|
|
204
|
+
content = content.replace(/<\/output>/gi, '');
|
|
205
|
+
if (mimeType === 'html') {
|
|
206
|
+
if (content.includes('<!DOCTYPE html') && !content.includes('</html>')) {
|
|
207
|
+
content += '\n</html>';
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (mimeType === 'json') {
|
|
211
|
+
try {
|
|
212
|
+
JSON.parse(content);
|
|
213
|
+
}
|
|
214
|
+
catch (e) {
|
|
215
|
+
console.log('Failed to parse JSON:', e);
|
|
216
|
+
return '';
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return content.trim();
|
|
220
|
+
}, []);
|
|
221
|
+
const processArtifactContent = (0, react_1.useCallback)((emission, onArtifactFound) => {
|
|
222
|
+
console.log('Processing artifact content');
|
|
223
|
+
if (!emission || typeof emission !== 'string')
|
|
224
|
+
return false;
|
|
225
|
+
let processed = false;
|
|
226
|
+
const cleanedEmission = removeThinkTags(emission);
|
|
227
|
+
const outputRegex = /<output\s+class\s*=\s*["\']memori-artifact["\'][^>]*data-mimetype\s*=\s*["\']([^"']+)["\'][^>]*>([\s\S]*?)(?:<\/output>|$)/gi;
|
|
228
|
+
const foundArtifacts = [];
|
|
229
|
+
let match;
|
|
230
|
+
while ((match = outputRegex.exec(cleanedEmission)) !== null) {
|
|
231
|
+
console.log('Found artifact match:', { mimeType: match[1] });
|
|
232
|
+
const fullTag = match[0];
|
|
233
|
+
const mimeType = match[1];
|
|
234
|
+
let content = match[2].trim();
|
|
235
|
+
const titleMatch = fullTag.match(/data-title\s*=\s*["\']([^"']+)["\']/i);
|
|
236
|
+
const extractedTitle = titleMatch ? titleMatch[1] : undefined;
|
|
237
|
+
console.log('Extracted title:', extractedTitle);
|
|
238
|
+
content = cleanArtifactContent(content, mimeType);
|
|
239
|
+
if (!content || !isValidArtifact(content, mimeType)) {
|
|
240
|
+
console.log('Skipping invalid artifact');
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
foundArtifacts.push({
|
|
244
|
+
fullMatch: match[0],
|
|
245
|
+
mimeType,
|
|
246
|
+
content,
|
|
247
|
+
size: content.length,
|
|
248
|
+
extractedTitle,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
foundArtifacts.sort((a, b) => b.size - a.size);
|
|
252
|
+
const uniqueByType = new Map();
|
|
253
|
+
for (const artifact of foundArtifacts) {
|
|
254
|
+
if (!uniqueByType.has(artifact.mimeType)) {
|
|
255
|
+
uniqueByType.set(artifact.mimeType, artifact);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
for (const artifact of uniqueByType.values()) {
|
|
259
|
+
const hash = generateContentHash(artifact.fullMatch);
|
|
260
|
+
if (!processedArtifacts.current.has(hash)) {
|
|
261
|
+
console.log('Processing new artifact:', { mimeType: artifact.mimeType, hash });
|
|
262
|
+
processedArtifacts.current.add(hash);
|
|
263
|
+
onArtifactFound(artifact.content, artifact.mimeType, artifact.extractedTitle);
|
|
264
|
+
processed = true;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return processed;
|
|
268
|
+
}, [removeThinkTags, cleanArtifactContent, isValidArtifact, generateContentHash]);
|
|
269
|
+
return {
|
|
270
|
+
processArtifactContent,
|
|
271
|
+
processedArtifacts: processedArtifacts.current,
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
exports.useArtifactProcessor = useArtifactProcessor;
|
|
275
|
+
const useArtifactDetector = () => {
|
|
276
|
+
const hasArtifacts = (0, react_1.useCallback)((messageText) => {
|
|
277
|
+
console.log('Checking for artifacts in message');
|
|
278
|
+
if (!messageText || typeof messageText !== 'string') {
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
281
|
+
const cleanedText = messageText.replace(/<think>[\s\S]*?<\/think>/gi, '');
|
|
282
|
+
const outputRegex = /<output\s+class\s*=\s*["\']memori-artifact["\'][^>]*data-mimetype\s*=\s*["\']([^"']+)["\'][^>]*>([\s\S]*?)(?:<\/output>|$)/gi;
|
|
283
|
+
return outputRegex.test(cleanedText);
|
|
284
|
+
}, []);
|
|
285
|
+
return { hasArtifacts };
|
|
286
|
+
};
|
|
287
|
+
exports.useArtifactDetector = useArtifactDetector;
|
|
288
|
+
//# sourceMappingURL=useArtifactSystem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useArtifactSystem.js","sourceRoot":"","sources":["../../../../src/components/MemoriArtifactSystem/hooks/useArtifactSystem.ts"],"names":[],"mappings":";;;AAKA,iCAAiE;AACjE,4DASiC;AAK1B,MAAM,iBAAiB,GAAG,CAAC,SAAwC,EAAE,EAAsB,EAAE;IAClG,OAAO,CAAC,GAAG,CAAC,2CAA2C,EA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;gBAC9E,SAAS,GAAG,IAAI,CAAC;aAClB;SACF;QAGD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAElF,OAAO;QACL,sBAAsB;QACtB,kBAAkB,EAAE,kBAAkB,CAAC,OAAO;KAC/C,CAAC;AACJ,CAAC,CAAC;AA9KW,QAAA,oBAAoB,wBA8K/B;AAKK,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,YAAY,GAAG,IAAA,mBAAW,EAAC,CAAC,WAAmB,EAAW,EAAE;QAChE,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,IAAI,CAAC,WAAW,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnD,OAAO,KAAK,CAAC;SACd;QAGD,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,4BAA4B,EAAE,EAAE,CAAC,CAAC;QAG1E,MAAM,WAAW,GAAG,8HAA8H,CAAC;QAEnJ,OAAO,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,EAAE,YAAY,EAAE,CAAC;AAC1B,CAAC,CAAC;AAjBW,QAAA,mBAAmB,uBAiB9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as ArtifactDrawer } from './components/ArtifactDrawer/ArtifactDrawer';
|
|
2
|
+
export { default as ArtifactActions } from './components/ArtifactActions/ArtifactActions';
|
|
3
|
+
export { default as ArtifactPreview } from './components/ArtifactPreview/ArtifactPreview';
|
|
4
|
+
export { default as ArtifactHistory } from './components/ArtifactHistory/ArtifactHistory';
|
|
5
|
+
export { default as ArtifactHandler } from './components/ArtifactHandler/ArtifactHandler';
|
|
6
|
+
export { useArtifactSystem, useArtifactCreator, useArtifactProcessor } from './hooks/useArtifactSystem';
|
|
7
|
+
export { ArtifactSystemProvider, useArtifactSystemContext, ArtifactSystemContext } from './context/ArtifactSystemContext';
|
|
8
|
+
export type { ArtifactMimeType, ArtifactTypeInfo, ArtifactData, ArtifactHistoryEntry, ArtifactActionsProps, ArtifactPreviewProps, ArtifactHistoryProps, ArtifactHandlerProps, ArtifactSystemConfig, ArtifactSystemState, ArtifactSystemActions, ArtifactSystemHook, ArtifactEvent, MemoriNewDialogStateEvent, ArtifactTab, ArtifactValidationResult, ArtifactProcessingOptions, } from './types/artifact.types';
|
|
9
|
+
export { DEFAULT_ARTIFACT_CONFIG, SUPPORTED_MIME_TYPES } from './types/artifact.types';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SUPPORTED_MIME_TYPES = exports.DEFAULT_ARTIFACT_CONFIG = exports.ArtifactSystemContext = exports.useArtifactSystemContext = exports.ArtifactSystemProvider = exports.useArtifactProcessor = exports.useArtifactCreator = exports.useArtifactSystem = exports.ArtifactHandler = exports.ArtifactHistory = exports.ArtifactPreview = exports.ArtifactActions = exports.ArtifactDrawer = void 0;
|
|
7
|
+
var ArtifactDrawer_1 = require("./components/ArtifactDrawer/ArtifactDrawer");
|
|
8
|
+
Object.defineProperty(exports, "ArtifactDrawer", { enumerable: true, get: function () { return __importDefault(ArtifactDrawer_1).default; } });
|
|
9
|
+
var ArtifactActions_1 = require("./components/ArtifactActions/ArtifactActions");
|
|
10
|
+
Object.defineProperty(exports, "ArtifactActions", { enumerable: true, get: function () { return __importDefault(ArtifactActions_1).default; } });
|
|
11
|
+
var ArtifactPreview_1 = require("./components/ArtifactPreview/ArtifactPreview");
|
|
12
|
+
Object.defineProperty(exports, "ArtifactPreview", { enumerable: true, get: function () { return __importDefault(ArtifactPreview_1).default; } });
|
|
13
|
+
var ArtifactHistory_1 = require("./components/ArtifactHistory/ArtifactHistory");
|
|
14
|
+
Object.defineProperty(exports, "ArtifactHistory", { enumerable: true, get: function () { return __importDefault(ArtifactHistory_1).default; } });
|
|
15
|
+
var ArtifactHandler_1 = require("./components/ArtifactHandler/ArtifactHandler");
|
|
16
|
+
Object.defineProperty(exports, "ArtifactHandler", { enumerable: true, get: function () { return __importDefault(ArtifactHandler_1).default; } });
|
|
17
|
+
var useArtifactSystem_1 = require("./hooks/useArtifactSystem");
|
|
18
|
+
Object.defineProperty(exports, "useArtifactSystem", { enumerable: true, get: function () { return useArtifactSystem_1.useArtifactSystem; } });
|
|
19
|
+
Object.defineProperty(exports, "useArtifactCreator", { enumerable: true, get: function () { return useArtifactSystem_1.useArtifactCreator; } });
|
|
20
|
+
Object.defineProperty(exports, "useArtifactProcessor", { enumerable: true, get: function () { return useArtifactSystem_1.useArtifactProcessor; } });
|
|
21
|
+
var ArtifactSystemContext_1 = require("./context/ArtifactSystemContext");
|
|
22
|
+
Object.defineProperty(exports, "ArtifactSystemProvider", { enumerable: true, get: function () { return ArtifactSystemContext_1.ArtifactSystemProvider; } });
|
|
23
|
+
Object.defineProperty(exports, "useArtifactSystemContext", { enumerable: true, get: function () { return ArtifactSystemContext_1.useArtifactSystemContext; } });
|
|
24
|
+
Object.defineProperty(exports, "ArtifactSystemContext", { enumerable: true, get: function () { return ArtifactSystemContext_1.ArtifactSystemContext; } });
|
|
25
|
+
var artifact_types_1 = require("./types/artifact.types");
|
|
26
|
+
Object.defineProperty(exports, "DEFAULT_ARTIFACT_CONFIG", { enumerable: true, get: function () { return artifact_types_1.DEFAULT_ARTIFACT_CONFIG; } });
|
|
27
|
+
Object.defineProperty(exports, "SUPPORTED_MIME_TYPES", { enumerable: true, get: function () { return artifact_types_1.SUPPORTED_MIME_TYPES; } });
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MemoriArtifactSystem/index.ts"],"names":[],"mappings":";;;;;;AAMA,6EAAuF;AAA9E,iIAAA,OAAO,OAAkB;AAClC,gFAA0F;AAAjF,mIAAA,OAAO,OAAmB;AACnC,gFAA0F;AAAjF,mIAAA,OAAO,OAAmB;AACnC,gFAA0F;AAAjF,mIAAA,OAAO,OAAmB;AACnC,gFAA0F;AAAjF,mIAAA,OAAO,OAAmB;AAGnC,+DAAwG;AAA/F,sHAAA,iBAAiB,OAAA;AAAE,uHAAA,kBAAkB,OAAA;AAAE,yHAAA,oBAAoB,OAAA;AAGpE,yEAIyC;AAHvC,+HAAA,sBAAsB,OAAA;AACtB,iIAAA,wBAAwB,OAAA;AACxB,8HAAA,qBAAqB,OAAA;AAyBvB,yDAAuF;AAA9E,yHAAA,uBAAuB,OAAA;AAAE,sHAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Message } from "@memori.ai/memori-api-client/dist/types";
|
|
2
|
+
export type ArtifactMimeType = 'html' | 'json' | 'markdown' | 'css' | 'javascript' | 'typescript' | 'svg' | 'xml' | 'text' | 'python' | 'java' | 'cpp' | 'csharp' | 'php' | 'ruby' | 'go' | 'rust' | 'yaml' | 'sql';
|
|
3
|
+
export interface ArtifactTypeInfo {
|
|
4
|
+
name: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
hasPreview: boolean;
|
|
7
|
+
language: string;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ArtifactData {
|
|
11
|
+
id: string;
|
|
12
|
+
content: string;
|
|
13
|
+
mimeType: ArtifactMimeType;
|
|
14
|
+
typeInfo: ArtifactTypeInfo;
|
|
15
|
+
title: string;
|
|
16
|
+
customTitle?: string;
|
|
17
|
+
messageID: string;
|
|
18
|
+
timestamp: Date;
|
|
19
|
+
size: number;
|
|
20
|
+
}
|
|
21
|
+
export interface ArtifactHistoryEntry extends ArtifactData {
|
|
22
|
+
isActive?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ArtifactActionsProps {
|
|
25
|
+
artifact: ArtifactData;
|
|
26
|
+
onCopy: () => void;
|
|
27
|
+
onDownload: () => void;
|
|
28
|
+
onPrint: () => void;
|
|
29
|
+
onOpenExternal: () => void;
|
|
30
|
+
onToggleFullscreen: () => void;
|
|
31
|
+
isFullscreen: boolean;
|
|
32
|
+
loading?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ArtifactPreviewProps {
|
|
35
|
+
artifact: ArtifactData;
|
|
36
|
+
activeTab: 'code' | 'preview';
|
|
37
|
+
onTabChange: (tab: 'code' | 'preview') => void;
|
|
38
|
+
showLineNumbers?: boolean;
|
|
39
|
+
enableSyntaxHighlighting?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface ArtifactHistoryProps {
|
|
42
|
+
history: ArtifactHistoryEntry[];
|
|
43
|
+
onSelectArtifact: (artifact: ArtifactData) => void;
|
|
44
|
+
onClearHistory?: () => void;
|
|
45
|
+
maxItems?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface ArtifactHandlerProps {
|
|
48
|
+
artifact?: ArtifactData | null;
|
|
49
|
+
artifacts?: ArtifactHistoryEntry[];
|
|
50
|
+
content?: string;
|
|
51
|
+
mimeType?: ArtifactMimeType;
|
|
52
|
+
config: ArtifactSystemConfig;
|
|
53
|
+
actions: ArtifactSystemActions;
|
|
54
|
+
message: Message;
|
|
55
|
+
customTitle?: string;
|
|
56
|
+
onArtifactCreated?: (artifact: ArtifactData) => void;
|
|
57
|
+
}
|
|
58
|
+
export interface ArtifactSystemConfig {
|
|
59
|
+
maxHistoryItems?: number;
|
|
60
|
+
enableSyntaxHighlighting?: boolean;
|
|
61
|
+
showLineNumbers?: boolean;
|
|
62
|
+
autoOpenArtifacts?: boolean;
|
|
63
|
+
supportedMimeTypes?: Partial<Record<ArtifactMimeType, ArtifactTypeInfo>>;
|
|
64
|
+
}
|
|
65
|
+
export interface ArtifactSystemState {
|
|
66
|
+
history: ArtifactHistoryEntry[];
|
|
67
|
+
currentArtifact: ArtifactData | null;
|
|
68
|
+
isDrawerOpen: boolean;
|
|
69
|
+
isFullscreen: boolean;
|
|
70
|
+
processedArtifacts: Set<string>;
|
|
71
|
+
artifactCounter: number;
|
|
72
|
+
}
|
|
73
|
+
export interface ArtifactSystemActions {
|
|
74
|
+
addArtifact: (artifact: ArtifactData) => void;
|
|
75
|
+
selectArtifact: (artifact: ArtifactData) => void;
|
|
76
|
+
closeDrawer: () => void;
|
|
77
|
+
toggleFullscreen: () => void;
|
|
78
|
+
clearHistory: () => void;
|
|
79
|
+
removeArtifact: (id: string) => void;
|
|
80
|
+
}
|
|
81
|
+
export interface ArtifactSystemHook {
|
|
82
|
+
state: ArtifactSystemState;
|
|
83
|
+
actions: ArtifactSystemActions;
|
|
84
|
+
config: ArtifactSystemConfig;
|
|
85
|
+
}
|
|
86
|
+
export interface ArtifactEvent {
|
|
87
|
+
type: 'artifact-created' | 'artifact-selected' | 'artifact-closed' | 'history-cleared';
|
|
88
|
+
payload: any;
|
|
89
|
+
}
|
|
90
|
+
export interface MemoriNewDialogStateEvent extends CustomEvent {
|
|
91
|
+
detail: {
|
|
92
|
+
emission?: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export type ArtifactTab = 'code' | 'preview';
|
|
96
|
+
export interface ArtifactValidationResult {
|
|
97
|
+
isValid: boolean;
|
|
98
|
+
errors: string[];
|
|
99
|
+
warnings: string[];
|
|
100
|
+
}
|
|
101
|
+
export interface ArtifactProcessingOptions {
|
|
102
|
+
removeThinkTags?: boolean;
|
|
103
|
+
validateContent?: boolean;
|
|
104
|
+
deduplicate?: boolean;
|
|
105
|
+
minContentLength?: number;
|
|
106
|
+
}
|
|
107
|
+
export declare const DEFAULT_ARTIFACT_CONFIG: ArtifactSystemConfig;
|
|
108
|
+
export declare const SUPPORTED_MIME_TYPES: Record<ArtifactMimeType, ArtifactTypeInfo>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUPPORTED_MIME_TYPES = exports.DEFAULT_ARTIFACT_CONFIG = void 0;
|
|
4
|
+
exports.DEFAULT_ARTIFACT_CONFIG = {
|
|
5
|
+
maxHistoryItems: 50,
|
|
6
|
+
enableSyntaxHighlighting: true,
|
|
7
|
+
showLineNumbers: false,
|
|
8
|
+
autoOpenArtifacts: true,
|
|
9
|
+
};
|
|
10
|
+
exports.SUPPORTED_MIME_TYPES = {
|
|
11
|
+
html: { name: 'HTML', icon: '🌐', hasPreview: true, language: 'html', mimeType: 'application/xml' },
|
|
12
|
+
json: { name: 'JSON', icon: '📊', hasPreview: false, language: 'json', mimeType: 'application/json' },
|
|
13
|
+
markdown: { name: 'Markdown', icon: '📝', hasPreview: true, language: 'markdown', mimeType: 'text/markdown' },
|
|
14
|
+
css: { name: 'CSS', icon: '🎨', hasPreview: true, language: 'css', mimeType: 'text/css' },
|
|
15
|
+
javascript: { name: 'JavaScript', icon: '⚡', hasPreview: false, language: 'javascript', mimeType: 'text/javascript' },
|
|
16
|
+
typescript: { name: 'TypeScript', icon: '🔷', hasPreview: false, language: 'typescript', mimeType: 'text/typescript' },
|
|
17
|
+
svg: { name: 'SVG', icon: '🖼️', hasPreview: true, language: 'xml', mimeType: 'image/svg+xml' },
|
|
18
|
+
xml: { name: 'XML', icon: '📋', hasPreview: false, language: 'xml', mimeType: 'text/xml' },
|
|
19
|
+
text: { name: 'Text', icon: '📄', hasPreview: false, language: 'text', mimeType: 'text/plain' },
|
|
20
|
+
python: { name: 'Python', icon: '🐍', hasPreview: false, language: 'python', mimeType: 'text/x-python' },
|
|
21
|
+
java: { name: 'Java', icon: '☕', hasPreview: false, language: 'java', mimeType: 'text/x-java' },
|
|
22
|
+
cpp: { name: 'C++', icon: '⚙️', hasPreview: false, language: 'cpp', mimeType: 'text/x-c++' },
|
|
23
|
+
csharp: { name: 'C#', icon: '🔷', hasPreview: false, language: 'csharp', mimeType: 'text/x-csharp' },
|
|
24
|
+
php: { name: 'PHP', icon: '🐘', hasPreview: false, language: 'php', mimeType: 'text/x-php' },
|
|
25
|
+
ruby: { name: 'Ruby', icon: '💎', hasPreview: false, language: 'ruby', mimeType: 'text/x-ruby' },
|
|
26
|
+
go: { name: 'Go', icon: '🐹', hasPreview: false, language: 'go', mimeType: 'text/x-go' },
|
|
27
|
+
rust: { name: 'Rust', icon: '🦀', hasPreview: false, language: 'rust', mimeType: 'text/x-rust' },
|
|
28
|
+
yaml: { name: 'YAML', icon: '📝', hasPreview: false, language: 'yaml', mimeType: 'text/yaml' },
|
|
29
|
+
sql: { name: 'SQL', icon: '🗄️', hasPreview: false, language: 'sql', mimeType: 'text/x-sql' },
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=artifact.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact.types.js","sourceRoot":"","sources":["../../../../src/components/MemoriArtifactSystem/types/artifact.types.ts"],"names":[],"mappings":";;;AAwJa,QAAA,uBAAuB,GAAyB;IAC3D,eAAe,EAAE,EAAE;IACnB,wBAAwB,EAAE,IAAI;IAC9B,eAAe,EAAE,KAAK;IACtB,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAEW,QAAA,oBAAoB,GAA+C;IAC9E,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE;IACnG,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE;IACrG,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,UA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
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const PrintIcon = ({ className, title }) => ((0, jsx_runtime_1.jsxs)("svg", { ...(!title ? { 'aria-hidden': 'true' } : {}), "aria-label": title, className: className, viewBox: "0 -2 32 32", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("title", { children: title }), (0, jsx_runtime_1.jsx)("desc", { children: "Created with Sketch Beta." }), (0, jsx_runtime_1.jsx)("defs", {}), (0, jsx_runtime_1.jsx)("g", { id: "Page-1", stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd", children: (0, jsx_runtime_1.jsx)("g", { id: "Icon-Set", transform: "translate(-100.000000, -205.000000)", fill: "#000000", children: (0, jsx_runtime_1.jsx)("path", { d: "M130,226 C130,227.104 129.104,228 128,228 L125.858,228 C125.413,226.278 123.862,225 122,225 L110,225 C108.138,225 106.587,226.278 106.142,228 L104,228 C102.896,228 102,227.104 102,226 L102,224 C102,222.896 102.896,222 104,222 L128,222 C129.104,222 130,222.896 130,224 L130,226 L130,226 Z M122,231 L110,231 C108.896,231 108,230.104 108,229 C108,227.896 108.896,227 110,227 L122,227 C123.104,227 124,227.896 124,229 C124,230.104 123.104,231 122,231 L122,231 Z M108,209 C108,207.896 108.896,207 110,207 L122,207 C123.104,207 124,207.896 124,209 L124,220 L108,220 L108,209 L108,209 Z M128,220 L126,220 L126,209 C126,206.791 124.209,205 122,205 L110,205 C107.791,205 106,206.791 106,209 L106,220 L104,220 C101.791,220 100,221.791 100,224 L100,226 C100,228.209 101.791,230 104,230 L106.142,230 C106.587,231.723 108.138,233 110,233 L122,233 C123.862,233 125.413,231.723 125.858,230 L128,230 C130.209,230 132,228.209 132,226 L132,224 C132,221.791 130.209,220 128,220 L128,220 Z", id: "print" }) }) })] }));
|
|
5
|
+
exports.default = PrintIcon;
|
|
6
|
+
//# sourceMappingURL=Print.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Print.js","sourceRoot":"","sources":["../../../src/components/icons/Print.tsx"],"names":[],"mappings":";;;AACA,MAAM,SAAS,GAAqD,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC5F,oCACM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,gBACjC,KAAK,EACjB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,YAAY,EACpB,OAAO,EAAC,KAAK,EACb,KAAK,EAAC,4BAA4B,aAElC,4CAAQ,KAAK,GAAS,EACtB,yEAAsC,EACtC,kCAAa,EACb,8BACE,EAAE,EAAC,QAAQ,EACX,MAAM,EAAC,MAAM,kBACA,GAAG,EAChB,IAAI,EAAC,MAAM,eACD,SAAS,YAEnB,8BACE,EAAE,EAAC,UAAU,EACb,SAAS,EAAC,qCAAqC,EAC/C,IAAI,EAAC,SAAS,YAEd,iCACE,CAAC,EAAC,28BAA28B,EAC78B,EAAE,EAAC,OAAO,GACJ,GACN,GACF,IACA,CACP,CAAC;AACF,kBAAe,SAAS,CAAC"}
|
|
@@ -2,7 +2,35 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
5
6
|
const Spin_1 = tslib_1.__importDefault(require("../ui/Spin"));
|
|
6
|
-
const
|
|
7
|
+
const MemoriArtifactSystem_1 = require("../MemoriArtifactSystem");
|
|
8
|
+
const ArtifactSystemContext_1 = require("../MemoriArtifactSystem/context/ArtifactSystemContext");
|
|
9
|
+
const ChatLayout = ({ Header, headerProps, Chat, chatProps, StartPanel, startPanelProps, integrationStyle, integrationBackground, sessionId, hasUserActivatedSpeak, loading = false, poweredBy, }) => {
|
|
10
|
+
const { actions, state } = (0, ArtifactSystemContext_1.useArtifactSystemContext)();
|
|
11
|
+
const [isMobile, setIsMobile] = (0, react_1.useState)(false);
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
const handleResize = () => {
|
|
14
|
+
const newIsMobile = window.innerWidth < 769;
|
|
15
|
+
if (newIsMobile !== isMobile) {
|
|
16
|
+
setTimeout(() => {
|
|
17
|
+
setIsMobile(newIsMobile);
|
|
18
|
+
}, 300);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
setIsMobile(newIsMobile);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
handleResize();
|
|
25
|
+
window.addEventListener('resize', handleResize);
|
|
26
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
27
|
+
}, [isMobile]);
|
|
28
|
+
const hasArtifact = state.currentArtifact && !isMobile;
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [integrationStyle, integrationBackground, (0, jsx_runtime_1.jsxs)(Spin_1.default, { spinning: loading, className: "memori-chat-layout", children: [poweredBy, (0, jsx_runtime_1.jsx)("div", { className: "memori-chat-layout--header", children: Header && headerProps && (0, jsx_runtime_1.jsx)(Header, { ...headerProps }) }), (0, jsx_runtime_1.jsx)("div", { id: "extension" }), (0, jsx_runtime_1.jsxs)("div", { className: `memori-chat-layout--main ${hasArtifact ? 'memori-chat-layout--main-with-artifact' : ''}`, children: [(0, jsx_runtime_1.jsx)("div", { className: state.isFullscreen
|
|
30
|
+
? `memori-chat-layout-controls-hide`
|
|
31
|
+
: `memori-chat-layout--controls ${hasArtifact
|
|
32
|
+
? 'memori-chat-layout--controls-with-artifact'
|
|
33
|
+
: ''}`, children: sessionId && hasUserActivatedSpeak && Chat && chatProps ? ((0, jsx_runtime_1.jsx)(Chat, { ...chatProps })) : startPanelProps ? ((0, jsx_runtime_1.jsx)(StartPanel, { ...startPanelProps })) : null }), hasArtifact && ((0, jsx_runtime_1.jsx)("div", { className: state.isFullscreen ? `memori-chat-layout-artifact-panel-full-screen` : `memori-chat-layout--artifact-panel memori-chat-layout--artifact-panel-enter`, children: (0, jsx_runtime_1.jsx)(MemoriArtifactSystem_1.ArtifactDrawer, {}) }))] }), state.currentArtifact && isMobile && ((0, jsx_runtime_1.jsx)("div", { className: "memori-chat-layout--artifact-drawer", children: (0, jsx_runtime_1.jsx)(MemoriArtifactSystem_1.ArtifactDrawer, {}) }))] })] }));
|
|
34
|
+
};
|
|
7
35
|
exports.default = ChatLayout;
|
|
8
36
|
//# sourceMappingURL=Chat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.js","sourceRoot":"","sources":["../../../src/components/layouts/Chat.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"Chat.js","sourceRoot":"","sources":["../../../src/components/layouts/Chat.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmD;AACnD,8DAA8B;AAE9B,kEAAyD;AACzD,iGAAiG;AAEjG,MAAM,UAAU,GAA0B,CAAC,EACzC,MAAM,EACN,WAAW,EACX,IAAI,EACJ,SAAS,EACT,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,EACT,qBAAqB,EACrB,OAAO,GAAG,KAAK,EACf,SAAS,GACV,EAAE,EAAE;IACH,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,IAAA,gDAAwB,GAAE,CAAC;IACtD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEhD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,GAAG,EAAE;YACxB,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,GAAG,GAAG,CAAC;YAC5C,IAAI,WAAW,KAAK,QAAQ,EAAE;gBAC5B,UAAU,CAAC,GAAG,EAAE;oBACd,WAAW,CAAC,WAAW,CAAC,CAAC;gBAC3B,CAA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CAAC,CAAC,6EAA6E,YAClK,uBAAC,qCAAc,KAAG,GACd,CACP,IACG,EAGL,KAAK,CAAC,eAAe,IAAI,QAAQ,IAAI,CACpC,gCAAK,SAAS,EAAC,qCAAqC,YAClD,uBAAC,qCAAc,KAAG,GACd,CACP,IACI,IACN,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
|
@@ -2,7 +2,39 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
5
6
|
const Spin_1 = tslib_1.__importDefault(require("../ui/Spin"));
|
|
6
|
-
const
|
|
7
|
+
const MemoriArtifactSystem_1 = require("../MemoriArtifactSystem");
|
|
8
|
+
const FullPageLayout = ({ Header, headerProps, Avatar, avatarProps, Chat, chatProps, StartPanel, startPanelProps, integrationStyle, integrationBackground, sessionId, hasUserActivatedSpeak, loading = false, poweredBy, }) => {
|
|
9
|
+
const { state } = (0, MemoriArtifactSystem_1.useArtifactSystemContext)();
|
|
10
|
+
const [isMobile, setIsMobile] = (0, react_1.useState)(false);
|
|
11
|
+
const [isAnimating, setIsAnimating] = (0, react_1.useState)(false);
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
const handleResize = () => {
|
|
14
|
+
const newIsMobile = window.innerWidth < 769;
|
|
15
|
+
if (newIsMobile !== isMobile) {
|
|
16
|
+
setIsAnimating(true);
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
setIsMobile(newIsMobile);
|
|
19
|
+
setIsAnimating(false);
|
|
20
|
+
}, 300);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
setIsMobile(newIsMobile);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
handleResize();
|
|
27
|
+
window.addEventListener('resize', handleResize);
|
|
28
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
29
|
+
}, [isMobile]);
|
|
30
|
+
const hasArtifact = state.currentArtifact && !isMobile;
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [integrationStyle, integrationBackground, (0, jsx_runtime_1.jsxs)(Spin_1.default, { spinning: loading, children: [Header && headerProps && (0, jsx_runtime_1.jsx)(Header, { ...headerProps }), (0, jsx_runtime_1.jsxs)("div", { className: "memori--grid", children: [!hasArtifact && ((0, jsx_runtime_1.jsxs)("div", { className: "memori--grid-column memori--grid-column-left", children: [Avatar && avatarProps && !hasArtifact && ((0, jsx_runtime_1.jsx)(Avatar, { chatProps: chatProps, ...avatarProps })), (0, jsx_runtime_1.jsx)("div", { id: "extension" })] })), (0, jsx_runtime_1.jsxs)("div", { className: `memori-chat-layout--main ${hasArtifact ? 'memori-chat-layout--main-with-artifact' : ''}`, children: [(0, jsx_runtime_1.jsx)("div", { className: state.isFullscreen
|
|
32
|
+
? `memori-chat-layout-controls-hide`
|
|
33
|
+
: `memori-chat-layout--controls ${hasArtifact
|
|
34
|
+
? 'memori-chat-layout--controls-with-artifact'
|
|
35
|
+
: ''}`, children: sessionId && hasUserActivatedSpeak && Chat && chatProps ? ((0, jsx_runtime_1.jsx)(Chat, { ...chatProps })) : startPanelProps ? ((0, jsx_runtime_1.jsx)(StartPanel, { ...startPanelProps })) : null }), hasArtifact && ((0, jsx_runtime_1.jsx)("div", { className: state.isFullscreen
|
|
36
|
+
? `memori-chat-layout-artifact-panel-full-screen`
|
|
37
|
+
: `memori-chat-layout--artifact-panel memori-chat-layout--artifact-panel-enter`, children: (0, jsx_runtime_1.jsx)(MemoriArtifactSystem_1.ArtifactDrawer, {}) }))] }), state.currentArtifact && isMobile && ((0, jsx_runtime_1.jsx)("div", { className: "memori-chat-layout--artifact-drawer", children: (0, jsx_runtime_1.jsx)(MemoriArtifactSystem_1.ArtifactDrawer, {}) })), poweredBy] })] })] }));
|
|
38
|
+
};
|
|
7
39
|
exports.default = FullPageLayout;
|
|
8
40
|
//# sourceMappingURL=FullPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullPage.js","sourceRoot":"","sources":["../../../src/components/layouts/FullPage.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"FullPage.js","sourceRoot":"","sources":["../../../src/components/layouts/FullPage.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmD;AACnD,8DAA8B;AAE9B,kEAGiC;AAEjC,MAAM,cAAc,GAA0B,CAAC,EAC7C,MAAM,EACN,WAAW,EACX,MAAM,EACN,WAAW,EACX,IAAI,EACJ,SAAS,EACT,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,EACT,qBAAqB,EACrB,OAAO,GAAG,KAAK,EACf,SAAS,GACV,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,+CAAwB,GAAE,CAAC;IAC7C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEtD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,GAAG,EAAE;YACxB,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,GAAG,GAAG,CAAC;YAC5C,IAAI,WAAW,KAAK,QAAQ,EAAE;gBAC5B,cAAc,CAAC,IAAI,CAAC,CAAC;gBACrB,UAAU,CAAC,GAAG,EAAE;oBACd,WAAW,CAAC,WAAW,CAAC,CAAC;oBACzB,cAAc,CAAC,KAAK,CAAC,CAAC;gBACxB,CAAC,EAAE,GAAG,CAAC,CAAC;aACT;iBAAM;gBACL,WAAW,CAAC,WAAW,CAAC,CAAC;aAC1B;QACH,CAAC,CAAC;QAEF,YAAY,EAAE,CAAC;QACf,MAAM,CAAC,gBAAgB,CAAC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