@yuntijs/ui 1.0.0-beta.96 → 1.0.0-beta.97
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.
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
3
|
-
var _templateObject, _templateObject2
|
|
4
|
+
var _templateObject, _templateObject2;
|
|
5
|
+
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; }
|
|
6
|
+
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
7
|
import { Icon, Markdown } from '@lobehub/ui';
|
|
5
8
|
import { createStyles } from 'antd-style';
|
|
6
9
|
import { ChevronDown, ChevronRight, Sparkles } from 'lucide-react';
|
|
@@ -13,11 +16,16 @@ var useStyles = createStyles(function (_ref) {
|
|
|
13
16
|
token = _ref.token,
|
|
14
17
|
isDarkMode = _ref.isDarkMode;
|
|
15
18
|
return {
|
|
16
|
-
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n padding-block: 12px;\n color: ", ";\n "])), token.
|
|
17
|
-
titlebox: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px;\n color: ", ";\n background: ", ";\n border-radius: 8px;\n
|
|
18
|
-
title: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n display: box;\n -webkit-box-orient: vertical;\n\n font-size: 12px;\n text-overflow: ellipsis;\n\n -webkit-line-clamp: 1;\n "])))
|
|
19
|
+
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n padding-block: 12px;\n color: ", ";\n "])), token.colorTextSecondary),
|
|
20
|
+
titlebox: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px;\n\n font-size: 12px;\n color: ", ";\n\n background: ", ";\n border-radius: 8px;\n "])), token.colorText, isDarkMode ? token.colorFillTertiary : '#f3f5fc')
|
|
19
21
|
};
|
|
20
22
|
});
|
|
23
|
+
var mProps = {
|
|
24
|
+
fontSize: 12,
|
|
25
|
+
lineHeight: 1.625,
|
|
26
|
+
headerMultiple: 0.2,
|
|
27
|
+
marginMultiple: 0.6
|
|
28
|
+
};
|
|
21
29
|
var Render = /*#__PURE__*/memo(function (_ref2) {
|
|
22
30
|
var children = _ref2.children,
|
|
23
31
|
second = _ref2.second,
|
|
@@ -45,13 +53,13 @@ var Render = /*#__PURE__*/memo(function (_ref2) {
|
|
|
45
53
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
46
54
|
color: theme.purple,
|
|
47
55
|
icon: Sparkles
|
|
48
|
-
}), done ? "\u5DF2\u6DF1\u5EA6\u601D\u8003
|
|
56
|
+
}), done ? "\u5DF2\u6DF1\u5EA6\u601D\u8003".concat(second ? '(用时' + second + '秒)' : '', " ") : '思考中...']
|
|
49
57
|
}), /*#__PURE__*/_jsx(Icon, {
|
|
50
58
|
icon: showDetail ? ChevronDown : ChevronRight
|
|
51
59
|
})]
|
|
52
|
-
}), showDetail && /*#__PURE__*/_jsx(Markdown, {
|
|
60
|
+
}), showDetail && /*#__PURE__*/_jsx(Markdown, _objectSpread(_objectSpread({}, mProps), {}, {
|
|
53
61
|
children: children
|
|
54
|
-
})]
|
|
62
|
+
}))]
|
|
55
63
|
});
|
|
56
64
|
});
|
|
57
65
|
export default Render;
|