@lobehub/ui 1.75.0 → 1.76.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/es/LogoThree/index.js +26 -18
- package/es/Markdown/index.js +19 -7
- package/package.json +3 -1
package/es/LogoThree/index.js
CHANGED
|
@@ -3,6 +3,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
import { Canvas } from '@react-three/fiber';
|
|
5
5
|
import { Suspense, memo } from 'react';
|
|
6
|
+
import { ErrorBoundary } from 'react-error-boundary';
|
|
7
|
+
import LobeHubLogo from "../Logo";
|
|
6
8
|
import Loading from "./Loading";
|
|
7
9
|
import Logo from "./Logo";
|
|
8
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,24 +13,30 @@ var LogoThree = /*#__PURE__*/memo(function (_ref) {
|
|
|
11
13
|
size = _ref$size === void 0 ? 320 : _ref$size,
|
|
12
14
|
style = _ref.style,
|
|
13
15
|
className = _ref.className;
|
|
14
|
-
return /*#__PURE__*/_jsx(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
return /*#__PURE__*/_jsx(ErrorBoundary, {
|
|
17
|
+
fallback: /*#__PURE__*/_jsx(LobeHubLogo, {
|
|
18
|
+
size: size,
|
|
19
|
+
type: "3d"
|
|
20
|
+
}),
|
|
21
|
+
children: /*#__PURE__*/_jsx(Canvas, {
|
|
22
|
+
camera: {
|
|
23
|
+
fov: 16,
|
|
24
|
+
position: [10, 1, 0]
|
|
25
|
+
},
|
|
26
|
+
className: className,
|
|
27
|
+
style: size ? _objectSpread({
|
|
28
|
+
height: size,
|
|
29
|
+
maxHeight: size,
|
|
30
|
+
maxWidth: size,
|
|
31
|
+
width: size
|
|
32
|
+
}, style) : style,
|
|
33
|
+
children: /*#__PURE__*/_jsx(Suspense, {
|
|
34
|
+
fallback: /*#__PURE__*/_jsx(Loading, {
|
|
35
|
+
size: size / 2 > 48 ? 48 : size / 2
|
|
36
|
+
}),
|
|
37
|
+
children: /*#__PURE__*/_jsx(Logo, {
|
|
38
|
+
rotation: [0, 1.5, 0]
|
|
39
|
+
})
|
|
32
40
|
})
|
|
33
41
|
})
|
|
34
42
|
});
|
package/es/Markdown/index.js
CHANGED
|
@@ -5,7 +5,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
import { Collapse, Divider, Typography } from 'antd';
|
|
7
7
|
import { memo } from 'react';
|
|
8
|
+
import { ErrorBoundary } from 'react-error-boundary';
|
|
8
9
|
import ReactMarkdown from 'react-markdown';
|
|
10
|
+
import rehypeRaw from 'rehype-raw';
|
|
9
11
|
import remarkGfm from 'remark-gfm';
|
|
10
12
|
import Code from "./Code";
|
|
11
13
|
import CodeBlock from "./CodeBlock";
|
|
@@ -35,13 +37,23 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
35
37
|
return /*#__PURE__*/_jsx(Typography, {
|
|
36
38
|
className: className,
|
|
37
39
|
style: style,
|
|
38
|
-
children: /*#__PURE__*/_jsx(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
children: /*#__PURE__*/_jsx(ErrorBoundary, {
|
|
41
|
+
fallback: /*#__PURE__*/_jsx(ReactMarkdown, _objectSpread(_objectSpread({
|
|
42
|
+
className: styles.markdown,
|
|
43
|
+
components: components,
|
|
44
|
+
remarkPlugins: [remarkGfm]
|
|
45
|
+
}, props), {}, {
|
|
46
|
+
children: children
|
|
47
|
+
})),
|
|
48
|
+
children: /*#__PURE__*/_jsx(ReactMarkdown, _objectSpread(_objectSpread({
|
|
49
|
+
className: styles.markdown,
|
|
50
|
+
components: components,
|
|
51
|
+
rehypePlugins: [rehypeRaw],
|
|
52
|
+
remarkPlugins: [remarkGfm]
|
|
53
|
+
}, props), {}, {
|
|
54
|
+
children: children
|
|
55
|
+
}))
|
|
56
|
+
})
|
|
45
57
|
});
|
|
46
58
|
});
|
|
47
59
|
export default Markdown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.76.0",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -95,10 +95,12 @@
|
|
|
95
95
|
"prism-react-renderer": "^2",
|
|
96
96
|
"rc-footer": "^0",
|
|
97
97
|
"re-resizable": "^6",
|
|
98
|
+
"react-error-boundary": "^4",
|
|
98
99
|
"react-layout-kit": "^1.7.1",
|
|
99
100
|
"react-markdown": "^8",
|
|
100
101
|
"react-rnd": "^10",
|
|
101
102
|
"react-simple-code-editor": "^0",
|
|
103
|
+
"rehype-raw": "^6",
|
|
102
104
|
"remark-gfm": "^3",
|
|
103
105
|
"shiki-es": "^0",
|
|
104
106
|
"styled-components": "^6",
|