stream-chat-react 10.3.0 → 10.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/utils.d.ts CHANGED
@@ -1,28 +1,42 @@
1
- import React from 'react';
1
+ import { ComponentType } from 'react';
2
2
  import { nanoid } from 'nanoid';
3
+ import { Options } from 'react-markdown';
4
+ import type { ReactMarkdownProps } from 'react-markdown/lib/complex-types';
5
+ import type { Content, Root } from 'hast';
3
6
  import type { UserResponse } from 'stream-chat';
4
7
  import type { DefaultStreamChatGenerics } from './types/types';
5
8
  export declare const isOnlyEmojis: (text?: string) => boolean;
9
+ declare type HNode = Content | Root;
6
10
  export declare const matchMarkdownLinks: (message: string) => (string | null)[];
7
11
  export declare const messageCodeBlocks: (message: string) => RegExpMatchArray;
8
- export declare const markDownRenderers: {
9
- [nodeType: string]: React.ElementType;
10
- };
11
- export declare const emojiMarkdownPlugin: () => <T extends unknown>(markdownAST: T) => T;
12
- export declare const mentionsMarkdownPlugin: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(mentioned_users: UserResponse<StreamChatGenerics>[]) => () => <T extends unknown>(markdownAST: T) => T;
13
- export declare type MentionProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
12
+ export declare type MentionProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = ReactMarkdownProps & {
13
+ /**
14
+ * @deprecated will be removed in the next major release, transition to using `node.mentionedUser` instead
15
+ */
14
16
  mentioned_user: UserResponse<StreamChatGenerics>;
15
- };
16
- export declare type RenderTextOptions = {
17
- customMarkDownRenderers?: {
18
- [nodeType: string]: React.ElementType;
17
+ node: {
18
+ /**
19
+ * @deprecated will be removed in the next major release, transition to using `node.mentionedUser` instead
20
+ */
21
+ mentioned_user: UserResponse<StreamChatGenerics>;
22
+ mentionedUser: UserResponse<StreamChatGenerics>;
19
23
  };
20
24
  };
21
- export declare const renderText: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(text?: string, mentioned_users?: UserResponse<StreamChatGenerics>[] | undefined, options?: RenderTextOptions) => JSX.Element | null;
25
+ export declare const markDownRenderers: RenderTextOptions['customMarkDownRenderers'];
26
+ export declare const emojiMarkdownPlugin: () => (node: HNode) => import("hast-util-find-and-replace/lib").Node;
27
+ export declare const mentionsMarkdownPlugin: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(mentioned_users: UserResponse<StreamChatGenerics>[]) => () => (tree: HNode) => HNode;
28
+ export declare type RenderTextOptions<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
29
+ customMarkDownRenderers?: Options['components'] & Partial<{
30
+ emoji: ComponentType<ReactMarkdownProps>;
31
+ mention: ComponentType<MentionProps<StreamChatGenerics>>;
32
+ }>;
33
+ };
34
+ export declare const renderText: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(text?: string, mentionedUsers?: UserResponse<StreamChatGenerics>[] | undefined, { customMarkDownRenderers }?: RenderTextOptions) => JSX.Element | null;
22
35
  export declare function escapeRegExp(text: string): string;
23
36
  /**
24
37
  * @deprecated will be removed in the next major release
25
38
  */
26
39
  export declare const generateRandomId: typeof nanoid;
27
40
  export declare const getWholeChar: (str: string, i: number) => string;
41
+ export {};
28
42
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE/D,eAAO,MAAM,YAAY,UAAW,MAAM,YAOzC,CAAC;AAoBF,eAAO,MAAM,kBAA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CHANGED
@@ -9,14 +9,28 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
12
23
  import React from 'react';
13
24
  import emojiRegex from 'emoji-regex';
14
25
  import * as linkify from 'linkifyjs';
15
26
  import { nanoid } from 'nanoid';
16
- import { findAndReplace } from 'mdast-util-find-and-replace';
17
- import RootReactMarkdown from 'react-markdown';
18
- import ReactMarkdown from 'react-markdown/with-html';
27
+ import { findAndReplace } from 'hast-util-find-and-replace';
28
+ import ReactMarkdown, { uriTransformer } from 'react-markdown';
29
+ import { u } from 'unist-builder';
30
+ import { visit } from 'unist-util-visit';
31
+ import remarkGfm from 'remark-gfm';
19
32
  import uniqBy from 'lodash.uniqby';
