@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,343 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ArtifactPreview CSS Styles
|
|
3
|
+
* Following the project's design system and CSS patterns
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.memori-artifact-preview {
|
|
7
|
+
display: flex;
|
|
8
|
+
height: 100%;
|
|
9
|
+
min-height: 0;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Tabs */
|
|
14
|
+
.memori-artifact-tabs {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: flex-end;
|
|
17
|
+
padding: 0.5rem;
|
|
18
|
+
/* border-bottom: 1px solid var(--memori-button-border-color, #e9ecef); */
|
|
19
|
+
border-radius: var(--memori-border-radius, 6px) var(--memori-border-radius, 6px) 0 0;
|
|
20
|
+
background: var(--memori-inner-bg, #f8f9fa);
|
|
21
|
+
gap: 0.25rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.memori-artifact-tab-icon{
|
|
25
|
+
width: 16px;
|
|
26
|
+
height: 16px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.memori-artifact-tab {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
padding: 0.75rem 1rem;
|
|
33
|
+
border: none;
|
|
34
|
+
border-radius: var(--memori-border-radius, 4px);
|
|
35
|
+
background: transparent;
|
|
36
|
+
color: var(--memori-text-color, #666);
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
font-size: 0.875rem;
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
gap: 0.5rem;
|
|
41
|
+
transition: all 0.2s ease;
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* .memori-artifact-tab:hover:not(.memori-artifact-tab--active) {
|
|
46
|
+
background: rgba(0, 123, 255, 0.05);
|
|
47
|
+
color: var(--memori-text-color, #333);
|
|
48
|
+
} */
|
|
49
|
+
|
|
50
|
+
.memori-artifact-tab--active, .memori-artifact-tab:hover, .memori-artifact-tab:active, .memori-artifact-tab:focus {
|
|
51
|
+
background: var(--memori-chat-bubble-bg, #fff);
|
|
52
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
53
|
+
color: var(--memori-primary);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Content */
|
|
57
|
+
.memori-artifact-content {
|
|
58
|
+
display: flex;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
min-height: 0;
|
|
61
|
+
flex: 1;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
border-radius: 0 0 var(--memori-border-radius, 6px) var(--memori-border-radius, 6px);
|
|
64
|
+
background: var(--memori-chat-bubble-bg, #fff);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.memori-artifact-tab-content {
|
|
68
|
+
display: none;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
min-height: 0;
|
|
71
|
+
flex: 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.memori-artifact-tab-content--active {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Code Content */
|
|
80
|
+
.memori-artifact-code {
|
|
81
|
+
overflow: auto;
|
|
82
|
+
flex: 1;
|
|
83
|
+
border: 1px solid var(--memori-button-border-color, #e9ecef);
|
|
84
|
+
border-radius: var(--memori-border-radius, 6px);
|
|
85
|
+
margin: 1rem;
|
|
86
|
+
background: var(--memori-chat-bubble-bg, #fff);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.memori-artifact-code-content {
|
|
90
|
+
padding: 1rem;
|
|
91
|
+
margin: 0;
|
|
92
|
+
color: var(--memori-text-color, #333);
|
|
93
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
|
|
94
|
+
font-size: 0.875rem;
|
|
95
|
+
line-height: 1.5;
|
|
96
|
+
overflow-wrap: break-word;
|
|
97
|
+
white-space: pre-wrap;
|
|
98
|
+
word-wrap: break-word;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Preview Content */
|
|
102
|
+
.memori-artifact-preview-content {
|
|
103
|
+
position: relative;
|
|
104
|
+
overflow: auto;
|
|
105
|
+
flex: 1;
|
|
106
|
+
border: 1px solid var(--memori-button-border-color, #e9ecef);
|
|
107
|
+
border-radius: var(--memori-border-radius, 6px);
|
|
108
|
+
margin: 1rem;
|
|
109
|
+
background: var(--memori-chat-bubble-bg, #fff);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Markdown Preview */
|
|
113
|
+
.memori-artifact-preview-markdown {
|
|
114
|
+
padding: 1rem;
|
|
115
|
+
color: var(--memori-text-color, #333);
|
|
116
|
+
font-family: var(--memori-font-family);
|
|
117
|
+
line-height: 1.6;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.memori-artifact-preview-markdown h1,
|
|
121
|
+
.memori-artifact-preview-markdown h2,
|
|
122
|
+
.memori-artifact-preview-markdown h3,
|
|
123
|
+
.memori-artifact-preview-markdown h4,
|
|
124
|
+
.memori-artifact-preview-markdown h5,
|
|
125
|
+
.memori-artifact-preview-markdown h6 {
|
|
126
|
+
margin: 1.5rem 0 0.5rem;
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
line-height: 1.3;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.memori-artifact-preview-css-content h3 {
|
|
132
|
+
margin: 0 0 1rem;
|
|
133
|
+
font-size: 1.125rem;
|
|
134
|
+
font-weight: 600;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.memori-artifact-preview-markdown h1:first-child,
|
|
138
|
+
.memori-artifact-preview-markdown h2:first-child,
|
|
139
|
+
.memori-artifact-preview-markdown h3:first-child {
|
|
140
|
+
margin-top: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.memori-artifact-preview-markdown p {
|
|
144
|
+
margin: 0 0 1rem;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.memori-artifact-preview-markdown code {
|
|
148
|
+
padding: 0.125rem 0.25rem;
|
|
149
|
+
border-radius: 3px;
|
|
150
|
+
background: var(--memori-inner-bg, #f1f3f4);
|
|
151
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
152
|
+
font-size: 0.875em;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.memori-artifact-preview-markdown pre {
|
|
156
|
+
padding: 1rem;
|
|
157
|
+
border-radius: var(--memori-border-radius, 6px);
|
|
158
|
+
margin: 1rem 0;
|
|
159
|
+
background: var(--memori-inner-bg, #f1f3f4);
|
|
160
|
+
overflow-x: auto;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.memori-artifact-preview-markdown pre code {
|
|
164
|
+
padding: 0;
|
|
165
|
+
background: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.memori-artifact-preview-markdown a {
|
|
169
|
+
color: var(--memori-primary);
|
|
170
|
+
text-decoration: none;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.memori-artifact-preview-markdown a:hover {
|
|
174
|
+
text-decoration: underline;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* SVG Preview */
|
|
178
|
+
.memori-artifact-preview-svg {
|
|
179
|
+
display: flex;
|
|
180
|
+
min-height: 200px;
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-content: center;
|
|
183
|
+
padding: 1rem;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.memori-artifact-preview-svg svg {
|
|
187
|
+
max-width: 100%;
|
|
188
|
+
max-height: 100%;
|
|
189
|
+
border: 1px solid var(--memori-button-border-color, #e9ecef);
|
|
190
|
+
border-radius: var(--memori-border-radius, 6px);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* CSS Preview */
|
|
194
|
+
.memori-artifact-preview-css {
|
|
195
|
+
padding: 1rem;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.memori-artifact-preview-css-demo {
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
border: 1px solid var(--memori-button-border-color, #e9ecef);
|
|
201
|
+
border-radius: var(--memori-border-radius, 6px);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.memori-artifact-preview-css-content {
|
|
205
|
+
padding: 1rem;
|
|
206
|
+
color: var(--memori-text-color, #333);
|
|
207
|
+
font-family: var(--memori-font-family);
|
|
208
|
+
line-height: 1.6;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.memori-artifact-preview-css-content p {
|
|
212
|
+
margin: 0 0 1rem;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.memori-artifact-preview-css-content button {
|
|
216
|
+
padding: 0.5rem 1rem;
|
|
217
|
+
border: none;
|
|
218
|
+
border-radius: var(--memori-border-radius, 4px);
|
|
219
|
+
margin: 0.5rem 0;
|
|
220
|
+
background: var(--memori-primary);
|
|
221
|
+
color: var(--memori-primary-text);
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.memori-artifact-preview-css-container {
|
|
226
|
+
padding: 1rem;
|
|
227
|
+
border-radius: var(--memori-border-radius, 4px);
|
|
228
|
+
margin: 1rem 0;
|
|
229
|
+
background: var(--memori-inner-bg, #f1f3f4);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* Text Preview */
|
|
233
|
+
.memori-artifact-preview-text {
|
|
234
|
+
padding: 1rem;
|
|
235
|
+
color: var(--memori-text-color, #333);
|
|
236
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
237
|
+
font-size: 0.875rem;
|
|
238
|
+
line-height: 1.5;
|
|
239
|
+
white-space: pre-wrap;
|
|
240
|
+
word-wrap: break-word;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* Syntax Highlighting */
|
|
244
|
+
.memori-artifact--comment {
|
|
245
|
+
color: #6a737d;
|
|
246
|
+
font-style: italic;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.memori-artifact--keyword {
|
|
250
|
+
color: #d73a49;
|
|
251
|
+
font-weight: 600;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.memori-artifact--string {
|
|
255
|
+
color: #032f62;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.memori-artifact--number {
|
|
259
|
+
color: #005cc5;
|
|
260
|
+
font-weight: 500;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.memori-artifact--function {
|
|
264
|
+
color: #6f42c1;
|
|
265
|
+
font-weight: 600;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.memori-artifact--operator {
|
|
269
|
+
color: #d73a49;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.memori-artifact--property {
|
|
273
|
+
color: #005cc5;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.memori-artifact--selector {
|
|
277
|
+
color: #6f42c1;
|
|
278
|
+
font-weight: 600;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.memori-artifact--tag {
|
|
282
|
+
color: #22863a;
|
|
283
|
+
font-weight: 600;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.memori-artifact--line-number {
|
|
287
|
+
margin-right: 1rem;
|
|
288
|
+
color: #6a737d;
|
|
289
|
+
user-select: none;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* Responsive Design */
|
|
293
|
+
@media (max-width: 768px) {
|
|
294
|
+
|
|
295
|
+
.memori-artifact-tab {
|
|
296
|
+
min-height: 42px;
|
|
297
|
+
padding: 0.5rem 0.75rem;
|
|
298
|
+
font-size: 0.75rem;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.memori-artifact-code,
|
|
302
|
+
.memori-artifact-preview-content {
|
|
303
|
+
margin: 0.5rem;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.memori-artifact-code-content {
|
|
307
|
+
padding: 0.75rem;
|
|
308
|
+
font-size: 0.75rem;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.memori-artifact-preview-markdown,
|
|
312
|
+
.memori-artifact-preview-css,
|
|
313
|
+
.memori-artifact-preview-text {
|
|
314
|
+
padding: 0.75rem;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* Dark Mode Support */
|
|
319
|
+
@media (prefers-color-scheme: dark) {
|
|
320
|
+
.memori-artifact-tabs {
|
|
321
|
+
border-bottom-color: var(--memori-button-border-color, #404040);
|
|
322
|
+
background: rgba(255, 255, 255, 0.86);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* .memori-artifact-tab--active {
|
|
326
|
+
background: var(--memori-chat-bubble-bg, #1a1a1a);
|
|
327
|
+
} */
|
|
328
|
+
|
|
329
|
+
.memori-artifact-code,
|
|
330
|
+
.memori-artifact-preview-content {
|
|
331
|
+
border-color: var(--memori-button-border-color, #404040);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.memori-artifact-preview-markdown code,
|
|
335
|
+
.memori-artifact-preview-css-demo {
|
|
336
|
+
border-color: var(--memori-button-border-color, #404040);
|
|
337
|
+
background: var(--memori-inner-bg, #2a2a2a);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.memori-artifact-preview-css-container {
|
|
341
|
+
background: var(--memori-inner-bg, #2a2a2a);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import cx from 'classnames';
|
|
5
|
+
import Button from '../../../ui/Button';
|
|
6
|
+
import { SUPPORTED_MIME_TYPES } from '../../types/artifact.types';
|
|
7
|
+
import Code from '../../../icons/Code';
|
|
8
|
+
import { PreviewIcon } from '../../../icons/Preview';
|
|
9
|
+
import Snippet from '../../../Snippet/Snippet';
|
|
10
|
+
const ArtifactPreview = ({ artifact, activeTab, onTabChange, }) => {
|
|
11
|
+
const { t } = useTranslation();
|
|
12
|
+
const handleTabChange = useCallback((tab) => {
|
|
13
|
+
onTabChange(tab);
|
|
14
|
+
}, [onTabChange]);
|
|
15
|
+
const renderPreview = useCallback(() => {
|
|
16
|
+
switch (artifact.mimeType) {
|
|
17
|
+
case 'html':
|
|
18
|
+
return (_jsx("iframe", { srcDoc: artifact.content, style: {
|
|
19
|
+
width: '100%',
|
|
20
|
+
height: '100%',
|
|
21
|
+
border: 'none',
|
|
22
|
+
borderRadius: '6px',
|
|
23
|
+
}, title: `${artifact.title} Preview` }));
|
|
24
|
+
case 'markdown':
|
|
25
|
+
return (_jsx("div", { className: "memori-artifact-preview-markdown", dangerouslySetInnerHTML: { __html: renderMarkdown(artifact.content) } }));
|
|
26
|
+
case 'svg':
|
|
27
|
+
return (_jsx("div", { className: "memori-artifact-preview-svg", dangerouslySetInnerHTML: { __html: artifact.content } }));
|
|
28
|
+
case 'css':
|
|
29
|
+
return (_jsx("div", { className: "memori-artifact-preview-css", children: _jsxs("div", { className: "memori-artifact-preview-css-demo", children: [_jsx("style", { dangerouslySetInnerHTML: { __html: artifact.content } }), _jsxs("div", { className: "memori-artifact-preview-css-content", children: [_jsx("h3", { children: "CSS Preview" }), _jsx("p", { children: "This is an example of text to see the CSS effect." }), _jsx("button", { children: "Example Button" }), _jsx("div", { className: "memori-artifact-preview-css-container", children: "Example Container" })] })] }) }));
|
|
30
|
+
default:
|
|
31
|
+
return (_jsx("div", { className: "memori-artifact-preview-text", children: _jsx("pre", { children: artifact.content }) }));
|
|
32
|
+
}
|
|
33
|
+
}, [artifact]);
|
|
34
|
+
const renderMarkdown = useCallback((markdown) => {
|
|
35
|
+
return markdown
|
|
36
|
+
.replace(/^# (.*$)/gim, '<h1>$1</h1>')
|
|
37
|
+
.replace(/^## (.*$)/gim, '<h2>$1</h2>')
|
|
38
|
+
.replace(/^### (.*$)/gim, '<h3>$1</h3>')
|
|
39
|
+
.replace(/^#### (.*$)/gim, '<h4>$1</h4>')
|
|
40
|
+
.replace(/^##### (.*$)/gim, '<h5>$1</h5>')
|
|
41
|
+
.replace(/^###### (.*$)/gim, '<h6>$1</h6>')
|
|
42
|
+
.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>')
|
|
43
|
+
.replace(/\*(.*?)\*/g, '<em>$1</em>')
|
|
44
|
+
.replace(/`(.*?)`/g, '<code>$1</code>')
|
|
45
|
+
.replace(/```([\s\S]*?)```/g, '<pre><code>$1</code></pre>')
|
|
46
|
+
.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')
|
|
47
|
+
.replace(/\n/g, '<br>');
|
|
48
|
+
}, []);
|
|
49
|
+
const hasPreview = useMemo(() => {
|
|
50
|
+
return artifact.typeInfo.hasPreview;
|
|
51
|
+
}, [artifact.typeInfo.hasPreview]);
|
|
52
|
+
const mapArtifactMimeType = useCallback((mimeType) => {
|
|
53
|
+
return SUPPORTED_MIME_TYPES[mimeType].mimeType;
|
|
54
|
+
}, []);
|
|
55
|
+
return (_jsxs("div", { className: "memori-artifact-preview", children: [hasPreview && (_jsxs("div", { className: "memori-artifact-tabs", children: [_jsxs(Button, { onClick: () => handleTabChange('code'), className: cx('memori-artifact-tab', {
|
|
56
|
+
'memori-artifact-tab--active': activeTab === 'code',
|
|
57
|
+
}), ghost: true, children: [_jsx(Code, { className: "memori-artifact-tab-icon" }), _jsx("span", { className: "memori-artifact-tab-text", children: t('artifact.code', 'Code') })] }), _jsxs(Button, { onClick: () => handleTabChange('preview'), className: cx('memori-artifact-tab', {
|
|
58
|
+
'memori-artifact-tab--active': activeTab === 'preview',
|
|
59
|
+
}), ghost: true, children: [_jsx(PreviewIcon, { className: "memori-artifact-tab-icon" }), _jsx("span", { className: "memori-artifact-tab-text", children: t('artifact.preview', 'Preview') })] })] })), _jsxs("div", { className: "memori-artifact-content", children: [_jsx("div", { className: cx('memori-artifact-tab-content', {
|
|
60
|
+
'memori-artifact-tab-content--active': activeTab === 'code' || !hasPreview,
|
|
61
|
+
}), children: _jsx("div", { className: "memori-artifact-code", children: _jsx(Snippet, { medium: {
|
|
62
|
+
mediumID: artifact.id,
|
|
63
|
+
mimeType: mapArtifactMimeType(artifact.mimeType),
|
|
64
|
+
content: artifact.content,
|
|
65
|
+
title: artifact.title,
|
|
66
|
+
creationTimestamp: artifact.timestamp.toISOString(),
|
|
67
|
+
creationName: 'System',
|
|
68
|
+
lastChangeTimestamp: artifact.timestamp.toISOString(),
|
|
69
|
+
lastChangeName: 'System',
|
|
70
|
+
} }) }) }), hasPreview && (_jsx("div", { className: cx('memori-artifact-tab-content', {
|
|
71
|
+
'memori-artifact-tab-content--active': activeTab === 'preview',
|
|
72
|
+
}), children: _jsx("div", { className: "memori-artifact-preview-content", children: renderPreview() }) }))] })] }));
|
|
73
|
+
};
|
|
74
|
+
export default ArtifactPreview;
|
|
75
|
+
//# sourceMappingURL=ArtifactPreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArtifactPreview.js","sourceRoot":"","sources":["../../../../../src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx"],"names":[],"mappings":";AAMA,OAAc,EAAY,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAuD,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvH,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,OAAO,MAA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C,SAAS,CAAC,WAAW,EAAE;oCACrD,cAAc,EAAE,QAAQ;iCACf,GAAI,GACX,GACF,EAGL,UAAU,IAAI,CACb,cACE,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE;4BAC3C,qCAAqC,EAAE,SAAS,KAAK,SAAS;yBAC/D,CAAC,YAEF,cAAK,SAAS,EAAC,iCAAiC,YAC7C,aAAa,EAAE,GACZ,GACF,CACP,IACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ArtifactSystemConfig, ArtifactSystemHook } from '../types/artifact.types';
|
|
3
|
+
interface ArtifactSystemContextType extends ArtifactSystemHook {
|
|
4
|
+
}
|
|
5
|
+
declare const ArtifactSystemContext: React.Context<ArtifactSystemContextType | null>;
|
|
6
|
+
interface ArtifactSystemProviderProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
config?: Partial<ArtifactSystemConfig>;
|
|
9
|
+
}
|
|
10
|
+
export declare const ArtifactSystemProvider: React.FC<ArtifactSystemProviderProps>;
|
|
11
|
+
export declare const useArtifactSystemContext: () => ArtifactSystemContextType;
|
|
12
|
+
export { ArtifactSystemContext };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
import { useArtifactSystem } from '../hooks/useArtifactSystem';
|
|
4
|
+
const ArtifactSystemContext = createContext(null);
|
|
5
|
+
export const ArtifactSystemProvider = ({ children, config = {} }) => {
|
|
6
|
+
const artifactSystem = useArtifactSystem(config);
|
|
7
|
+
return (_jsx(ArtifactSystemContext.Provider, { value: artifactSystem, children: children }));
|
|
8
|
+
};
|
|
9
|
+
export const useArtifactSystemContext = () => {
|
|
10
|
+
const context = useContext(ArtifactSystemContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error('useArtifactSystemContext must be used within an ArtifactSystemProvider');
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
};
|
|
16
|
+
export { ArtifactSystemContext };
|
|
17
|
+
//# sourceMappingURL=ArtifactSystemContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArtifactSystemContext.js","sourceRoot":"","sources":["../../../../src/components/MemoriArtifactSystem/context/ArtifactSystemContext.tsx"],"names":[],"mappings":";AAKA,OAAc,EAAE,aAAa,EAAE,UAAU,EAAa,MAAM,OAAO,CAAC;AAOpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAQ/D,MAAM,qBAAqB,GAAG,aAAa,CAAmC,IAAI,CAAC,CAAC;AASpF,MAAM,CAAC,MAAM,sBAAsB,GAA0C,CAAC,EAC5E,QAAQ,EACR,MAAM,GAAG,EAAE,EACZ,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEjD,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,cAAc,YAClD,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAA8B,EAAE;IACtE,MAAM,OAAO,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAElD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;KACH;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAGF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ArtifactSystemConfig, ArtifactSystemHook, ArtifactData } from '../types/artifact.types';
|
|
2
|
+
export declare const useArtifactSystem: (config?: Partial<ArtifactSystemConfig>) => ArtifactSystemHook;
|
|
3
|
+
export declare const useArtifactCreator: () => {
|
|
4
|
+
createArtifact: (content: string, mimeType: string, customTitle?: string, messageID?: string) => ArtifactData;
|
|
5
|
+
};
|
|
6
|
+
export declare const useArtifactProcessor: () => {
|
|
7
|
+
processArtifactContent: (emission: string, onArtifactFound: (content: string, mimeType: string, title?: string) => void) => boolean;
|
|
8
|
+
processedArtifacts: Set<string>;
|
|
9
|
+
};
|
|
10
|
+
export declare const useArtifactDetector: () => {
|
|
11
|
+
hasArtifacts: (messageText: string) => boolean;
|
|
12
|
+
};
|