@linktr.ee/messaging-react 3.29.1 → 3.29.2-rc-1785809673
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linktr.ee/messaging-react",
|
|
3
|
-
"version": "3.29.
|
|
3
|
+
"version": "3.29.2-rc-1785809673",
|
|
4
4
|
"description": "React messaging components built on messaging-core for web applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@linktr.ee/component-library": "11.8.6",
|
|
53
|
-
"@linktr.ee/messaging-core": "
|
|
53
|
+
"@linktr.ee/messaging-core": "2.3.0-rc-1785809673",
|
|
54
54
|
"@linktr.ee/messaging-taxonomy": "^0.5.0",
|
|
55
55
|
"@phosphor-icons/react": "^2.1.10",
|
|
56
56
|
"culori": "^4.0.2"
|
|
@@ -51,7 +51,6 @@ const createMockChannel = async (
|
|
|
51
51
|
type: msg.type ?? ('regular' as const),
|
|
52
52
|
created_at: minutesAgo(messages.length - index),
|
|
53
53
|
updated_at: minutesAgo(messages.length - index),
|
|
54
|
-
html: `<p>${msg.text}</p>`,
|
|
55
54
|
attachments: msg.attachments ?? [],
|
|
56
55
|
latest_reactions: [],
|
|
57
56
|
own_reactions: [],
|
|
@@ -60,7 +59,7 @@ const createMockChannel = async (
|
|
|
60
59
|
reply_count: 0,
|
|
61
60
|
status: 'received',
|
|
62
61
|
cid: 'messaging:storybook-channel-1',
|
|
63
|
-
mentioned_users: [],
|
|
62
|
+
mentioned_users: msg.mentioned_users ?? [],
|
|
64
63
|
}))
|
|
65
64
|
|
|
66
65
|
const channelData = {
|
|
@@ -115,6 +114,7 @@ interface TemplateProps {
|
|
|
115
114
|
id: string
|
|
116
115
|
text: string
|
|
117
116
|
user: StoryUser
|
|
117
|
+
mentioned_users?: StoryUser[]
|
|
118
118
|
type?: 'regular' | 'system'
|
|
119
119
|
attachments?: Array<Record<string, unknown>>
|
|
120
120
|
metadata?: {
|
|
@@ -238,6 +238,24 @@ Default.args = {
|
|
|
238
238
|
],
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
+
export const MentionContrast: StoryFn<TemplateProps> = Template.bind({})
|
|
242
|
+
MentionContrast.args = {
|
|
243
|
+
messages: [
|
|
244
|
+
{
|
|
245
|
+
id: 'msg-1',
|
|
246
|
+
text: 'Hi @Creator, could you take a look at this?',
|
|
247
|
+
user: storyUsers.visitor,
|
|
248
|
+
mentioned_users: [storyUsers.creator],
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: 'msg-2',
|
|
252
|
+
text: 'Sure thing, @Visitor — I will check it now.',
|
|
253
|
+
user: storyUsers.creator,
|
|
254
|
+
mentioned_users: [storyUsers.visitor],
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
}
|
|
258
|
+
|
|
241
259
|
// MES-1036: "✓✓ Delivered" appears below only the most recent *sent*
|
|
242
260
|
// message. Every mock message carries status: 'received', and stream's
|
|
243
261
|
// MessageList derives `lastOwnMessage`, so the indicator lands on the last
|
package/src/styles.css
CHANGED
|
@@ -970,6 +970,11 @@
|
|
|
970
970
|
word-break: break-word;
|
|
971
971
|
}
|
|
972
972
|
|
|
973
|
+
/* Keep mentions readable by inheriting the message bubble's ink color. */
|
|
974
|
+
.str-chat__message-text-inner .str-chat__message-mention {
|
|
975
|
+
color: inherit;
|
|
976
|
+
}
|
|
977
|
+
|
|
973
978
|
.str-chat__message
|
|
974
979
|
.str-chat__message-inner
|
|
975
980
|
.str-chat__message-bubble
|