33
+ import clsx from 'clsx';
20
34
  export var isOnlyEmojis = function (text) {
21
35
  if (!text)
22
36
  return false;
@@ -26,20 +40,22 @@ export var isOnlyEmojis = function (text) {
26
40
  };
27
41
  var allowedMarkups = [
28
42
  'html',
29
- // @ts-expect-error
30
- 'root',
31
43
  'text',
32
- 'break',
33
- 'paragraph',
34
- 'emphasis',
44
+ 'br',
45
+ 'p',
46
+ 'em',
35
47
  'strong',
36
- 'link',
37
- 'list',
38
- 'listItem',
48
+ 'a',
49
+ 'ol',
50
+ 'ul',
51
+ 'li',
39
52
  'code',
40
- 'inlineCode',
53
+ 'pre',
41
54
  'blockquote',
42
- 'delete',
55
+ 'del',
56
+ // custom types (tagNames)
57
+ 'emoji',
58
+ 'mention',
43
59
  ];
44
60
  export var matchMarkdownLinks = function (message) {
45
61
  var regexMdLinks = /\[([^[]+)\](\(.*\))/gm;
@@ -75,31 +91,32 @@ function encodeDecode(url) {
75
91
  return url;
76
92
  }
77
93
  }
94
+ var Anchor = function (_a) {
95
+ var children = _a.children, href = _a.href;
96
+ var isEmail = href === null || href === void 0 ? void 0 : href.startsWith('mailto:');
97
+ var isUrl = href === null || href === void 0 ? void 0 : href.startsWith('http');
98
+ if (!href || (!isEmail && !isUrl))
99
+ return React.createElement(React.Fragment, null, children);
100
+ return (React.createElement("a", { className: clsx({ 'str-chat__message-url-link': isUrl }), href: href, rel: 'nofollow noreferrer noopener', target: '_blank' }, children));
101
+ };
102
+ var Emoji = function (_a) {
103
+ var children = _a.children;
104
+ return (React.createElement("span", { className: 'inline-text-emoji', "data-testid": 'inline-text-emoji' }, children));
105
+ };
106
+ var Mention = function (_a) {
107
+ var children = _a.children, mentionedUser = _a.node.mentionedUser;
108
+ return (React.createElement("span", { className: 'str-chat__message-mention', "data-user-id": mentionedUser.id }, children));
109
+ };
78
110
  export var markDownRenderers = {
79
- // eslint-disable-next-line react/display-name
80
- link: function (props) {
81
- var children = props.children, href = props.href;
82
- var isEmail = href === null || href === void 0 ? void 0 : href.startsWith('mailto:');
83
- var isUrl = href === null || href === void 0 ? void 0 : href.startsWith('http');
84
- if (!href || (!isEmail && !isUrl)) {
85
- return children;
86
- }
87
- return (React.createElement("a", { className: "".concat(isUrl ? 'str-chat__message-url-link' : ''), href: href, rel: 'nofollow noreferrer noopener', target: '_blank' }, children));
88
- },
89
- span: 'span',
111
+ a: Anchor,
112
+ emoji: Emoji,
113
+ mention: Mention,
90
114
  };
91
115
  export var emojiMarkdownPlugin = function () {
92
- function replace(match) {
93
- return {
94
- children: [{ type: 'text', value: match }],
95
- className: 'inline-text-emoji',
96
- type: 'span',
97
- };
98
- }
99
- var transform = function (markdownAST) {
100
- findAndReplace(markdownAST, emojiRegex(), replace);
101
- return markdownAST;
116
+ var replace = function (match) {
117
+ return u('element', { tagName: 'emoji' }, [u('text', match)]);
102
118
  };
119
+ var transform = function (node) { return findAndReplace(node, emojiRegex(), replace); };
103
120
  return transform;
104
121
  };
105
122
  export var mentionsMarkdownPlugin = function (mentioned_users) { return function () {
@@ -107,35 +124,57 @@ export var mentionsMarkdownPlugin = function (mentioned_users) { return function
107
124
  .map(function (user) { return user.name || user.id; })
108
125
  .filter(Boolean)
109
126
  .map(escapeRegExp);
110
- function replace(match) {
127
+ var mentionedUsersRegex = new RegExp(mentioned_usernames.map(function (username) { return "@".concat(username); }).join('|'), 'g');
128
+ var replace = function (match) {
111
129
  var usernameOrId = match.replace('@', '');
112
130
  var user = mentioned_users.find(function (_a) {
113
131
  var id = _a.id, name = _a.name;
114
132
  return name === usernameOrId || id === usernameOrId;
115
133
  });
116
- return {
117
- children: [{ type: 'text', value: match }],
118
- mentioned_user: user,
119
- type: 'mention',
120
- };
121
- }
122
- var transform = function (markdownAST) {
123
- if (!mentioned_usernames.length) {
124
- return markdownAST;
125
- }
126
- var mentionedUsersRegex = new RegExp(mentioned_usernames.map(function (username) { return "@".concat(username); }).join('|'), 'g');
127
- findAndReplace(markdownAST, mentionedUsersRegex, replace);
128
- return markdownAST;
134
+ return u('element', { mentionedUser: user, tagName: 'mention' }, [u('text', match)]);
135
+ };
136
+ var transform = function (tree) {
137
+ if (!mentioned_usernames.length)
138
+ return tree;
139
+ // handles special cases of mentions where user.name is an e-mail
140
+ // Remark GFM translates all e-mail-like text nodes to links creating
141
+ // two separate child nodes "@" and "your.name@as.email" instead of
142
+ // keeping it as one text node with value "@your.name@as.email"
143
+ // this piece finds these two separated nodes and merges them together
144
+ // before "replace" function takes over
145
+ visit(tree, function (node, index, parent) {
146
+ var _a;
147
+ if (index === null)
148
+ return;
149
+ if (!parent)
150
+ return;
151
+ var nextChild = parent.children.at(index + 1);
152
+ var nextChildHref = (_a = nextChild === null || nextChild === void 0 ? void 0 : nextChild.properties) === null || _a === void 0 ? void 0 : _a.href;
153
+ if (node.type === 'text' &&
154
+ // text value has to have @ sign at the end of the string
155
+ // and no other characters except whitespace can precede it
156
+ // valid cases: "text @", "@", " @"
157
+ // invalid cases: "text@", "@text",
158
+ /.?\s?@$|^@$/.test(node.value) &&
159
+ nextChildHref.startsWith('mailto:')) {
160
+ var newTextValue = node.value.replace(/@$/, '');
161
+ var username = nextChildHref.replace('mailto:', '');
162
+ parent.children[index] = u('text', newTextValue);
163
+ parent.children[index + 1] = u('text', "@".concat(username));
164
+ }
165
+ });
166
+ return findAndReplace(tree, mentionedUsersRegex, replace);
129
167
  };
130
168
  return transform;
131
169
  }; };
132
- var Mention = function (props) { return React.createElement("span", { className: 'str-chat__message-mention' }, props.children); };
133
- export var renderText = function (text, mentioned_users, options) {
134
- if (options === void 0) { options = {}; }
170
+ export var renderText = function (text, mentionedUsers, _a) {
171
+ var _b = _a === void 0 ? {} : _a, customMarkDownRenderers = _b.customMarkDownRenderers;
135
172
  // take the @ mentions and turn them into markdown?
136
173
  // translate links
137
174
  if (!text)
138
175
  return null;
176
+ if (text.trim().length === 1)
177
+ return React.createElement(React.Fragment, null, text);
139
178
  var newText = text;
140
179
  var markdownLinks = matchMarkdownLinks(newText);
141
180
  var codeBlocks = messageCodeBlocks(newText);
@@ -159,8 +198,8 @@ export var renderText = function (text, mentioned_users, options) {
159
198
  // it could happen that a user's name matches with an e-mail format pattern.
160
199
  // in that case, we check whether the found e-mail is actually a mention
161
200
  // by naively checking for an existence of @ sign in front of it.
162
- if (type === 'email' && mentioned_users) {
163
- var emailMatchesWithName = mentioned_users.some(function (u) { return u.name === value; });
201
+ if (type === 'email' && mentionedUsers) {
202
+ var emailMatchesWithName = mentionedUsers.some(function (u) { return u.name === value; });
164
203
  if (emailMatchesWithName) {
165
204
  newText = newText.replace(new RegExp(escapeRegExp(value), 'g'), function (match, position) {
166
205
  var isMention = newText.charAt(position - 1) === '@';
@@ -178,14 +217,27 @@ export var renderText = function (text, mentioned_users, options) {
178
217
  void e;
179
218
  }
180
219
  });
181
- var plugins = [emojiMarkdownPlugin];
182
- if (mentioned_users === null || mentioned_users === void 0 ? void 0 : mentioned_users.length) {
183
- plugins.push(mentionsMarkdownPlugin(mentioned_users));
220
+ var rehypePlugins = [emojiMarkdownPlugin];
221
+ if (mentionedUsers === null || mentionedUsers === void 0 ? void 0 : mentionedUsers.length) {
222
+ rehypePlugins.push(mentionsMarkdownPlugin(mentionedUsers));
223
+ }
224
+ // TODO: remove in the next major release
225
+ if (customMarkDownRenderers === null || customMarkDownRenderers === void 0 ? void 0 : customMarkDownRenderers.mention) {
226
+ var MentionComponent_1 = customMarkDownRenderers['mention'];
227
+ // eslint-disable-next-line react/display-name
228
+ customMarkDownRenderers['mention'] = function (_a) {
229
+ var node = _a.node, rest = __rest(_a, ["node"]);
230
+ return (React.createElement(MentionComponent_1
231
+ // @ts-ignore
232
+ , __assign({
233
+ // @ts-ignore
234
+ mentioned_user: node.mentionedUser,
235
+ // @ts-ignore
236
+ node: __assign({ mentioned_user: node.mentionedUser }, node) }, rest)));
237
+ };
184
238
  }
185
- var renderers = __assign(__assign({ mention: Mention }, markDownRenderers), options.customMarkDownRenderers);
186
- return (React.createElement(ReactMarkdown, { allowedTypes: allowedMarkups, escapeHtml: true, plugins: plugins, renderers: renderers, source: newText, transformLinkUri: function (uri) {
187
- return uri.startsWith('app://') ? uri : RootReactMarkdown.uriTransformer(uri);
188
- }, unwrapDisallowed: true }));
239
+ var rehypeComponents = __assign(__assign({}, markDownRenderers), customMarkDownRenderers);
240
+ return (React.createElement(ReactMarkdown, { allowedElements: allowedMarkups, components: rehypeComponents, rehypePlugins: rehypePlugins, remarkPlugins: [[remarkGfm, { singleTilde: false }]], skipHtml: true, transformLinkUri: function (uri) { return (uri.startsWith('app://') ? uri : uriTransformer(uri)); }, unwrapDisallowed: true }, newText));
189
241
  };
190
242
  export function escapeRegExp(text) {
191
243
  return text.replace(/[-[\]{}()*+?.,\\^$|#]/g, '\\$&');
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "10.3.0";
1
+ export declare const version = "10.4.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export var version = '10.3.0';
1
+ export var version = '10.4.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-react",
3
- "version": "10.3.0",
3
+ "version": "10.4.0",
4
4
  "description": "React components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -35,13 +35,13 @@
35
35
  "dayjs": "^1.10.4",
36
36
  "emoji-mart": "3.0.1",
37
37
  "emoji-regex": "^9.2.0",
38
+ "hast-util-find-and-replace": "^4.1.2",
38
39
  "i18next": "^21.6.14",
39
40
  "isomorphic-ws": "^4.0.1",
40
41
  "linkifyjs": "^2.1.9",
41
42
  "lodash.debounce": "^4.0.8",
42
43
  "lodash.throttle": "^4.1.1",
43
44
  "lodash.uniqby": "^4.7.0",
44
- "mdast-util-find-and-replace": "^2.2.1",
45
45
  "nanoid": "^3.3.4",
46
46
  "pretty-bytes": "^5.4.1",
47
47
  "prop-types": "^15.7.2",
@@ -50,12 +50,15 @@
50
50
  "react-file-utils": "^1.2.0",
51
51
  "react-image-gallery": "^1.2.7",
52
52
  "react-is": "^18.1.0",
53
- "react-markdown": "^5.0.3",
53
+ "react-markdown": "^8.0.3",
54
54
  "react-player": "^2.10.1",
55
55
  "react-popper": "^2.3.0",
56
56
  "react-textarea-autosize": "^8.3.0",
57
57
  "react-virtuoso": "^2.16.5",
58
- "textarea-caret": "^3.1.0"
58
+ "remark-gfm": "^3.0.1",
59
+ "textarea-caret": "^3.1.0",
60
+ "unist-builder": "^3.0.0",
61
+ "unist-util-visit": "^4.1.1"
59
62
  },
60
63
  "optionalDependencies": {
61
64
  "@stream-io/transliterate": "^1.5.5",
@@ -64,7 +67,7 @@
64
67
  "peerDependencies": {
65
68
  "react": "^18.0.0 || ^17.0.0 || ^16.8.0",
66
69
  "react-dom": "^18.0.0 || ^17.0.0 || ^16.8.0",
67
- "stream-chat": "^7.1.0"
70
+ "stream-chat": "^8.0.0 || ^7.1.0"
68
71
  },
69
72
  "files": [
70
73
  "dist",
@@ -86,9 +89,10 @@
86
89
  "@ladle/react": "^0.16.0",
87
90
  "@playwright/test": "^1.22.0",
88
91
  "@rollup/plugin-babel": "^5.2.1",
92
+ "@rollup/plugin-commonjs": "^23.0.2",
89
93
  "@rollup/plugin-image": "^2.1.1",
90
94
  "@rollup/plugin-json": "^4.1.0",
91
- "@rollup/plugin-node-resolve": "^10.0.0",
95
+ "@rollup/plugin-node-resolve": "^15.0.1",
92
96
  "@rollup/plugin-replace": "^2.3.4",
93
97
  "@rollup/plugin-typescript": "8.2.1",
94
98
  "@semantic-release/changelog": "^6.0.1",
@@ -100,11 +104,11 @@
100
104
  "@types/deep-equal": "^1.0.1",
101
105
  "@types/dotenv": "^8.2.0",
102
106
  "@types/emoji-mart": "^3.0.9",
107
+ "@types/hast": "^2.3.4",
103
108
  "@types/linkifyjs": "^2.1.3",
104
109
  "@types/lodash.debounce": "^4.0.7",
105
110
  "@types/lodash.throttle": "^4.1.7",
106
111
  "@types/lodash.uniqby": "^4.7.7",
107
- "@types/mdast": "^3.0.10",
108
112
  "@types/moment": "^2.13.0",
109
113
  "@types/react": "^18.0.8",
110
114
  "@types/react-dom": "^18.0.3",
@@ -135,7 +139,7 @@
135
139
  "eslint-plugin-jest": "^24.1.3",
136
140
  "eslint-plugin-jest-dom": "^3.3.0",
137
141
  "eslint-plugin-jsx-a11y": "^6.4.1",
138
- "eslint-plugin-markdown": "^1.0.2",
142
+ "eslint-plugin-markdown": "^3.0.0",
139
143
  "eslint-plugin-node": "^11.1.0",
140
144
  "eslint-plugin-prettier": "^3.1.4",
141
145
  "eslint-plugin-promise": "^4.2.1",
@@ -145,7 +149,6 @@
145
149
  "eslint-plugin-sort-keys-fix": "^1.1.2",
146
150
  "eslint-plugin-typescript-sort-keys": "1.5.0",
147
151
  "file-loader": "^6.2.0",
148
- "htmlparser2": "^5.0.1",
149
152
  "husky": "^4.3.0",
150
153
  "i18next-parser": "^6.0.0",
151
154
  "jest": "^26.6.3",
@@ -157,8 +160,7 @@
157
160
  "react": "^18.1.0",
158
161
  "react-dom": "^18.1.0",
159
162
  "react-test-renderer": "^18.1.0",
160
- "rollup": "^2.33.3",
161
- "rollup-plugin-commonjs": "^10.1.0",
163
+ "rollup": "^2.79.1",
162
164
  "rollup-plugin-copy": "^3.4.0",
163
165
  "rollup-plugin-insert": "^1.3.1",
164
166
  "rollup-plugin-node-globals": "^1.4.0",