@lobehub/ui 1.150.4 → 1.150.5
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/es/Markdown/index.js +8 -8
- package/package.json +4 -1
package/es/Markdown/index.js
CHANGED
|
@@ -40,10 +40,8 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
40
40
|
_ref$variant = _ref.variant,
|
|
41
41
|
variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
|
|
42
42
|
lineHeight = _ref.lineHeight,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_ref$remarkPlugins = _ref.remarkPlugins,
|
|
46
|
-
remarkPlugins = _ref$remarkPlugins === void 0 ? [] : _ref$remarkPlugins,
|
|
43
|
+
rehypePlugins = _ref.rehypePlugins,
|
|
44
|
+
remarkPlugins = _ref.remarkPlugins,
|
|
47
45
|
_ref$components = _ref.components,
|
|
48
46
|
components = _ref$components === void 0 ? {} : _ref$components,
|
|
49
47
|
customRender = _ref.customRender,
|
|
@@ -97,12 +95,14 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
97
95
|
}
|
|
98
96
|
}, components);
|
|
99
97
|
}, [].concat(_toConsumableArray(Object.values(components || {})), _toConsumableArray(Object.values(componentProps || {})), [enableImageGallery, enableMermaid, fullFeaturedCodeBlock]));
|
|
98
|
+
var innerRehypePlugins = Array.isArray(rehypePlugins) ? rehypePlugins : [rehypePlugins];
|
|
100
99
|
var memoRehypePlugins = useMemo(function () {
|
|
101
|
-
return [allowHtml && rehypeRaw, enableLatex && rehypeKatex].concat(_toConsumableArray(
|
|
102
|
-
}, [allowHtml, enableLatex].concat(_toConsumableArray(
|
|
100
|
+
return [allowHtml && rehypeRaw, enableLatex && rehypeKatex].concat(_toConsumableArray(innerRehypePlugins)).filter(Boolean);
|
|
101
|
+
}, [allowHtml, enableLatex].concat(_toConsumableArray(innerRehypePlugins)));
|
|
102
|
+
var innerRemarkPlugins = Array.isArray(remarkPlugins) ? remarkPlugins : [remarkPlugins];
|
|
103
103
|
var memoRemarkPlugins = useMemo(function () {
|
|
104
|
-
return [remarkGfm, enableLatex && remarkMath, isChatMode && remarkBreaks].concat(_toConsumableArray(
|
|
105
|
-
}, [isChatMode, enableLatex].concat(_toConsumableArray(
|
|
104
|
+
return [remarkGfm, enableLatex && remarkMath, isChatMode && remarkBreaks].concat(_toConsumableArray(innerRemarkPlugins)).filter(Boolean);
|
|
105
|
+
}, [isChatMode, enableLatex].concat(_toConsumableArray(innerRemarkPlugins)));
|
|
106
106
|
var defaultDOM = /*#__PURE__*/_jsx(ImageGallery, {
|
|
107
107
|
enable: enableImageGallery,
|
|
108
108
|
children: /*#__PURE__*/_jsx(ReactMarkdown, _objectSpread(_objectSpread({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.150.
|
|
3
|
+
"version": "1.150.5",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
"@types/react": "18.2.40",
|
|
139
139
|
"@types/react-avatar-editor": "^13.0.2",
|
|
140
140
|
"@types/react-dom": "^18.3.0",
|
|
141
|
+
"@types/unist": "^3.0.3",
|
|
141
142
|
"@types/uuid": "^10.0.0",
|
|
142
143
|
"@vitest/coverage-v8": "~1.2.2",
|
|
143
144
|
"babel-plugin-antd-style": "^1.0.4",
|
|
@@ -160,6 +161,8 @@
|
|
|
160
161
|
"semantic-release": "^21.1.2",
|
|
161
162
|
"stylelint": "^15.11.0",
|
|
162
163
|
"typescript": "^5.5.4",
|
|
164
|
+
"unist-util-is": "^6.0.0",
|
|
165
|
+
"unist-util-visit": "^5.0.0",
|
|
163
166
|
"vitest": "~1.2.2"
|
|
164
167
|
},
|
|
165
168
|
"peerDependencies": {
|