@agentscope-ai/chat 1.1.44 → 1.1.45-beta.1766027835357
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.
|
@@ -61,7 +61,8 @@ export default memo(function (props: MarkdownProps) {
|
|
|
61
61
|
img: props.disableImage ? DisabledImage : Media,
|
|
62
62
|
citation: CitationComponent,
|
|
63
63
|
'custom-cursor': CursorComponent,
|
|
64
|
-
|
|
64
|
+
...components,
|
|
65
|
+
}), [props.disableImage, CitationComponent, props.components]);
|
|
65
66
|
|
|
66
67
|
|
|
67
68
|
const dompurifyConfig = useMemo(() =>
|
package/lib/Markdown/Markdown.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
7
|
import { memo, useMemo } from 'react';
|
|
2
8
|
import MarkdownX from "./core";
|
|
3
9
|
import useTyping from "./core/hooks/useTyping";
|
|
@@ -54,15 +60,15 @@ export default /*#__PURE__*/memo(function (props) {
|
|
|
54
60
|
citationsDataCount = _useCitationsData.citationsDataCount,
|
|
55
61
|
CitationComponent = _useCitationsData.CitationComponent;
|
|
56
62
|
var components = useMemo(function () {
|
|
57
|
-
return {
|
|
63
|
+
return _objectSpread({
|
|
58
64
|
pre: CodeBlock,
|
|
59
65
|
style: Null,
|
|
60
66
|
script: Null,
|
|
61
67
|
img: props.disableImage ? DisabledImage : Media,
|
|
62
68
|
citation: CitationComponent,
|
|
63
69
|
'custom-cursor': CursorComponent
|
|
64
|
-
};
|
|
65
|
-
}, [props.disableImage, CitationComponent]);
|
|
70
|
+
}, components);
|
|
71
|
+
}, [props.disableImage, CitationComponent, props.components]);
|
|
66
72
|
var dompurifyConfig = useMemo(function () {
|
|
67
73
|
return allowHtml ? {
|
|
68
74
|
ADD_TAGS: ['custom-cursor', 'citation']
|
package/lib/Markdown/types.d.ts
CHANGED
package/package.json
CHANGED