@lobehub/ui 1.133.3 → 1.133.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.
@@ -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/index.d.ts CHANGED
@@ -57,6 +57,7 @@ export { default as LogoThree, type LogoThreeProps } from './LogoThree';
57
57
  export { default as LogoSpline, type LogoSplineProps } from './LogoThree/LogoSpline';
58
58
  export { default as Markdown, type MarkdownProps } from './Markdown';
59
59
  export { Typography, type TypographyProps } from './Markdown/Typography';
60
+ export { mdxComponents, Pre, PreSingleLine } from './mdx';
60
61
  export { default as MessageInput, type MessageInputProps } from './MessageInput';
61
62
  export { default as MessageModal, type MessageModalProps } from './MessageModal';
62
63
  export { default as MobileNavBar, type MobileNavBarProps } from './MobileNavBar';
package/es/index.js CHANGED
@@ -56,6 +56,7 @@ export { default as LogoThree } from "./LogoThree";
56
56
  export { default as LogoSpline } from "./LogoThree/LogoSpline";
57
57
  export { default as Markdown } from "./Markdown";
58
58
  export { Typography } from "./Markdown/Typography";
59
+ export { mdxComponents, Pre, PreSingleLine } from "./mdx";
59
60
  export { default as MessageInput } from "./MessageInput";
60
61
  export { default as MessageModal } from "./MessageModal";
61
62
  export { default as MobileNavBar } from "./MobileNavBar";
package/es/mdx/Callout.js CHANGED
@@ -1,18 +1,19 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
3
- import { Icon } from "./..";
2
+ var _templateObject, _templateObject2, _templateObject3;
4
3
  import { createStyles } from 'antd-style';
5
4
  import { isString } from 'lodash-es';
6
5
  import { Info, Lightbulb, MessageSquareWarning, OctagonAlert, TriangleAlert } from 'lucide-react';
7
6
  import { rgba } from 'polished';
8
7
  import { Flexbox } from 'react-layout-kit';
8
+ import Icon from "../Icon";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
11
  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/Cards.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
2
  import { type FlexboxProps } from 'react-layout-kit';
3
- import { type IconProps } from '../Icon';
3
+ import { type IconProps } from "../Icon";
4
4
  export interface CardProps extends Omit<FlexboxProps, 'children'> {
5
5
  desc?: string;
6
6
  href?: string;
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
- import { type IconProps } from '../Icon';
2
+ import { type IconProps } from "../Icon";
3
3
  export interface _FileTreeProps {
4
4
  children: ReactNode;
5
5
  }
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", {
@@ -1,3 +1,13 @@
1
- import { FC } from 'react';
2
- declare const mdxComponents: Record<string, FC<any>>;
1
+ /// <reference types="react" />
2
+ declare const mdxComponents: {
3
+ Callout: import("react").FC<import("./Callout").CalloutProps>;
4
+ Cards: import("./Cards").CardsProps;
5
+ FileTree: import("./FileTree").FileTreeProps;
6
+ Image: import("react").FC<import("./Image").ImageProps>;
7
+ Steps: import("react").FC<{
8
+ children?: import("react").ReactNode;
9
+ }>;
10
+ Tabs: import("./Tabs").TabsProps;
11
+ Video: import("react").FC<import("./Video").VideoProps>;
12
+ };
3
13
  export default mdxComponents;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.133.3",
3
+ "version": "1.133.5",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",