@lobehub/ui 1.98.1 → 1.98.3
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/ChatHeader/ChatHeaderTitle.js +14 -17
- package/es/Markdown/index.js +1 -2
- package/es/MessageInput/index.js +8 -6
- package/es/Modal/index.d.ts +3 -3
- package/es/Modal/index.js +1 -2
- package/package.json +1 -2
|
@@ -10,10 +10,10 @@ var useStyles = createStyles(function (_ref) {
|
|
|
10
10
|
token = _ref.token;
|
|
11
11
|
return {
|
|
12
12
|
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n max-width: 100%;\n "]))),
|
|
13
|
-
desc: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 12px;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.colorTextTertiary),
|
|
13
|
+
desc: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.colorTextTertiary),
|
|
14
14
|
tag: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: none;\n align-items: baseline;\n "]))),
|
|
15
|
-
title: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n font-size: 16px;\n font-weight: bold;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
|
|
16
|
-
titleContainer: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex: 1;\n "]))),
|
|
15
|
+
title: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n font-size: 16px;\n font-weight: bold;\n line-height: 1;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
|
|
16
|
+
titleContainer: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex: 1;\n line-height: 1;\n "]))),
|
|
17
17
|
titleWithDesc: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n font-weight: bold;\n text-overflow: ellipsis;\n white-space: nowrap;\n "])))
|
|
18
18
|
};
|
|
19
19
|
});
|
|
@@ -23,8 +23,15 @@ var ChatHeaderTitle = /*#__PURE__*/memo(function (_ref2) {
|
|
|
23
23
|
tag = _ref2.tag;
|
|
24
24
|
var _useStyles = useStyles(),
|
|
25
25
|
styles = _useStyles.styles;
|
|
26
|
+
var tagContent = tag && /*#__PURE__*/_jsx(Flexbox, {
|
|
27
|
+
align: 'center',
|
|
28
|
+
className: styles.tag,
|
|
29
|
+
horizontal: true,
|
|
30
|
+
children: tag
|
|
31
|
+
});
|
|
26
32
|
if (desc) return /*#__PURE__*/_jsxs(Flexbox, {
|
|
27
33
|
className: styles.container,
|
|
34
|
+
gap: 4,
|
|
28
35
|
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
29
36
|
align: 'center',
|
|
30
37
|
className: styles.titleContainer,
|
|
@@ -33,18 +40,12 @@ var ChatHeaderTitle = /*#__PURE__*/memo(function (_ref2) {
|
|
|
33
40
|
children: [/*#__PURE__*/_jsx("div", {
|
|
34
41
|
className: styles.titleWithDesc,
|
|
35
42
|
children: title
|
|
36
|
-
}),
|
|
37
|
-
className: styles.tag,
|
|
38
|
-
horizontal: true,
|
|
39
|
-
children: tag
|
|
40
|
-
})]
|
|
43
|
+
}), tagContent]
|
|
41
44
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
42
45
|
align: 'center',
|
|
46
|
+
className: styles.desc,
|
|
43
47
|
horizontal: true,
|
|
44
|
-
children:
|
|
45
|
-
className: styles.desc,
|
|
46
|
-
children: desc
|
|
47
|
-
})
|
|
48
|
+
children: desc
|
|
48
49
|
})]
|
|
49
50
|
});
|
|
50
51
|
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
@@ -55,11 +56,7 @@ var ChatHeaderTitle = /*#__PURE__*/memo(function (_ref2) {
|
|
|
55
56
|
children: [/*#__PURE__*/_jsx("div", {
|
|
56
57
|
className: styles.title,
|
|
57
58
|
children: title
|
|
58
|
-
}),
|
|
59
|
-
className: styles.tag,
|
|
60
|
-
horizontal: true,
|
|
61
|
-
children: tag
|
|
62
|
-
})]
|
|
59
|
+
}), tagContent]
|
|
63
60
|
});
|
|
64
61
|
});
|
|
65
62
|
export default ChatHeaderTitle;
|
package/es/Markdown/index.js
CHANGED
|
@@ -8,7 +8,6 @@ import { memo } from 'react';
|
|
|
8
8
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
9
9
|
import ReactMarkdown from 'react-markdown';
|
|
10
10
|
import rehypeKatex from 'rehype-katex';
|
|
11
|
-
import rehypeRaw from 'rehype-raw';
|
|
12
11
|
import remarkGfm from 'remark-gfm';
|
|
13
12
|
import remarkMath from 'remark-math';
|
|
14
13
|
import { CodeFullFeatured, CodeLite } from "./CodeBlock";
|
|
@@ -50,7 +49,7 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
50
49
|
children: /*#__PURE__*/_jsx(ReactMarkdown, _objectSpread(_objectSpread({
|
|
51
50
|
className: styles.markdown,
|
|
52
51
|
components: components,
|
|
53
|
-
rehypePlugins: [
|
|
52
|
+
rehypePlugins: [rehypeKatex],
|
|
54
53
|
remarkPlugins: [remarkGfm, remarkMath]
|
|
55
54
|
}, props), {}, {
|
|
56
55
|
children: children
|
package/es/MessageInput/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["text", "type", "onCancel", "defaultValue", "onConfirm", "renderButtons", "textareaStyle", "textareaClassname", "placeholder", "height", "style", "editButtonSize"];
|
|
4
|
+
var _excluded = ["text", "type", "onCancel", "defaultValue", "onConfirm", "renderButtons", "textareaStyle", "textareaClassname", "placeholder", "height", "style", "editButtonSize", "classNames"];
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
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; }
|
|
7
7
|
import { Button } from 'antd';
|
|
8
8
|
import { memo, useState } from 'react';
|
|
9
9
|
import { Flexbox } from 'react-layout-kit';
|
|
10
|
-
import
|
|
10
|
+
import { TextArea } from "../Input";
|
|
11
11
|
import { useStyles } from "./style";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -29,6 +29,7 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
|
|
|
29
29
|
style = _ref.style,
|
|
30
30
|
_ref$editButtonSize = _ref.editButtonSize,
|
|
31
31
|
editButtonSize = _ref$editButtonSize === void 0 ? 'middle' : _ref$editButtonSize,
|
|
32
|
+
classNames = _ref.classNames,
|
|
32
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
33
34
|
var _useState = useState(defaultValue || ''),
|
|
34
35
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -45,14 +46,15 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
|
|
|
45
46
|
width: '100%'
|
|
46
47
|
}, style)
|
|
47
48
|
}, props), {}, {
|
|
48
|
-
children: [/*#__PURE__*/_jsx(
|
|
49
|
+
children: [/*#__PURE__*/_jsx(TextArea, {
|
|
50
|
+
autoSize: isAutoSize,
|
|
49
51
|
className: cx(styles, textareaClassname),
|
|
50
|
-
|
|
52
|
+
classNames: classNames,
|
|
51
53
|
onBlur: function onBlur(e) {
|
|
52
54
|
return setRole(e.target.value);
|
|
53
55
|
},
|
|
54
|
-
|
|
55
|
-
return setRole(e);
|
|
56
|
+
onChange: function onChange(e) {
|
|
57
|
+
return setRole(e.target.value);
|
|
56
58
|
},
|
|
57
59
|
placeholder: placeholder,
|
|
58
60
|
resize: false,
|
package/es/Modal/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ModalProps } from 'antd';
|
|
3
|
-
|
|
2
|
+
import { type ModalProps as AntModalProps } from 'antd';
|
|
3
|
+
export type ModalProps = AntModalProps;
|
|
4
|
+
declare const Modal: import("react").NamedExoticComponent<AntModalProps>;
|
|
4
5
|
export default Modal;
|
|
5
|
-
export { ModalProps } from 'antd';
|
package/es/Modal/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.98.
|
|
3
|
+
"version": "1.98.3",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -101,7 +101,6 @@
|
|
|
101
101
|
"react-rnd": "^10",
|
|
102
102
|
"react-simple-code-editor": "^0",
|
|
103
103
|
"rehype-katex": "^6",
|
|
104
|
-
"rehype-raw": "^6",
|
|
105
104
|
"remark-gfm": "^3",
|
|
106
105
|
"remark-math": "^5",
|
|
107
106
|
"shikiji": "^0",
|