@lobehub/ui 1.133.3 → 1.133.4

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.
@@ -6,8 +6,8 @@ import Icon from "../../Icon";
6
6
  import { useHighlight } from "../../hooks/useHighlight";
7
7
  import { useStyles } from "./style";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
- import { jsxs as _jsxs } from "react/jsx-runtime";
10
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
11
  var SyntaxHighlighter = /*#__PURE__*/memo(function (_ref) {
12
12
  var children = _ref.children,
13
13
  language = _ref.language,
@@ -36,16 +36,16 @@ var SyntaxHighlighter = /*#__PURE__*/memo(function (_ref) {
36
36
  __html: data
37
37
  },
38
38
  style: style
39
- }), isLoading && /*#__PURE__*/_jsxs(Flexbox, {
39
+ }), isLoading && /*#__PURE__*/_jsx(Flexbox, {
40
40
  align: 'center',
41
41
  className: styles.loading,
42
42
  gap: 8,
43
43
  horizontal: true,
44
44
  justify: 'center',
45
- children: [/*#__PURE__*/_jsx(Icon, {
45
+ children: /*#__PURE__*/_jsx(Icon, {
46
46
  icon: Loader2,
47
47
  spin: true
48
- }), "Highlighting..."]
48
+ })
49
49
  })]
50
50
  });
51
51
  });
package/es/mdx/Callout.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
2
+ var _templateObject, _templateObject2, _templateObject3;
3
3
  import { Icon } from "./..";
4
4
  import { createStyles } from 'antd-style';
5
5
  import { isString } from 'lodash-es';
@@ -12,7 +12,8 @@ var useStyles = createStyles(function (_ref) {
12
12
  var css = _ref.css;
13
13
  return {
14
14
  container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --lobe-markdown-margin-multiple: 1;\n\n overflow: hidden;\n gap: 0.75em;\n\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n padding-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n padding-inline: 1em;\n\n border: 1px solid transparent;\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n "]))),
15
- content: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-block: calc(var(--lobe-markdown-margin-multiple) * -1em);\n\n p {\n color: inherit !important;\n }\n "])))
15
+ content: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-block: calc(var(--lobe-markdown-margin-multiple) * -1em);\n\n p {\n color: inherit !important;\n }\n "]))),
16
+ underlineAnchor: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n a {\n text-decoration: underline;\n }\n "])))
16
17
  };
17
18
  });
18
19
  var Callout = function Callout(_ref2) {
@@ -20,6 +21,7 @@ var Callout = function Callout(_ref2) {
20
21
  _ref2$type = _ref2.type,
21
22
  type = _ref2$type === void 0 ? 'info' : _ref2$type;
22
23
  var _useStyles = useStyles(),
24
+ cx = _useStyles.cx,
23
25
  styles = _useStyles.styles,
24
26
  theme = _useStyles.theme;
25
27
  var typeConfig = {
@@ -48,7 +50,7 @@ var Callout = function Callout(_ref2) {
48
50
  var icon = selectedType.icon,
49
51
  color = selectedType.color;
50
52
  var content = children;
51
- if (isString(children)) content = /*#__PURE__*/_jsx("p", {
53
+ if (isString(children) || isString(children === null || children === void 0 ? void 0 : children[0])) content = /*#__PURE__*/_jsx("p", {
52
54
  children: children
53
55
  });
54
56
  return /*#__PURE__*/_jsxs(Flexbox, {
@@ -69,7 +71,7 @@ var Callout = function Callout(_ref2) {
69
71
  marginBlock: '0.2em'
70
72
  }
71
73
  }), /*#__PURE__*/_jsx("div", {
72
- className: styles.content,
74
+ className: cx(styles.content, type === 'info' && styles.underlineAnchor),
73
75
  children: content
74
76
  })]
75
77
  });
package/es/mdx/Tabs.js CHANGED
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
3
3
  var _templateObject, _templateObject2, _templateObject3;
4
4
  import { createStyles } from 'antd-style';
5
- import { isArray, isString } from 'lodash-es';
5
+ import { isString } from 'lodash-es';
6
6
  import { useState } from 'react';
7
7
  import { Flexbox } from 'react-layout-kit';
8
8
  import TabsNav from "../TabsNav";
@@ -23,7 +23,7 @@ var _TabItem = function _TabItem(_ref2) {
23
23
  var _useStyles = useStyles(),
24
24
  styles = _useStyles.styles;
25
25
  var content = children;
26
- if (isString(children) || isArray(children)) content = /*#__PURE__*/_jsx("p", {
26
+ if (isString(children) || isString(children === null || children === void 0 ? void 0 : children[0])) content = /*#__PURE__*/_jsx("p", {
27
27
  children: children
28
28
  });
29
29
  return /*#__PURE__*/_jsx("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.133.3",
3
+ "version": "1.133.4",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",