whyuzeim 1.1.76 → 1.1.78
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.
|
@@ -4,6 +4,7 @@ import { ChatSDK } from "agora-chat-uikit/types/module/SDK";
|
|
|
4
4
|
import { ChatType } from "agora-chat-uikit/types/module/types/messageType";
|
|
5
5
|
import { AIReportMessageExts } from "@components/type";
|
|
6
6
|
import "./style/index.scss";
|
|
7
|
+
import 'highlight.js/styles/night-owl.css';
|
|
7
8
|
export interface IHighlyCustomChat {
|
|
8
9
|
conversationId: string;
|
|
9
10
|
chatType: ChatType;
|
|
@@ -20,6 +20,7 @@ var React = require('react');
|
|
|
20
20
|
var agoraChatUikit = require('agora-chat-uikit');
|
|
21
21
|
var remarkGfm = require('remark-gfm');
|
|
22
22
|
var ReactMarkdown = require('react-markdown');
|
|
23
|
+
var rehypeHighlight = require('rehype-highlight');
|
|
23
24
|
var jsrsasign = require('jsrsasign');
|
|
24
25
|
var context = require('../IM/context.js');
|
|
25
26
|
var type = require('../type.js');
|
|
@@ -32,6 +33,7 @@ require('./style/index.scss');
|
|
|
32
33
|
var index = require('./AIReportMsg/index.js');
|
|
33
34
|
var index$3 = require('./ ShareMsg/index.js');
|
|
34
35
|
var classNames = require('classnames');
|
|
36
|
+
require('highlight.js/styles/night-owl.css');
|
|
35
37
|
|
|
36
38
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37
39
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context4 = ownKeys(Object(t), true)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -145,7 +147,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
145
147
|
color: isMySelf ? "var(--im-msg-bubble-right-font-color)" : "var(--im-msg-bubble-font-color)"
|
|
146
148
|
}
|
|
147
149
|
}, /*#__PURE__*/React.createElement(ReactMarkdown, {
|
|
148
|
-
remarkPlugins: [remarkGfm]
|
|
150
|
+
remarkPlugins: [remarkGfm, rehypeHighlight]
|
|
149
151
|
}, "".concat(msg.msg.replace(/^"|"$/g, '').replace(/\\n/g, '\n\n'))))), /*#__PURE__*/React.createElement("span", {
|
|
150
152
|
className: "cui-message-base-time"
|
|
151
153
|
}, formatMessageTime(msg.time)));
|
|
@@ -4,6 +4,7 @@ import { ChatSDK } from "agora-chat-uikit/types/module/SDK";
|
|
|
4
4
|
import { ChatType } from "agora-chat-uikit/types/module/types/messageType";
|
|
5
5
|
import { AIReportMessageExts } from "@components/type";
|
|
6
6
|
import "./style/index.scss";
|
|
7
|
+
import 'highlight.js/styles/night-owl.css';
|
|
7
8
|
export interface IHighlyCustomChat {
|
|
8
9
|
conversationId: string;
|
|
9
10
|
chatType: ChatType;
|
|
@@ -18,6 +18,7 @@ import React, { useRef, useContext, useState, useCallback, useEffect } from 'rea
|
|
|
18
18
|
import { useClient, useSDK, useConversationContext, rootStore, MessageList, MessageInput, ImageMessage, FileMessage, VideoMessage, BaseMessage } from 'agora-chat-uikit';
|
|
19
19
|
import remarkGfm from 'remark-gfm';
|
|
20
20
|
import ReactMarkdown from 'react-markdown';
|
|
21
|
+
import rehypeHighlight from 'rehype-highlight';
|
|
21
22
|
import jsrsasign from 'jsrsasign';
|
|
22
23
|
import { Context } from '../IM/context.js';
|
|
23
24
|
import { commonMessageInputConfig, commonMessageProps } from '../type.js';
|
|
@@ -30,6 +31,7 @@ import './style/index.scss';
|
|
|
30
31
|
import AIReportMsg from './AIReportMsg/index.js';
|
|
31
32
|
import ShareMsg from './ ShareMsg/index.js';
|
|
32
33
|
import classNames from 'classnames';
|
|
34
|
+
import 'highlight.js/styles/night-owl.css';
|
|
33
35
|
|
|
34
36
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35
37
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context4 = ownKeys(Object(t), true)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -143,7 +145,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
143
145
|
color: isMySelf ? "var(--im-msg-bubble-right-font-color)" : "var(--im-msg-bubble-font-color)"
|
|
144
146
|
}
|
|
145
147
|
}, /*#__PURE__*/React.createElement(ReactMarkdown, {
|
|
146
|
-
remarkPlugins: [remarkGfm]
|
|
148
|
+
remarkPlugins: [remarkGfm, rehypeHighlight]
|
|
147
149
|
}, "".concat(msg.msg.replace(/^"|"$/g, '').replace(/\\n/g, '\n\n'))))), /*#__PURE__*/React.createElement("span", {
|
|
148
150
|
className: "cui-message-base-time"
|
|
149
151
|
}, formatMessageTime(msg.time)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "whyuzeim",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.78",
|
|
4
4
|
"description": "im componenets",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"highlight.js": "^11.11.1",
|
|
47
47
|
"copy-to-clipboard": "^3.3.3",
|
|
48
48
|
"react-markdown": "^10.1.0",
|
|
49
|
-
"remark-gfm": "^4.0.1"
|
|
49
|
+
"remark-gfm": "^4.0.1",
|
|
50
|
+
"rehype-highlight": "^7.0.2"
|
|
50
51
|
}
|
|
51
52
|
}
|