@cometchat/chat-uikit-react 6.3.13 → 6.4.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/dist/assets/bin.svg +1 -0
- package/dist/assets/format_blockquote.svg +3 -0
- package/dist/assets/format_bold.svg +5 -0
- package/dist/assets/format_code.svg +3 -0
- package/dist/assets/format_code_block.svg +5 -0
- package/dist/assets/format_italic.svg +3 -0
- package/dist/assets/format_link.svg +3 -0
- package/dist/assets/format_ordered_list.svg +5 -0
- package/dist/assets/format_strikethrough.svg +5 -0
- package/dist/assets/format_toggle.svg +1 -0
- package/dist/assets/format_underline.svg +5 -0
- package/dist/assets/format_unordered_list.svg +5 -0
- package/dist/assets/pause_circle.svg +1 -0
- package/dist/assets/warning-small.svg +0 -0
- package/dist/index.d.ts +360 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/CometChatCompactMessageComposer.css +1111 -0
- package/dist/styles/CometChatConversations.css +37 -1
- package/dist/styles/CometChatDocumentBubble.css +0 -1
- package/dist/styles/CometChatFormattingToolbar.css +257 -0
- package/dist/styles/CometChatLinkDialog.css +191 -0
- package/dist/styles/CometChatLinkPopover.css +128 -0
- package/dist/styles/CometChatMarkdownFormatter.css +141 -0
- package/dist/styles/CometChatMediaRecorder.css +73 -1
- package/dist/styles/CometChatMessageComposer.css +210 -3
- package/dist/styles/CometChatMessagePreview.css +10 -0
- package/dist/styles/CometChatSearch.css +11 -0
- package/dist/styles/CometChatTextBubble.css +267 -3
- package/dist/styles/LinkPreview.css +1 -1
- package/dist/styles/components/CometChatCompactMessageComposer.css +1111 -0
- package/dist/styles/components/CometChatConversations.css +37 -1
- package/dist/styles/components/CometChatDocumentBubble.css +0 -1
- package/dist/styles/components/CometChatFormattingToolbar.css +257 -0
- package/dist/styles/components/CometChatLinkDialog.css +191 -0
- package/dist/styles/components/CometChatLinkPopover.css +128 -0
- package/dist/styles/components/CometChatMarkdownFormatter.css +141 -0
- package/dist/styles/components/CometChatMediaRecorder.css +73 -1
- package/dist/styles/components/CometChatMessageComposer.css +210 -3
- package/dist/styles/components/CometChatMessagePreview.css +10 -0
- package/dist/styles/components/CometChatSearch.css +11 -0
- package/dist/styles/components/CometChatTextBubble.css +267 -3
- package/dist/styles/components/LinkPreview.css +1 -1
- package/dist/styles/components/index.css +6 -5
- package/dist/styles/css-variables.css +1 -0
- package/dist/styles/index.css +6 -5
- package/dist/types/CometChatUIKit/CometChatUIKitUtility.d.ts +13 -0
- package/dist/types/components/CometChatCompactMessageComposer/CometChatCompactMessageComposer.d.ts +247 -0
- package/dist/types/components/CometChatFormattingToolbar/CometChatFormattingToolbar.d.ts +29 -0
- package/dist/types/components/CometChatLinkDialog/CometChatLinkDialog.d.ts +22 -0
- package/dist/types/components/CometChatLinkPopover/CometChatLinkPopover.d.ts +24 -0
- package/dist/types/components/CometChatLinkPopover/index.d.ts +1 -0
- package/dist/types/components/useRichTextComposer/useRichTextComposer.d.ts +138 -0
- package/dist/types/formatters/CometChatFormatters/CometChatMarkdownFormatter/CometChatMarkdownFormatter.d.ts +109 -0
- package/dist/types/formatters/CometChatFormatters/CometChatRichTextFormatter.d.ts +32 -0
- package/dist/types/formatters/CometChatFormatters/CometChatUrlsFormatter/CometChatUrlsFormatter.d.ts +9 -3
- package/dist/types/formatters/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/EmojiShortcodeUtils.d.ts +11 -0
- package/dist/types/utils/HtmlToMarkdown.d.ts +52 -0
- package/dist/types/utils/MarkdownPatternDetector.d.ts +108 -0
- package/dist/types/utils/RichTextFormatting.d.ts +143 -0
- package/dist/types/utils/util.d.ts +1 -1
- package/package.json +1 -1
|
@@ -16,12 +16,33 @@
|
|
|
16
16
|
word-break: break-word;
|
|
17
17
|
text-align: left;
|
|
18
18
|
white-space: pre-line;
|
|
19
|
-
overflow:
|
|
19
|
+
overflow: hidden;
|
|
20
20
|
display: -webkit-box;
|
|
21
21
|
-webkit-box-orient: vertical;
|
|
22
|
-
overflow: hidden;
|
|
23
22
|
padding-top:var(--cometchat-padding-1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* When text contains block-level elements like lists or blockquotes,
|
|
26
|
+
switch from -webkit-box to block display so list markers render properly.
|
|
27
|
+
Use max-height for truncation since -webkit-line-clamp doesn't work with display: block */
|
|
28
|
+
.cometchat-text-bubble__body-text:has(ol),
|
|
29
|
+
.cometchat-text-bubble__body-text:has(ul),
|
|
30
|
+
.cometchat-text-bubble__body-text:has(blockquote),
|
|
31
|
+
.cometchat-text-bubble__body-text:has(pre) {
|
|
32
|
+
display: block;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
white-space: normal;
|
|
35
|
+
/* 4 lines * line-height (~22px for body-regular) = ~88px */
|
|
36
|
+
max-height: 88px;
|
|
37
|
+
}
|
|
24
38
|
|
|
39
|
+
/* When expanded, remove max-height restriction for block-level content */
|
|
40
|
+
.cometchat-text-bubble__body-text.cometchat-text-bubble__body-text--expanded:has(ol),
|
|
41
|
+
.cometchat-text-bubble__body-text.cometchat-text-bubble__body-text--expanded:has(ul),
|
|
42
|
+
.cometchat-text-bubble__body-text.cometchat-text-bubble__body-text--expanded:has(blockquote),
|
|
43
|
+
.cometchat-text-bubble__body-text.cometchat-text-bubble__body-text--expanded:has(pre) {
|
|
44
|
+
max-height: none;
|
|
45
|
+
overflow: visible;
|
|
25
46
|
}
|
|
26
47
|
|
|
27
48
|
/* Incoming text bubble specific styles */
|
|
@@ -94,4 +115,247 @@
|
|
|
94
115
|
.cometchat-text-bubble {
|
|
95
116
|
max-width: 280px;
|
|
96
117
|
}
|
|
97
|
-
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Rich Text Formatting Styles */
|
|
121
|
+
|
|
122
|
+
/* Bold */
|
|
123
|
+
.cometchat-text-bubble__body-text b,
|
|
124
|
+
.cometchat-text-bubble__body-text strong {
|
|
125
|
+
font-weight: var(--cometchat-font-weight-bold, 700);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Italic */
|
|
129
|
+
.cometchat-text-bubble__body-text i,
|
|
130
|
+
.cometchat-text-bubble__body-text em {
|
|
131
|
+
font-style: italic;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Strikethrough */
|
|
135
|
+
.cometchat-text-bubble__body-text s,
|
|
136
|
+
.cometchat-text-bubble__body-text strike,
|
|
137
|
+
.cometchat-text-bubble__body-text del {
|
|
138
|
+
text-decoration: line-through;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Underline */
|
|
142
|
+
.cometchat-text-bubble__body-text u {
|
|
143
|
+
text-decoration: underline;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Inline code */
|
|
147
|
+
.cometchat-text-bubble__body-text code {
|
|
148
|
+
font-family: 'Roboto Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
font-weight: 400;
|
|
151
|
+
font-style: normal;
|
|
152
|
+
background: var(--cometchat-background-color-03);
|
|
153
|
+
color: var(--cometchat-text-color-highlight);
|
|
154
|
+
padding: 0 var(--cometchat-padding);
|
|
155
|
+
border-radius: var(--cometchat-radius);
|
|
156
|
+
border: 1px solid var(--cometchat-border-color-default);
|
|
157
|
+
white-space: pre-wrap;
|
|
158
|
+
word-break: break-word;
|
|
159
|
+
display: inline-flex;
|
|
160
|
+
justify-content: center;
|
|
161
|
+
align-items: center;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Code color for incoming messages */
|
|
165
|
+
.cometchat-text-bubble-incoming .cometchat-text-bubble__body-text code {
|
|
166
|
+
color: var(--cometchat-text-color-highlight);
|
|
167
|
+
border-radius: var(--cometchat-radius);
|
|
168
|
+
border: 1px solid var(--cometchat-border-color-dark);
|
|
169
|
+
background: var(--cometchat-background-color-03);
|
|
170
|
+
font-family: 'Roboto Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
font-weight: 400;
|
|
173
|
+
font-style: normal;
|
|
174
|
+
padding: 0 var(--cometchat-padding);
|
|
175
|
+
display: inline-flex;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
align-items: center;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Code color for outgoing messages */
|
|
181
|
+
.cometchat-text-bubble-outgoing .cometchat-text-bubble__body-text code {
|
|
182
|
+
color: var(--cometchat-static-white);
|
|
183
|
+
background: rgba(255, 255, 255, 0.20);
|
|
184
|
+
border: 1px solid rgba(245, 245, 245, 0.10);
|
|
185
|
+
border-radius: var(--cometchat-radius);
|
|
186
|
+
padding: 0 var(--cometchat-padding);
|
|
187
|
+
font-family: 'Roboto Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
|
|
188
|
+
font-size: 14px;
|
|
189
|
+
font-weight: 400;
|
|
190
|
+
font-style: normal;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Code block */
|
|
194
|
+
.cometchat-text-bubble__body-text pre {
|
|
195
|
+
display: block;
|
|
196
|
+
font-family: 'Roboto Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
|
|
197
|
+
font-size: 14px;
|
|
198
|
+
font-weight: 400;
|
|
199
|
+
font-style: normal;
|
|
200
|
+
background: var(--cometchat-background-color-02);
|
|
201
|
+
border: 1px solid var(--cometchat-border-color-light);
|
|
202
|
+
border-radius: var(--cometchat-radius-2, 8px);
|
|
203
|
+
padding: var(--cometchat-padding-2, 8px) var(--cometchat-padding-3, 12px);
|
|
204
|
+
margin: 0;
|
|
205
|
+
white-space: pre-wrap;
|
|
206
|
+
word-wrap: break-word;
|
|
207
|
+
overflow-x: auto;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.cometchat-text-bubble-outgoing .cometchat-text-bubble__body-text pre {
|
|
211
|
+
background: rgba(255, 255, 255, 0.10);
|
|
212
|
+
border: none;
|
|
213
|
+
border-radius: var(--cometchat-radius-2, 8px);
|
|
214
|
+
color: var(--cometchat-static-white);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.cometchat-text-bubble__body-text pre code,
|
|
218
|
+
.cometchat-text-bubble-incoming .cometchat-text-bubble__body-text pre code,
|
|
219
|
+
.cometchat-text-bubble-outgoing .cometchat-text-bubble__body-text pre code {
|
|
220
|
+
background: transparent;
|
|
221
|
+
color: inherit;
|
|
222
|
+
padding: 0;
|
|
223
|
+
border: none;
|
|
224
|
+
border-radius: 0;
|
|
225
|
+
display: inline;
|
|
226
|
+
font-family: inherit !important;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Blockquote */
|
|
230
|
+
.cometchat-text-bubble__body-text blockquote {
|
|
231
|
+
display: block;
|
|
232
|
+
border-left: 3px solid var(--cometchat-border-color-default);
|
|
233
|
+
padding: var(--cometchat-padding-2);
|
|
234
|
+
border-radius: var(--cometchat-radius-1);
|
|
235
|
+
margin: 0;
|
|
236
|
+
font-style: normal;
|
|
237
|
+
min-width: 100px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.cometchat-text-bubble-incoming .cometchat-text-bubble__body-text blockquote {
|
|
241
|
+
color: var(--cometchat-text-color-secondary);
|
|
242
|
+
background: var(--cometchat-neutral-color-400);
|
|
243
|
+
border-left-color: var(--cometchat-primary-color);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.cometchat-text-bubble-outgoing .cometchat-text-bubble__body-text blockquote {
|
|
247
|
+
color: rgba(255, 255, 255, 0.8);
|
|
248
|
+
background: rgba(255, 255, 255, 0.10);
|
|
249
|
+
border-left-color: var(--cometchat-static-white);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Links */
|
|
253
|
+
.cometchat-text-bubble__body-text a {
|
|
254
|
+
text-decoration: underline;
|
|
255
|
+
cursor: pointer;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.cometchat-text-bubble-incoming .cometchat-text-bubble__body-text a {
|
|
259
|
+
color: var(--cometchat-primary-color, #3399ff);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.cometchat-text-bubble-outgoing .cometchat-text-bubble__body-text a {
|
|
263
|
+
color: var(--cometchat-static-white);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.cometchat-text-bubble__body-text a:hover {
|
|
267
|
+
text-decoration: underline;
|
|
268
|
+
opacity: 0.8;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* List items */
|
|
272
|
+
.cometchat-text-bubble__body-text li {
|
|
273
|
+
display: list-item;
|
|
274
|
+
margin: 0;
|
|
275
|
+
padding: 0;
|
|
276
|
+
white-space: normal;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.cometchat-text-bubble__body-text ol,
|
|
280
|
+
.cometchat-text-bubble__body-text ul {
|
|
281
|
+
margin: 0;
|
|
282
|
+
padding: 0;
|
|
283
|
+
padding-left: var(--cometchat-padding-3, 12px);
|
|
284
|
+
white-space: normal;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Nested list styling progression */
|
|
288
|
+
.cometchat-text-bubble__body-text ol { list-style-type: decimal; }
|
|
289
|
+
.cometchat-text-bubble__body-text ol ol { list-style-type: lower-alpha; }
|
|
290
|
+
.cometchat-text-bubble__body-text ol ol ol { list-style-type: lower-roman; }
|
|
291
|
+
.cometchat-text-bubble__body-text ul { list-style-type: disc; }
|
|
292
|
+
.cometchat-text-bubble__body-text ul ul { list-style-type: circle; }
|
|
293
|
+
.cometchat-text-bubble__body-text ul ul ul { list-style-type: square; }
|
|
294
|
+
.cometchat-text-bubble__body-text li > ol,
|
|
295
|
+
.cometchat-text-bubble__body-text li > ul {
|
|
296
|
+
margin-top: 0;
|
|
297
|
+
margin-bottom: 0;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
/* Mention styles in text bubbles */
|
|
302
|
+
|
|
303
|
+
/* Base mention styling - incoming bubbles */
|
|
304
|
+
.cometchat-text-bubble-incoming .cometchat-text-bubble__body-text .cometchat-mentions {
|
|
305
|
+
border-radius: var(--cometchat-radius, 2px);
|
|
306
|
+
background: rgba(104, 82, 214, 0.20);
|
|
307
|
+
padding: 0px var(--cometchat-padding, 2px);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.cometchat-text-bubble-incoming .cometchat-text-bubble__body-text .cometchat-mentions > span {
|
|
311
|
+
color: var(--cometchat-text-color-highlight, #6852D6);
|
|
312
|
+
font: var(--cometchat-font-body-regular);
|
|
313
|
+
font-weight: normal;
|
|
314
|
+
font-style: normal;
|
|
315
|
+
text-decoration: none;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* "You" mention styling - incoming bubbles */
|
|
319
|
+
.cometchat-text-bubble-incoming .cometchat-text-bubble__body-text .cometchat-mentions-you {
|
|
320
|
+
border-radius: var(--cometchat-radius, 2px);
|
|
321
|
+
background: rgba(255, 171, 0, 0.20);
|
|
322
|
+
padding: 0px var(--cometchat-padding, 2px);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.cometchat-text-bubble-incoming .cometchat-text-bubble__body-text .cometchat-mentions-you > span {
|
|
326
|
+
color: var(--cometchat-warning-color, #FFAB00);
|
|
327
|
+
font: var(--cometchat-font-body-regular);
|
|
328
|
+
font-weight: normal;
|
|
329
|
+
font-style: normal;
|
|
330
|
+
text-decoration: none;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* Base mention styling - outgoing bubbles */
|
|
334
|
+
.cometchat-text-bubble-outgoing .cometchat-text-bubble__body-text .cometchat-mentions {
|
|
335
|
+
border-radius: var(--cometchat-radius, 2px);
|
|
336
|
+
background: rgba(255, 255, 255, 0.20);
|
|
337
|
+
padding: 0px var(--cometchat-padding, 2px);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.cometchat-text-bubble-outgoing .cometchat-text-bubble__body-text .cometchat-mentions > span {
|
|
341
|
+
color: var(--cometchat-static-white);
|
|
342
|
+
font: var(--cometchat-font-body-regular);
|
|
343
|
+
font-weight: normal;
|
|
344
|
+
font-style: normal;
|
|
345
|
+
text-decoration: none;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* "You" mention styling - outgoing bubbles */
|
|
349
|
+
.cometchat-text-bubble-outgoing .cometchat-text-bubble__body-text .cometchat-mentions-you {
|
|
350
|
+
border-radius: var(--cometchat-radius, 2px);
|
|
351
|
+
background: rgba(255, 255, 255, 0.20);
|
|
352
|
+
padding: 0px var(--cometchat-padding, 2px);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.cometchat-text-bubble-outgoing .cometchat-text-bubble__body-text .cometchat-mentions-you > span {
|
|
356
|
+
color: var(--cometchat-static-white);
|
|
357
|
+
font: var(--cometchat-font-body-regular);
|
|
358
|
+
font-weight: normal;
|
|
359
|
+
font-style: normal;
|
|
360
|
+
text-decoration: none;
|
|
361
|
+
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
font-style: normal;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.cometchat-link-bubble-incoming .cometchat-link-bubble__preview-body-content-
|
|
70
|
+
.cometchat-link-bubble-incoming .cometchat-link-bubble__preview-body-content-description {
|
|
71
71
|
color: var(--cometchat-neutral-color-900, #141414);
|
|
72
72
|
}
|
|
73
73
|
|